From d81acc556984859024dd519acdadc30640d6f7f3 Mon Sep 17 00:00:00 2001 From: ncnynl Date: Fri, 2 Dec 2022 09:36:32 +0800 Subject: [PATCH 1/5] Add a script for installing dso in noetic --- .../shell/install_dso_noetic_source.sh | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100755 commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh diff --git a/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh b/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh new file mode 100755 index 0000000..49c087a --- /dev/null +++ b/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh @@ -0,0 +1,92 @@ +#!/bin/bash +################################################################ +# Function :Install ROS1 Noetic ORB_SLAM2 # +# Platform :All Linux Based Platform # +# Version :1.0 # +# Date :2022-11-30 # +# Author :ncnynl EndlessLoops # +# Contact :1043931@qq.com # +# Company :Foshan AiZheTeng Information Technology Co.,Ltd. # +# URL: https://ncnynl.com # +################################################################ + +workspace=ros1_vslam_ws + +if [ -d ~/$workspace/dso ]; then + echo -e "\033[33m DSO have installed! \033[0m" + +else + if [ ! -d ~/$workspace/ ];then + mkdir ~/$workspace/ + fi + ## isntall lib + sudo apt-get update + sudo apt-get install libsuitesparse-dev libeigen3-dev libboost-all-dev + + + ## install Pangolin + if [ -d ~/$workspace/Pangolin ];then + echo -e "\033[33m Pangolin have installed!! \033[0m" + else + echo -e "\033[33m Now installing Pangolin. \033[0m" + + cd ~/$workspace/ + git clone https://ghproxy.com/https://github.com/stevenlovegrove/Pangolin + cd ~/$workspace/Pangolin + git checkout 25159034e62011b3527228e476cec51f08e87602 + mkdir build + cd build + cmake -DCPP11_NO_BOOST=1 .. + make + fi + + ## install libzip + echo -e "\033[33m Now installing libzip. \033[0m" + + cd ~/$workspace/ + git clone https://ghproxy.com/https://github.com/JakobEngel/dso.git + + sudo apt-get install zlib1g-dev + cd ~/$workspace/dso/thirdparty + tar -zxvf libzip-1.1.1.tar.gz + cd libzip-1.1.1/ + ./configure + make + sudo make install + + ## install DSO + echo -e "\033[33m Now installing dso. \033[0m" + cd ~/$workspace/dso + sed -i 's/CV_LOAD_IMAGE_GRAYSCALE/cv::IMREAD_GRAYSCALE/'g ~/$workspace/dso/src/IOWrapper/OpenCV/ImageRW_OpenCV.cpp + sed -i 's/CV_LOAD_IMAGE_COLOR/cv::IMREAD_COLOR/'g ~/$workspace/dso/src/IOWrapper/OpenCV/ImageRW_OpenCV.cpp + sed -i 's/CV_LOAD_IMAGE_UNCHANGED/cv::IMREAD_UNCHANGED/'g ~/$workspace/dso/src/IOWrapper/OpenCV/ImageRW_OpenCV.cpp + mkdir build + cd build + cmake .. + make -j + + ## install DSO_ROS + echo -e "\033[33m Now installing dso_ros. \033[0m" + export DSO_PATH=~/$workspace/dso + if [ ! -d ~/$workspace/src ];then + mkdir -p ~/$workspace/src + fi + cd ~/$workspace/src + git clone -b catkin https://ghproxy.com/https://github.com/JakobEngel/dso_ros + cd .. + catkin_make + + ## add to bashrc if not exits + if ! grep -Fq "source ~/$workspace/devel/setup.bash" ~/.bashrc + then + echo "source ~/$workspace/devel/setup.bash" >> ~/.bashrc + echo -e "\033[33m $workspace workspace have installed successfully! writed to ~/.bashrc \033[0m" + + else + echo -e "\033[33m Has been inited before! Please check ~/.bashrc \033[0m" + fi + + echo -e "\033[33m ROS ${ROS_DISTRO} DSO installed successfully \033[0m" +fi + + -- Gitee From 02e95f756ec90ac2fc0b7f999b5ddaa9fc627d9f Mon Sep 17 00:00:00 2001 From: endlessloops <479326138@qq.com> Date: Wed, 18 Dec 2024 12:14:02 +0800 Subject: [PATCH 2/5] update omx humble install script --- .../install_openmanipulator_humble_source.sh | 65 +++++-------------- 1 file changed, 18 insertions(+), 47 deletions(-) diff --git a/commands_extra/ros2_tb3/shell/install_openmanipulator_humble_source.sh b/commands_extra/ros2_tb3/shell/install_openmanipulator_humble_source.sh index f41743d..e033345 100755 --- a/commands_extra/ros2_tb3/shell/install_openmanipulator_humble_source.sh +++ b/commands_extra/ros2_tb3/shell/install_openmanipulator_humble_source.sh @@ -25,25 +25,23 @@ echo "$(gettext "Install ROS2 humble open_manipulator_x source version")" # if installed ? if [ -d ~/ros2_openmanipulatorx_ws/src ]; then - echo " open_manipulator have installed!!" + echo " open_manipulatorx have installed!!" else # install dep - sudo apt install -y python3-argcomplete python3-colcon-common-extensions python3-vcstool git libudev-dev - sudo apt install -y ros-humble-gazebo-ros2-control \ - ros-humble-gazebo-ros-pkgs \ - ros-humble-gazebo-ros2-control-demos \ - ros-humble-gazebo-dev \ - ros-humble-gazebo-ros \ - ros-humble-gazebo-plugins \ - ros-humble-gazebo-msgs \ - ros-humble-cartographer \ - ros-humble-cartographer-ros \ - ros-humble-nav2-bringup \ - ros-humble-navigation2 \ - ros-humble-slam-toolbox \ - ros-humble-rqt* \ - ros-humble-joint-state-publisher + sudo apt install \ + ros-humble-dynamixel-sdk \ + ros-humble-ros2-control \ + ros-humble-moveit* \ + ros-humble-gazebo-ros2-control \ + ros-humble-ros2-controllers \ + ros-humble-controller-manager \ + ros-humble-position-controllers \ + ros-humble-joint-state-broadcaster \ + ros-humble-joint-trajectory-controller \ + ros-humble-gripper-controllers \ + ros-humble-hardware-interface \ + ros-humble-xacro #rosdep update sudo apt install python3-rosdep -y @@ -61,30 +59,18 @@ else cd ~/ros2_openmanipulatorx_ws/src - #run wget - - # 获取仓库列表 - - # wget https://raw.githubusercontent.com/ROBOTIS-GIT/turtlebot3/humble-devel/turtlebot3.repos - - #run import - echo "this will take 10-30 min to download" - # 下载仓库 echo "Download code " - git clone -b humble-devel https://github.com/ROBOTIS-GIT/DynamixelSDK - git clone -b ros2 https://github.com/ROBOTIS-GIT/dynamixel-workbench.git - git clone -b humble-devel https://github.com/ROBOTIS-GIT/open_manipulator.git - git clone -b ros2 https://github.com/ROBOTIS-GIT/open_manipulator_msgs.git - git clone -b ros2 https://github.com/ROBOTIS-GIT/open_manipulator_dependencies.git - git clone -b ros2 https://github.com/ROBOTIS-GIT/robotis_manipulator.git + git clone -b humble https://github.com/ROBOTIS-GIT/open_manipulator.git + git clone -b humble https://github.com/ROBOTIS-GIT/dynamixel_hardware_interface.git + git clone -b humble https://github.com/ROBOTIS-GIT/dynamixel_interfaces.git + #run colcon # 编辑各个包 echo "build workspace..." cd ~/ros2_openmanipulatorx_ws/ - rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y colcon build --symlink-install --parallel-workers 1 #run echo @@ -93,22 +79,7 @@ else echo 'source ~/ros2_openmanipulatorx_ws/install/setup.bash' >> ~/.bashrc - #run echo - - # 添加ROS_DOMAIN_ID到bashrc文件 - - # echo 'export ROS_DOMAIN_ID=30 #TURTLEBOT3' >> ~/.bashrc - - # export GAZEBO_MODEL_PATH - # echo 'export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/ros2_tb3_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models' >> ~/.bashrc - - # export TURTLEBOT3_MODEL - # echo 'export TURTLEBOT3_MODEL=burger' >> ~/.bashrc - - #run source - # 加载工作空间到当前环境 - #sh -c "~/commands/ros_easy/shell/init_tb3.sh" source ~/.bashrc fi -- Gitee From 1c1c03dd4d68e0aa117623ff8f65e8a1f287dcca Mon Sep 17 00:00:00 2001 From: endlessloops <479326138@qq.com> Date: Thu, 19 Dec 2024 18:11:36 +0800 Subject: [PATCH 3/5] update omx humble install script --- ...e.sh => install_openmanipulator_x_humble_source.sh} | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) rename commands_extra/ros2_tb3/shell/{install_openmanipulator_humble_source.sh => install_openmanipulator_x_humble_source.sh} (93%) diff --git a/commands_extra/ros2_tb3/shell/install_openmanipulator_humble_source.sh b/commands_extra/ros2_tb3/shell/install_openmanipulator_x_humble_source.sh similarity index 93% rename from commands_extra/ros2_tb3/shell/install_openmanipulator_humble_source.sh rename to commands_extra/ros2_tb3/shell/install_openmanipulator_x_humble_source.sh index e033345..5b7f4ae 100755 --- a/commands_extra/ros2_tb3/shell/install_openmanipulator_humble_source.sh +++ b/commands_extra/ros2_tb3/shell/install_openmanipulator_x_humble_source.sh @@ -29,6 +29,8 @@ if [ -d ~/ros2_openmanipulatorx_ws/src ]; then else # install dep + sudo apt update + sudo apt install \ ros-humble-dynamixel-sdk \ ros-humble-ros2-control \ @@ -43,13 +45,7 @@ else ros-humble-hardware-interface \ ros-humble-xacro - #rosdep update - sudo apt install python3-rosdep -y - . ~/commands/common/shell/update_rosdep_tsinghua.sh - # rosdep update - cs -si update_rosdep_tsinghua - - + sudo apt upgrade ros-humble-realtime-tools ros-humble-ros2-control # 新建工作空间 mkdir -p ~/ros2_openmanipulatorx_ws/src -- Gitee From 7f2069c5d19df686ff254bc317ded8b5918f7d14 Mon Sep 17 00:00:00 2001 From: EndlessLoops <479326138@qq.com> Date: Thu, 19 Dec 2024 10:16:49 +0000 Subject: [PATCH 4/5] update commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh. Signed-off-by: EndlessLoops <479326138@qq.com> --- .../ros1_algorithm/shell/install_dso_noetic_source.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh b/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh index 49c087a..6cc6304 100755 --- a/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh +++ b/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh @@ -31,7 +31,7 @@ else echo -e "\033[33m Now installing Pangolin. \033[0m" cd ~/$workspace/ - git clone https://ghproxy.com/https://github.com/stevenlovegrove/Pangolin + git clone https://github.com/stevenlovegrove/Pangolin cd ~/$workspace/Pangolin git checkout 25159034e62011b3527228e476cec51f08e87602 mkdir build @@ -44,7 +44,7 @@ else echo -e "\033[33m Now installing libzip. \033[0m" cd ~/$workspace/ - git clone https://ghproxy.com/https://github.com/JakobEngel/dso.git + git clone https://github.com/JakobEngel/dso.git sudo apt-get install zlib1g-dev cd ~/$workspace/dso/thirdparty -- Gitee From 289efe7ccb5c28685e249bac3f098792c31920ed Mon Sep 17 00:00:00 2001 From: EndlessLoops <479326138@qq.com> Date: Thu, 19 Dec 2024 10:18:06 +0000 Subject: [PATCH 5/5] update commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh. Signed-off-by: EndlessLoops <479326138@qq.com> --- .../ros1_algorithm/shell/install_dso_noetic_source.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh b/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh index 6cc6304..38674e6 100755 --- a/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh +++ b/commands_extra/ros1_algorithm/shell/install_dso_noetic_source.sh @@ -72,7 +72,7 @@ else mkdir -p ~/$workspace/src fi cd ~/$workspace/src - git clone -b catkin https://ghproxy.com/https://github.com/JakobEngel/dso_ros + git clone -b catkin https://github.com/JakobEngel/dso_ros cd .. catkin_make -- Gitee