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 0000000000000000000000000000000000000000..38674e62ec2d46a4751f0b73e243c9cca5762026 --- /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://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://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://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 + + 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 47% 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 f41743d8257940323da3172b91165874f0e258ed..5b7f4aeb2128a01fa73f680b8ee0f83b62b55931 100755 --- a/commands_extra/ros2_tb3/shell/install_openmanipulator_humble_source.sh +++ b/commands_extra/ros2_tb3/shell/install_openmanipulator_x_humble_source.sh @@ -25,33 +25,27 @@ 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 - - #rosdep update - sudo apt install python3-rosdep -y - . ~/commands/common/shell/update_rosdep_tsinghua.sh - # rosdep update - cs -si update_rosdep_tsinghua - - + sudo apt update + + 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 + + sudo apt upgrade ros-humble-realtime-tools ros-humble-ros2-control # 新建工作空间 mkdir -p ~/ros2_openmanipulatorx_ws/src @@ -61,30 +55,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 +75,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