From a2be275407a6a558a81f0a04bc2e0cc78901ea52 Mon Sep 17 00:00:00 2001 From: Pradheep Date: Mon, 23 Sep 2024 18:24:58 +0200 Subject: [PATCH 01/17] updating the robot setup tools --- package-setup/setup-mp-robot.sh | 146 ++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100755 package-setup/setup-mp-robot.sh diff --git a/package-setup/setup-mp-robot.sh b/package-setup/setup-mp-robot.sh new file mode 100755 index 0000000..6cb312c --- /dev/null +++ b/package-setup/setup-mp-robot.sh @@ -0,0 +1,146 @@ +#!/bin/bash + +# exit if any command below fails +set -e + +# create folders +mkdir -p ~/.config/autostart/ + +# copy files +cp ../generic/ROS-Neobotix-Autostart.desktop ~/.config/autostart/ +cp ../generic/startROS.desktop ~/Desktop/ + +# Check if ROS is sourced + +if [ "$ROS_DISTRO" == "" ]; +then + echo "Installation cannot continue. No ROS sourced, please check if ROS is installed and sourced. Please try again after that!" + exit 0 +fi + +echo "Welcome to the setup of your MP robot, please select the dependencies that are required for your robot" + +uni_ans="" +phi_ans="" +skip_depend="" + +while [[ "$uni_ans" != "y" && "$uni_ans" != "n" ]]; do + echo "Universal robots ? (y/n)" + + read uni_ans + + if [ "$uni_ans" == "n" ]; then + skip_depend+="ur_client_library ur_msgs ur_description ur_robot_driver " + elif [ "$uni_ans" == "y" ]; then + echo "Universal robots dependencies will be installed" + else + echo "Wrong option - Please try again" + fi + +done + +while [[ "$phi_ans" != "y" && "$phi_ans" != "n" ]]; do + echo "Phidget IMU ? (y/n)" + + read phi_ans + + if [ "$phi_ans" == "n" ]; then + skip_depend+="phidgets-drivers" + elif [ "$phi_ans" == "y" ]; then + echo "Phidget IMU dependencies will be installed" + else + echo "Wrong option - Please try again" + fi + +done + +while [[ "$robot_model" != "mp_400" && "$robot_model" != "mp_500" && "$robot_model" != "mpo_500" && "$robot_model" != "mpo_700" ]]; do + + echo "Choose your robot (mp_400/mp_500/mpo_500/mpo_700)" + + read robot_model + + if [ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]; then + echo "neo_kinematics_differential2 package will be cloned" + elif [ "$robot_model" == "mpo_500" ]; then + echo "neo_kinematics_mecanum2 package will be cloned" + elif [ "$robot_model" == "mpo_700" ]; then + echo "neo_kinematics_omnidrive2 package will be cloned" + else + echo "Wrong option - Please try again" + fi + +done + +# Install build tool +sudo apt install python3-colcon-common-extensions + +# Install navigation packages + +# Nav2 +sudo apt install -y ros-$ROS_DISTRO-navigation2 ros-$ROS_DISTRO-nav2-* + +sudo apt install -y ros-$ROS_DISTRO-slam-toolbox + +#Teleop-joy +sudo apt-get install -y ros-$ROS_DISTRO-teleop-twist-joy + +#Teleop-key +sudo apt-get install -y ros-$ROS_DISTRO-teleop-twist-keyboard + +#Topic tools +sudo apt-get install -y ros-$ROS_DISTRO-topic-tools + +#Xacro +sudo apt-get install -y ros-$ROS_DISTRO-xacro + +cd ~ + +mkdir -p ros2_workspace/src +cd ros2_workspace/src + +# clone git repos here... +git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_mpo_700-2.git +git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git +git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_local_planner2.git +git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_localization2.git +git clone --branch master https://github.com/neobotix/neo_common2 +git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_relayboard_v2-2 +git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_sick_s300-2 +git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_teleop2 +git clone --branch master https://github.com/neobotix/neo_msgs2 +git clone --branch master https://github.com/neobotix/neo_srvs2 + +if [ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]; then + git clone --branch main https://github.com/neobotix/neo_kinematics_differential2.git +elif [ "$robot_model" == "mpo_500" ]; then + git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_kinematics_mecanum2.git +elif [ "$robot_model" == "mpo_700" ]; then + git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_kinematics_omnidrive2.git +fi + +# build workspace +cd .. +colcon build --symlink-install + +echo "export LC_NUMERIC="en_US.UTF-8" " >> ~/.bashrc + +echo "source ~/ros2_workspace/install/setup.bash" >> ~/.bashrc + +echo "Setting up startup scripts" + +echo "source ~/ros2_workspace/install/setup.bash" >> ROS_AUTOSTART.sh + +echo "sleep 2" >> ROS_AUTOSTART.sh + +if [ "$robot_model" == "mpo_700" ]; then + echo "ros2 launch neo_mpo_700-2 bringup.launch.py" >> ROS_AUTOSTART.sh +fi + +chmod +x ROS_AUTOSTART.sh + +mv ROS_AUTOSTART.sh ~/ + +echo "Installation successful !!!" + +exit 0 \ No newline at end of file From 3407138c3c53fae809b15ae8d38f9eb8d286c813 Mon Sep 17 00:00:00 2001 From: Pradheep Date: Tue, 24 Sep 2024 15:47:59 +0200 Subject: [PATCH 02/17] updating autostart scripts --- package-setup/setup-mp-robot.sh | 111 ++++++++++++++++------------- package-setup/setup-rox.sh | 120 ++++++++++++++++++++++++++------ 2 files changed, 159 insertions(+), 72 deletions(-) diff --git a/package-setup/setup-mp-robot.sh b/package-setup/setup-mp-robot.sh index 6cb312c..baf0548 100755 --- a/package-setup/setup-mp-robot.sh +++ b/package-setup/setup-mp-robot.sh @@ -22,77 +22,85 @@ echo "Welcome to the setup of your MP robot, please select the dependencies that uni_ans="" phi_ans="" +realsense_ans="" skip_depend="" +arm_type="" +use_imu="False" +use_d435="False" -while [[ "$uni_ans" != "y" && "$uni_ans" != "n" ]]; do - echo "Universal robots ? (y/n)" - - read uni_ans - - if [ "$uni_ans" == "n" ]; then - skip_depend+="ur_client_library ur_msgs ur_description ur_robot_driver " - elif [ "$uni_ans" == "y" ]; then - echo "Universal robots dependencies will be installed" +while [[ "$robot_model" != "mp_400" && "$robot_model" != "mp_500" && "$robot_model" != "mpo_500" && "$robot_model" != "mpo_700" ]]; do + echo "Choose your robot (mp_400/mp_500/mpo_500/mpo_700)" + read robot_model + if [ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]; then + echo "neo_kinematics_differential2 package will be cloned" + elif [ "$robot_model" == "mpo_500" ]; then + echo "neo_kinematics_mecanum2 package will be cloned" + elif [ "$robot_model" == "mpo_700" ]; then + echo "neo_kinematics_omnidrive2 package will be cloned" else echo "Wrong option - Please try again" fi - done +if [ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]; then + while [[ "$uni_ans" != "y" && "$uni_ans" != "n" ]]; do + echo "Universal robots ? (y/n)" + read uni_ans + if [ "$uni_ans" == "n" ]; then + skip_depend+="ur_client_library ur_msgs ur_description ur_robot_driver " + elif [ "$uni_ans" == "y" ]; then + echo "Universal robots dependencies will be installed and added to autstart" + while [[ "$arm_type" != "ur10" && "$arm_type" != "ur10e" && "$arm_type" != "ur5" && "$arm_type" != "ur5e" ]]; do + echo "arm_type? (ur10/ur10e/ur5/ur5e)" + read arm_type + done + else + echo "Wrong option - Please try again" + fi + done +fi + while [[ "$phi_ans" != "y" && "$phi_ans" != "n" ]]; do echo "Phidget IMU ? (y/n)" - read phi_ans - if [ "$phi_ans" == "n" ]; then skip_depend+="phidgets-drivers" + use_imu="False" elif [ "$phi_ans" == "y" ]; then - echo "Phidget IMU dependencies will be installed" + echo "Phidget IMU dependencies will be installed and added to autstart" + use_imu="True" else echo "Wrong option - Please try again" fi - done -while [[ "$robot_model" != "mp_400" && "$robot_model" != "mp_500" && "$robot_model" != "mpo_500" && "$robot_model" != "mpo_700" ]]; do - - echo "Choose your robot (mp_400/mp_500/mpo_500/mpo_700)" - - read robot_model - - if [ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]; then - echo "neo_kinematics_differential2 package will be cloned" - elif [ "$robot_model" == "mpo_500" ]; then - echo "neo_kinematics_mecanum2 package will be cloned" - elif [ "$robot_model" == "mpo_700" ]; then - echo "neo_kinematics_omnidrive2 package will be cloned" +while [[ "$realsense_ans" != "y" && "$realsense_ans" != "n" ]]; do + echo "Realsense Camera (URDF only supports D435i) ? (y/n)" + read realsense_ans + if [ "$realsense_ans" == "n" ]; then + skip_depend+="realsense2_camera realsense2_camera_msgs realsense2_description" + use_d435="False" + elif [ "$realsense_ans" == "y" ]; then + echo "Realsense camera dependencies will be installed and added to autstart" + use_d435="True" else echo "Wrong option - Please try again" fi - done +#rosdep update might need rosdep init -- ToDo: See if it could be checked +rosdep update + # Install build tool +echo "Installing colcon extensions" sudo apt install python3-colcon-common-extensions -# Install navigation packages +# Installing CycloneDDS +echo "Installing CycloneDDS" +sudo apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp -# Nav2 -sudo apt install -y ros-$ROS_DISTRO-navigation2 ros-$ROS_DISTRO-nav2-* - -sudo apt install -y ros-$ROS_DISTRO-slam-toolbox - -#Teleop-joy -sudo apt-get install -y ros-$ROS_DISTRO-teleop-twist-joy - -#Teleop-key -sudo apt-get install -y ros-$ROS_DISTRO-teleop-twist-keyboard - -#Topic tools -sudo apt-get install -y ros-$ROS_DISTRO-topic-tools - -#Xacro -sudo apt-get install -y ros-$ROS_DISTRO-xacro +#Install xterm - useful when +sudo apt install xterm cd ~ @@ -100,8 +108,7 @@ mkdir -p ros2_workspace/src cd ros2_workspace/src # clone git repos here... -git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_mpo_700-2.git -git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git +git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_$robot_model-2.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_local_planner2.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_localization2.git git clone --branch master https://github.com/neobotix/neo_common2 @@ -110,6 +117,11 @@ git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_sick_s300-2 git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_teleop2 git clone --branch master https://github.com/neobotix/neo_msgs2 git clone --branch master https://github.com/neobotix/neo_srvs2 +git clone https://github.com/neobotix/joystick_drivers.git + +if [ "$ROS_DISTRO" == "Iron" ]; then + git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git +fi if [ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]; then git clone --branch main https://github.com/neobotix/neo_kinematics_differential2.git @@ -121,21 +133,22 @@ fi # build workspace cd .. + colcon build --symlink-install echo "export LC_NUMERIC="en_US.UTF-8" " >> ~/.bashrc echo "source ~/ros2_workspace/install/setup.bash" >> ~/.bashrc +echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc + echo "Setting up startup scripts" echo "source ~/ros2_workspace/install/setup.bash" >> ROS_AUTOSTART.sh echo "sleep 2" >> ROS_AUTOSTART.sh -if [ "$robot_model" == "mpo_700" ]; then - echo "ros2 launch neo_mpo_700-2 bringup.launch.py" >> ROS_AUTOSTART.sh -fi +echo "ros2 launch neo_"$robot_model"-2 bringup.launch.py arm_type:="$arm_type" use_imu:="$use_imu" use_d435:="$use_d435>> ROS_AUTOSTART.sh chmod +x ROS_AUTOSTART.sh diff --git a/package-setup/setup-rox.sh b/package-setup/setup-rox.sh index 95cbbf9..15b539e 100755 --- a/package-setup/setup-rox.sh +++ b/package-setup/setup-rox.sh @@ -18,31 +18,93 @@ then exit 0 fi +echo "Welcome to the setup of your ROX robot, please select the dependencies that are required for your robot" + +uni_ans="" +phi_ans="" +realsense_ans="" +skip_depend="ros_gz " +arm_type="" +use_imu="False" +use_d435="False" + +while [[ "$uni_ans" != "y" && "$uni_ans" != "n" ]]; do + echo "Universal robots ? (y/n)" + read uni_ans + if [ "$uni_ans" == "n" ]; then + skip_depend+="ur_client_library ur_msgs ur_description ur_robot_driver " + elif [ "$uni_ans" == "y" ]; then + echo "Universal robots dependencies will be installed and added to autstart" + while [[ "$arm_type" != "ur10" && "$arm_type" != "ur10e" && "$arm_type" != "ur5" && "$arm_type" != "ur5e" ]]; do + echo "arm_type? (ur10/ur10e/ur5/ur5e)" + read arm_type + done + else + echo "Wrong option - Please try again" + fi + +done + +while [[ "$phi_ans" != "y" && "$phi_ans" != "n" ]]; do + echo "Phidget IMU ? (y/n)" + read phi_ans + if [ "$phi_ans" == "n" ]; then + skip_depend+="phidgets-drivers" + use_imu="False" + elif [ "$phi_ans" == "y" ]; then + echo "Phidget IMU dependencies will be installed and added to autstart" + use_imu="True" + else + echo "Wrong option - Please try again" + fi + +done + +while [[ "$realsense_ans" != "y" && "$realsense_ans" != "n" ]]; do + echo "Realsense Camera (URDF only supports D435i) ? (y/n)" + read realsense_ans + if [ "$realsense_ans" == "n" ]; then + skip_depend+="realsense2_camera realsense2_camera_msgs realsense2_description" + use_d435="False" + elif [ "$realsense_ans" == "y" ]; then + echo "Realsense camera dependencies will be installed and added to autstart" + use_d435="True" + else + echo "Wrong option - Please try again" + fi +done + +while [[ "$kinematics" != "argo" && "$kinematics" != "diff" ]]; do + + echo "Choose your kinematics (argo/diff)" + + read kinematics + + if [ "$kinematics" == "argo" ]; then + echo "rox_argo_kinematics package will be cloned" + elif [ "$kinematics" == "diff" ]; then + echo "neo_kinematics_differential2 package will be cloned" + else + echo "Wrong option - Please try again" + fi + +done + +#rosdep update might need rosdep init -- ToDo: See if it could be checked +rosdep update + # Install build tool +echo "Installing colcon extensions" sudo apt install python3-colcon-common-extensions -# Install navigation packages - -# Nav2 -sudo apt install -y ros-$ROS_DISTRO-navigation2 ros-$ROS_DISTRO-nav2-* - -sudo apt install -y ros-$ROS_DISTRO-slam-toolbox - -#Teleop-joy -sudo apt-get install -y ros-$ROS_DISTRO-teleop-twist-joy - -#Teleop-key -sudo apt-get install -y ros-$ROS_DISTRO-teleop-twist-keyboard - -#Topic tools -sudo apt-get install -y ros-$ROS_DISTRO-topic-tools +# Installing CycloneDDS +echo "Installing CycloneDDS" +sudo apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp -#Xacro -sudo apt-get install -y ros-$ROS_DISTRO-xacro - -#LaserScanner -sudo apt-get install ros-$ROS_DISTRO-sick-safetyscanners2 +#Install xterm - useful when +sudo apt install xterm +# Go to home directory cd ~ mkdir -p ros2_workspace/src @@ -55,11 +117,16 @@ git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_local_planner git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_localization2.git git clone --branch master https://github.com/neobotix/neo_common2 git clone --branch master https://github.com/neobotix/neo_relayboard_v3 -git clone --branch main https://github.com/neobotix/rox_argo_kinematics.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_teleop2 git clone --branch master https://github.com/neobotix/neo_msgs2 git clone --branch master https://github.com/neobotix/neo_srvs2 +if [ "$kinematics" == "argo" ]; then + git clone --branch main https://github.com/neobotix/rox_argo_kinematics.git +elif [ "$kinematics" == "diff" ]; then + git clone --branch main https://github.com/neobotix/rox_diff_kinematics.git +fi + cd neo_relayboard_v3 #submodule init git submodule update --init @@ -67,21 +134,28 @@ git submodule update --init # install vnx base sudo dpkg -i vnx-base/x86_64/vnx-base-1.9.6-x86_64-ubuntu-22.04.deb +cd ~/ros2_workspace + +echo "Installing dependencies, skipping the following" $skip_depend +# Install relevant dependencies +rosdep install --from-paths ./src --ignore-src --rosdistro $ROS_DISTRO -r -y --skip-keys "$skip_depend" + # build workspace -cd ../.. colcon build --symlink-install echo "export LC_NUMERIC="en_US.UTF-8" " >> ~/.bashrc echo "source ~/ros2_workspace/install/setup.bash" >> ~/.bashrc +echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc + echo "Setting up startup scripts" echo "source ~/ros2_workspace/install/setup.bash" >> ROS_AUTOSTART.sh echo "sleep 2" >> ROS_AUTOSTART.sh -echo "ros2 launch rox_bringup bringup_launch.py" >> ROS_AUTOSTART.sh +echo "ros2 launch rox_bringup bringup_launch.py rox_type:="$kinematics "arm_type:="$arm_type" use_imu:="$use_imu" use_d435:="$use_d435 >> ROS_AUTOSTART.sh chmod +x ROS_AUTOSTART.sh From 63fac6be9fa41ec248f4f2b5141e632bea37d496 Mon Sep 17 00:00:00 2001 From: Pradheep Date: Tue, 24 Sep 2024 15:57:36 +0200 Subject: [PATCH 03/17] installing the corresponding moveit packages as well --- package-setup/setup-mp-robot.sh | 3 +++ package-setup/setup-rox.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/package-setup/setup-mp-robot.sh b/package-setup/setup-mp-robot.sh index baf0548..1e63a9c 100755 --- a/package-setup/setup-mp-robot.sh +++ b/package-setup/setup-mp-robot.sh @@ -131,6 +131,9 @@ elif [ "$robot_model" == "mpo_700" ]; then git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_kinematics_omnidrive2.git fi +if [ "$uni_ans" == "y" ]; then + git clone --branch main https://github.com/neobotix/neo_mpo_moveit2.git + # build workspace cd .. diff --git a/package-setup/setup-rox.sh b/package-setup/setup-rox.sh index 15b539e..461c1aa 100755 --- a/package-setup/setup-rox.sh +++ b/package-setup/setup-rox.sh @@ -127,6 +127,9 @@ elif [ "$kinematics" == "diff" ]; then git clone --branch main https://github.com/neobotix/rox_diff_kinematics.git fi +if [ "$uni_ans" == "y" ]; then + git clone --branch main https://github.com/neobotix/neo_rox_moveit2.git + cd neo_relayboard_v3 #submodule init git submodule update --init From 343c09e28c57a9d15bb79ad902821f3987ee0b6b Mon Sep 17 00:00:00 2001 From: Pradheep Date: Tue, 24 Sep 2024 16:09:12 +0200 Subject: [PATCH 04/17] fixing cyclone dds install --- package-setup/setup-mp-robot.sh | 2 +- package-setup/setup-rox.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-setup/setup-mp-robot.sh b/package-setup/setup-mp-robot.sh index 1e63a9c..35430c6 100755 --- a/package-setup/setup-mp-robot.sh +++ b/package-setup/setup-mp-robot.sh @@ -97,7 +97,7 @@ sudo apt install python3-colcon-common-extensions # Installing CycloneDDS echo "Installing CycloneDDS" -sudo apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp +sudo apt install ros-$ROS_DISTRO-cyclonedds #Install xterm - useful when sudo apt install xterm diff --git a/package-setup/setup-rox.sh b/package-setup/setup-rox.sh index 461c1aa..8211e91 100755 --- a/package-setup/setup-rox.sh +++ b/package-setup/setup-rox.sh @@ -99,7 +99,7 @@ sudo apt install python3-colcon-common-extensions # Installing CycloneDDS echo "Installing CycloneDDS" -sudo apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp +sudo apt install ros-$ROS_DISTRO-cyclonedds #Install xterm - useful when sudo apt install xterm From 581bbe30e032d634fdbadda8c0e7cd293bb8ccfd Mon Sep 17 00:00:00 2001 From: Pradheep Date: Tue, 24 Sep 2024 16:53:07 +0200 Subject: [PATCH 05/17] fixes --- package-setup/setup-mp-robot.sh | 9 +++++---- package-setup/setup-rox.sh | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package-setup/setup-mp-robot.sh b/package-setup/setup-mp-robot.sh index 35430c6..6305328 100755 --- a/package-setup/setup-mp-robot.sh +++ b/package-setup/setup-mp-robot.sh @@ -31,7 +31,7 @@ use_d435="False" while [[ "$robot_model" != "mp_400" && "$robot_model" != "mp_500" && "$robot_model" != "mpo_500" && "$robot_model" != "mpo_700" ]]; do echo "Choose your robot (mp_400/mp_500/mpo_500/mpo_700)" read robot_model - if [ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]; then + if [[ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]]; then echo "neo_kinematics_differential2 package will be cloned" elif [ "$robot_model" == "mpo_500" ]; then echo "neo_kinematics_mecanum2 package will be cloned" @@ -42,7 +42,7 @@ while [[ "$robot_model" != "mp_400" && "$robot_model" != "mp_500" && "$robot_mod fi done -if [ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]; then +if [[ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]]; then while [[ "$uni_ans" != "y" && "$uni_ans" != "n" ]]; do echo "Universal robots ? (y/n)" read uni_ans @@ -123,7 +123,7 @@ if [ "$ROS_DISTRO" == "Iron" ]; then git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git fi -if [ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]; then +if [[ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]]; then git clone --branch main https://github.com/neobotix/neo_kinematics_differential2.git elif [ "$robot_model" == "mpo_500" ]; then git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_kinematics_mecanum2.git @@ -133,6 +133,7 @@ fi if [ "$uni_ans" == "y" ]; then git clone --branch main https://github.com/neobotix/neo_mpo_moveit2.git +fi # build workspace cd .. @@ -159,4 +160,4 @@ mv ROS_AUTOSTART.sh ~/ echo "Installation successful !!!" -exit 0 \ No newline at end of file +exit 0 diff --git a/package-setup/setup-rox.sh b/package-setup/setup-rox.sh index 8211e91..529bd51 100755 --- a/package-setup/setup-rox.sh +++ b/package-setup/setup-rox.sh @@ -129,6 +129,7 @@ fi if [ "$uni_ans" == "y" ]; then git clone --branch main https://github.com/neobotix/neo_rox_moveit2.git +fi cd neo_relayboard_v3 #submodule init From 2ca4d487657d7fc7228553e71ec3914bf0f309f2 Mon Sep 17 00:00:00 2001 From: Pradheep Date: Wed, 25 Sep 2024 15:49:24 +0200 Subject: [PATCH 06/17] add extra spaces --- package-setup/setup-mp-robot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-setup/setup-mp-robot.sh b/package-setup/setup-mp-robot.sh index 6305328..49e4c70 100755 --- a/package-setup/setup-mp-robot.sh +++ b/package-setup/setup-mp-robot.sh @@ -24,7 +24,7 @@ uni_ans="" phi_ans="" realsense_ans="" skip_depend="" -arm_type="" +arm_type=" " use_imu="False" use_d435="False" From be092eae42d2604df99a0c902137a52114acd801 Mon Sep 17 00:00:00 2001 From: Pradheep Date: Wed, 25 Sep 2024 16:18:40 +0200 Subject: [PATCH 07/17] minor space fix --- package-setup/setup-rox.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-setup/setup-rox.sh b/package-setup/setup-rox.sh index 529bd51..35ff600 100755 --- a/package-setup/setup-rox.sh +++ b/package-setup/setup-rox.sh @@ -24,7 +24,7 @@ uni_ans="" phi_ans="" realsense_ans="" skip_depend="ros_gz " -arm_type="" +arm_type=" " use_imu="False" use_d435="False" From 6e0fff3fb7cef26b7bd07e3798ecbf0545c8526b Mon Sep 17 00:00:00 2001 From: Pradheep Date: Wed, 25 Sep 2024 16:21:09 +0200 Subject: [PATCH 08/17] some more updates --- package-setup/setup-mp-robot.sh | 2 +- package-setup/setup-rox.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package-setup/setup-mp-robot.sh b/package-setup/setup-mp-robot.sh index 49e4c70..825d8bf 100755 --- a/package-setup/setup-mp-robot.sh +++ b/package-setup/setup-mp-robot.sh @@ -119,7 +119,7 @@ git clone --branch master https://github.com/neobotix/neo_msgs2 git clone --branch master https://github.com/neobotix/neo_srvs2 git clone https://github.com/neobotix/joystick_drivers.git -if [ "$ROS_DISTRO" == "Iron" ]; then +if [ "$ROS_DISTRO" == "iron" ]; then git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git fi diff --git a/package-setup/setup-rox.sh b/package-setup/setup-rox.sh index 35ff600..0d50dda 100755 --- a/package-setup/setup-rox.sh +++ b/package-setup/setup-rox.sh @@ -112,7 +112,6 @@ cd ros2_workspace/src # clone git repos here... git clone --branch $ROS_DISTRO https://github.com/neobotix/rox.git -git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_local_planner2.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_localization2.git git clone --branch master https://github.com/neobotix/neo_common2 @@ -121,6 +120,10 @@ git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_teleop2 git clone --branch master https://github.com/neobotix/neo_msgs2 git clone --branch master https://github.com/neobotix/neo_srvs2 +if [ "$ROS_DISTRO" == "iron" ]; then + git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git +fi + if [ "$kinematics" == "argo" ]; then git clone --branch main https://github.com/neobotix/rox_argo_kinematics.git elif [ "$kinematics" == "diff" ]; then From 87924ec6f8023617c81903e5fec9f437aa6d3f7c Mon Sep 17 00:00:00 2001 From: Pradheep Date: Tue, 1 Oct 2024 15:20:44 +0200 Subject: [PATCH 09/17] add the missing rosdep command --- package-setup/setup-mp-robot.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package-setup/setup-mp-robot.sh b/package-setup/setup-mp-robot.sh index 825d8bf..ac9e91b 100755 --- a/package-setup/setup-mp-robot.sh +++ b/package-setup/setup-mp-robot.sh @@ -138,6 +138,10 @@ fi # build workspace cd .. +echo "Installing dependencies, skipping the following" $skip_depend +# Install relevant dependencies +rosdep install --from-paths ./src --ignore-src --rosdistro $ROS_DISTRO -r -y --skip-keys "$skip_depend" + colcon build --symlink-install echo "export LC_NUMERIC="en_US.UTF-8" " >> ~/.bashrc From f246e02fd05697cf9c1fade489215d8324716b10 Mon Sep 17 00:00:00 2001 From: Pradheep Date: Tue, 1 Oct 2024 16:52:16 +0200 Subject: [PATCH 10/17] update rosdep init with a continuation condition --- package-setup/setup-mp-robot.sh | 3 ++- package-setup/setup-rox.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package-setup/setup-mp-robot.sh b/package-setup/setup-mp-robot.sh index ac9e91b..2fc0569 100755 --- a/package-setup/setup-mp-robot.sh +++ b/package-setup/setup-mp-robot.sh @@ -88,7 +88,8 @@ while [[ "$realsense_ans" != "y" && "$realsense_ans" != "n" ]]; do fi done -#rosdep update might need rosdep init -- ToDo: See if it could be checked +echo "Performing rosdep initialization and update" +sudo rosdep init || { true; echo -e "${YELLOW} rosdep init is not required"; } rosdep update # Install build tool diff --git a/package-setup/setup-rox.sh b/package-setup/setup-rox.sh index 0d50dda..208cfe4 100755 --- a/package-setup/setup-rox.sh +++ b/package-setup/setup-rox.sh @@ -90,7 +90,8 @@ while [[ "$kinematics" != "argo" && "$kinematics" != "diff" ]]; do done -#rosdep update might need rosdep init -- ToDo: See if it could be checked +echo "Performing rosdep initialization and update" +sudo rosdep init || { true; echo -e "${YELLOW} rosdep init is not required"; } rosdep update # Install build tool From 258fc02aa6957df2dd183e88c2bda54a3e33e1bd Mon Sep 17 00:00:00 2001 From: Pradheep Date: Tue, 1 Oct 2024 16:53:30 +0200 Subject: [PATCH 11/17] adding script for installing packages for client PC --- package-setup/setup-client.sh | 109 ++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100755 package-setup/setup-client.sh diff --git a/package-setup/setup-client.sh b/package-setup/setup-client.sh new file mode 100755 index 0000000..4673bc2 --- /dev/null +++ b/package-setup/setup-client.sh @@ -0,0 +1,109 @@ +#!/bin/bash + +# exit if any command below fails +set -e +GREEN='\033[0;32m' +RED='\033[0;31m' +YELLOW='\033[0;33m' +WHITE='\033[0;37m' + +# Check if ROS is sourced + +if [ "$ROS_DISTRO" == "" ]; +then + echo "Installation cannot continue. No ROS sourced, please check if ROS is installed and sourced. Please try again after that!" + exit 0 +fi + +echo "Welcome to the support assistant for setting up the client PC Neobotix packages" + +uni_ans="" +robot_model="" + +# Go to home directory +cd ~ + +mkdir -p client_workspace/src +cd client_workspace/src + +while [[ "$robot_model" != "mp_400" && + "$robot_model" != "mp_500" && + "$robot_model" != "mpo_500" && + "$robot_model" != "mpo_700" && + "$robot_model" != "rox" ]]; do + echo -e "${GREEN} Choose your robot (mp_400/mp_500/mpo_500/mpo_700/rox)" + + read robot_model + + echo -e "${WHITE}" + + if [ "$robot_model" == "rox" ]; then + git clone --branch $ROS_DISTRO https://github.com/neobotix/rox.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } + elif [[ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" || "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]]; then + git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_$robot_model-2.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } + else + echo -e "${RED} Please select a valid option" + fi +done + +sudo rosdep init || { true; echo -e "${YELLOW} rosdep init is not required"; } +rosdep update + +# Install build tool +echo "Installing colcon extensions" +sudo apt install python3-colcon-common-extensions + +# Installing CycloneDDS +echo "Installing CycloneDDS" +sudo apt install ros-$ROS_DISTRO-cyclonedds + +#Install xterm - useful when +sudo apt install xterm + +git clone --branch master https://github.com/neobotix/neo_msgs2 || { true; echo -e "${YELLOW} Continuing with the installation"; } +git clone --branch master https://github.com/neobotix/neo_srvs2 || { true; echo -e "${YELLOW} Continuing with the installation"; } + +if [ "$ROS_DISTRO" == "iron" ]; then + git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git || { true; echo -e "${YELLOW} Continuing with the installation"; } +fi + +cd ~/client_workspace + +# Install relevant dependencies +rosdep install --from-paths ./src/rox/rox_navigation/ ./src/rox/rox_description --ignore-src --rosdistro $ROS_DISTRO -r -y || { true; echo -e "${YELLOW} Finishing the setup"; } + +cd ~/client_workspace/src + +if [[ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" || "$robot_model" == "rox" ]]; then + while [[ "$uni_ans" != "y" && "$uni_ans" != "n" ]]; do + echo -e "${GREEN} Universal robots ? (y/n)" + read uni_ans + + if [ "$uni_ans" == "y" ]; then + if [[ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]]; then + git clone --branch main https://github.com/neobotix/neo_mpo_moveit2.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } + rosdep install --from-paths ./neo_mpo_moveit2 --ignore-src --rosdistro $ROS_DISTRO -r -y || { true; echo -e "${YELLOW} Finishing the setup"; } + elif [ "$robot_model" == "rox" ]; then + git clone --branch main https://github.com/neobotix/neo_rox_moveit2.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } + rosdep install --from-paths ./neo_rox_moveit2 --ignore-src --rosdistro $ROS_DISTRO -r -y || { true; echo -e "${YELLOW} Finishing the setup"; } + else + uni_ans = "n" + fi + fi + done +fi + +cd ~/client_workspace + +echo -e "${WHITE}" + +# build workspace +colcon build --symlink-install + +echo "source ~/client_workspace/install/setup.bash" >> ~/.bashrc + +echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc + +echo "Installation successful !!!" + +exit 0 From 7510157eb6c87f144f21d7eaba52e9a1da8a6f81 Mon Sep 17 00:00:00 2001 From: Pradheep Date: Tue, 1 Oct 2024 16:55:40 +0200 Subject: [PATCH 12/17] fixing indentation --- package-setup/setup-client.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/package-setup/setup-client.sh b/package-setup/setup-client.sh index 4673bc2..f8fc8d0 100755 --- a/package-setup/setup-client.sh +++ b/package-setup/setup-client.sh @@ -33,19 +33,20 @@ while [[ "$robot_model" != "mp_400" && "$robot_model" != "rox" ]]; do echo -e "${GREEN} Choose your robot (mp_400/mp_500/mpo_500/mpo_700/rox)" - read robot_model + read robot_model - echo -e "${WHITE}" + echo -e "${WHITE}" - if [ "$robot_model" == "rox" ]; then + if [ "$robot_model" == "rox" ]; then git clone --branch $ROS_DISTRO https://github.com/neobotix/rox.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } elif [[ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" || "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]]; then - git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_$robot_model-2.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } - else - echo -e "${RED} Please select a valid option" - fi + git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_$robot_model-2.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } + else + echo -e "${RED} Please select a valid option" + fi done +echo "Performing rosdep initialization and update" sudo rosdep init || { true; echo -e "${YELLOW} rosdep init is not required"; } rosdep update From 9ed0f468d0d9fb3f7dc6d3b37cadfe08e625a87e Mon Sep 17 00:00:00 2001 From: Pradheep Date: Thu, 10 Oct 2024 15:42:09 +0200 Subject: [PATCH 13/17] updates to the client setup script --- package-setup/setup-client.sh | 81 +++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/package-setup/setup-client.sh b/package-setup/setup-client.sh index f8fc8d0..3ecfd48 100755 --- a/package-setup/setup-client.sh +++ b/package-setup/setup-client.sh @@ -7,40 +7,77 @@ RED='\033[0;31m' YELLOW='\033[0;33m' WHITE='\033[0;37m' +echo "Welcome to the support assistant for setting up the client PC Neobotix packages" +echo "The workspace will be created in the /home/USER/ folder. In the future, we will add the option, to create the workspace in any desired directory" + +# Check if the client ws is already there in the home folder +cd ~/ +is_ws_installed="" + +if [ -d "client_nbx_ws" ]; then + echo "client_nbx_ws already exists." + echo -n "Do you want to delete it before continuing? (Y/n)" + read is_ws_installed + + if [[ "$is_ws_installed" == "y" || "$is_ws_installed" == "Y" ]]; then + echo -e " Deleting.." + rm -rf "client_nbx_ws" + echo -e " client_nbx_ws has been deleted" + else + echo "Abort" + exit 0 + fi +fi + # Check if ROS is sourced +empty_ros_distro=true +ros_distros=" " +if [ "$ROS_DISTRO" == "" ]; then + echo "ROS Distro is not sourced." + for dir in /opt/ros/*/; do + if [ "$(ls -A "$dir")" ]; then + empty_ros_distro=false + echo -e "$GREEN" + echo " " $(basename "$dir") + fi + done -if [ "$ROS_DISTRO" == "" ]; -then - echo "Installation cannot continue. No ROS sourced, please check if ROS is installed and sourced. Please try again after that!" - exit 0 + if [ $empty_ros_distro == true ]; then + echo "ROS 2 is not installed at all" + echo "Please continue the installation once ROS 2 is installed" + echo "Abort" + else + echo -e "${RED} Please source any one of the ROS Distros above and try again later" + echo -e "${RED} Example: source /opt/ros/YOUR_DISTRO/setup.bash" + fi fi -echo "Welcome to the support assistant for setting up the client PC Neobotix packages" - uni_ans="" robot_model="" # Go to home directory cd ~ -mkdir -p client_workspace/src -cd client_workspace/src +echo "Creating a client_nbx workspace" + +mkdir -p client_nbx_ws/src +cd client_nbx_ws/src while [[ "$robot_model" != "mp_400" && "$robot_model" != "mp_500" && "$robot_model" != "mpo_500" && "$robot_model" != "mpo_700" && "$robot_model" != "rox" ]]; do - echo -e "${GREEN} Choose your robot (mp_400/mp_500/mpo_500/mpo_700/rox)" + echo -e -n "${GREEN} Choose your robot (mp_400/mp_500/mpo_500/mpo_700/rox):" read robot_model echo -e "${WHITE}" if [ "$robot_model" == "rox" ]; then - git clone --branch $ROS_DISTRO https://github.com/neobotix/rox.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } + git clone --branch $ROS_DISTRO https://github.com/neobotix/rox.git elif [[ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" || "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]]; then - git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_$robot_model-2.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } + git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_$robot_model-2.git else echo -e "${RED} Please select a valid option" fi @@ -61,19 +98,15 @@ sudo apt install ros-$ROS_DISTRO-cyclonedds #Install xterm - useful when sudo apt install xterm -git clone --branch master https://github.com/neobotix/neo_msgs2 || { true; echo -e "${YELLOW} Continuing with the installation"; } -git clone --branch master https://github.com/neobotix/neo_srvs2 || { true; echo -e "${YELLOW} Continuing with the installation"; } +git clone --branch master https://github.com/neobotix/neo_msgs2 +git clone --branch master https://github.com/neobotix/neo_srvs2 -if [ "$ROS_DISTRO" == "iron" ]; then - git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git || { true; echo -e "${YELLOW} Continuing with the installation"; } -fi - -cd ~/client_workspace +cd ~/client_nbx_ws # Install relevant dependencies rosdep install --from-paths ./src/rox/rox_navigation/ ./src/rox/rox_description --ignore-src --rosdistro $ROS_DISTRO -r -y || { true; echo -e "${YELLOW} Finishing the setup"; } -cd ~/client_workspace/src +cd ~/client_nbx_ws/src if [[ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" || "$robot_model" == "rox" ]]; then while [[ "$uni_ans" != "y" && "$uni_ans" != "n" ]]; do @@ -82,10 +115,10 @@ if [[ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" || "$robot_mode if [ "$uni_ans" == "y" ]; then if [[ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" ]]; then - git clone --branch main https://github.com/neobotix/neo_mpo_moveit2.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } + git clone --branch main https://github.com/neobotix/neo_mpo_moveit2.git rosdep install --from-paths ./neo_mpo_moveit2 --ignore-src --rosdistro $ROS_DISTRO -r -y || { true; echo -e "${YELLOW} Finishing the setup"; } elif [ "$robot_model" == "rox" ]; then - git clone --branch main https://github.com/neobotix/neo_rox_moveit2.git || { true; echo -e ${YELLOW} "Continuing with the installation"; } + git clone --branch main https://github.com/neobotix/neo_rox_moveit2.git rosdep install --from-paths ./neo_rox_moveit2 --ignore-src --rosdistro $ROS_DISTRO -r -y || { true; echo -e "${YELLOW} Finishing the setup"; } else uni_ans = "n" @@ -94,14 +127,16 @@ if [[ "$robot_model" == "mpo_500" || "$robot_model" == "mpo_700" || "$robot_mode done fi -cd ~/client_workspace +cd ~/client_nbx_ws echo -e "${WHITE}" # build workspace colcon build --symlink-install -echo "source ~/client_workspace/install/setup.bash" >> ~/.bashrc +echo "source ~/client_nbx_ws/install/setup.bash" >> ~/.bashrc + +echo "Setting CycloneDDS as the Middleware" echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc From 1d4275635ba4b44588153eaf2ef48a7d8c6daf73 Mon Sep 17 00:00:00 2001 From: Pradheep Date: Fri, 11 Oct 2024 10:59:45 +0200 Subject: [PATCH 14/17] neo_nav2_bringup is a binary now --- package-setup/setup-mp-robot.sh | 4 ---- package-setup/setup-mp_400.sh | 1 - package-setup/setup-mp_500.sh | 1 - package-setup/setup-mpo_500.sh | 1 - package-setup/setup-mpo_700.sh | 1 - package-setup/setup-rox.sh | 4 ---- 6 files changed, 12 deletions(-) diff --git a/package-setup/setup-mp-robot.sh b/package-setup/setup-mp-robot.sh index 2fc0569..8d7416e 100755 --- a/package-setup/setup-mp-robot.sh +++ b/package-setup/setup-mp-robot.sh @@ -120,10 +120,6 @@ git clone --branch master https://github.com/neobotix/neo_msgs2 git clone --branch master https://github.com/neobotix/neo_srvs2 git clone https://github.com/neobotix/joystick_drivers.git -if [ "$ROS_DISTRO" == "iron" ]; then - git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git -fi - if [[ "$robot_model" == "mp_400" || "$robot_model" == "mp_500" ]]; then git clone --branch main https://github.com/neobotix/neo_kinematics_differential2.git elif [ "$robot_model" == "mpo_500" ]; then diff --git a/package-setup/setup-mp_400.sh b/package-setup/setup-mp_400.sh index 79ea1c1..1cd076a 100755 --- a/package-setup/setup-mp_400.sh +++ b/package-setup/setup-mp_400.sh @@ -42,7 +42,6 @@ cd mp_400_workspace/src # clone git repos here... git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_mp_400-2.git -git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_local_planner2.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_localization2.git git clone --branch master https://github.com/neobotix/neo_common2 diff --git a/package-setup/setup-mp_500.sh b/package-setup/setup-mp_500.sh index ce76395..bf66c1c 100755 --- a/package-setup/setup-mp_500.sh +++ b/package-setup/setup-mp_500.sh @@ -39,7 +39,6 @@ cd mp_500_workspace/src # clone git repos here... git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_mp_500-2.git -git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_local_planner2.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_localization2.git git clone --branch master https://github.com/neobotix/neo_common2 diff --git a/package-setup/setup-mpo_500.sh b/package-setup/setup-mpo_500.sh index 81f9e86..3dce6e6 100755 --- a/package-setup/setup-mpo_500.sh +++ b/package-setup/setup-mpo_500.sh @@ -42,7 +42,6 @@ cd mpo_500_workspace/src # clone git repos here... git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_mpo_500-2.git -git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_local_planner2.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_localization2.git git clone --branch master https://github.com/neobotix/neo_common2 diff --git a/package-setup/setup-mpo_700.sh b/package-setup/setup-mpo_700.sh index 94e3c27..b75519c 100755 --- a/package-setup/setup-mpo_700.sh +++ b/package-setup/setup-mpo_700.sh @@ -47,7 +47,6 @@ cd mpo_700_workspace/src # clone git repos here... git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_mpo_700-2.git -git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_local_planner2.git git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_localization2.git git clone --branch master https://github.com/neobotix/neo_common2 diff --git a/package-setup/setup-rox.sh b/package-setup/setup-rox.sh index 208cfe4..af334cf 100755 --- a/package-setup/setup-rox.sh +++ b/package-setup/setup-rox.sh @@ -121,10 +121,6 @@ git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_teleop2 git clone --branch master https://github.com/neobotix/neo_msgs2 git clone --branch master https://github.com/neobotix/neo_srvs2 -if [ "$ROS_DISTRO" == "iron" ]; then - git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_nav2_bringup.git -fi - if [ "$kinematics" == "argo" ]; then git clone --branch main https://github.com/neobotix/rox_argo_kinematics.git elif [ "$kinematics" == "diff" ]; then From 481c941cea3a79c6221fb23824b4e948300de37f Mon Sep 17 00:00:00 2001 From: Pradheep Date: Fri, 11 Oct 2024 13:11:01 +0200 Subject: [PATCH 15/17] update abort --- package-setup/setup-client.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package-setup/setup-client.sh b/package-setup/setup-client.sh index 3ecfd48..0186701 100755 --- a/package-setup/setup-client.sh +++ b/package-setup/setup-client.sh @@ -49,6 +49,8 @@ if [ "$ROS_DISTRO" == "" ]; then else echo -e "${RED} Please source any one of the ROS Distros above and try again later" echo -e "${RED} Example: source /opt/ros/YOUR_DISTRO/setup.bash" + echo "Abort" + exit 0 fi fi From e4046d15e00d50f7612070c7cfd9e84b936a9457 Mon Sep 17 00:00:00 2001 From: Pradheep Date: Fri, 11 Oct 2024 13:12:32 +0200 Subject: [PATCH 16/17] setting up ROX simulation from the script --- package-setup/setup-rox-simulation.sh | 107 ++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100755 package-setup/setup-rox-simulation.sh diff --git a/package-setup/setup-rox-simulation.sh b/package-setup/setup-rox-simulation.sh new file mode 100755 index 0000000..222e39d --- /dev/null +++ b/package-setup/setup-rox-simulation.sh @@ -0,0 +1,107 @@ +#!/bin/bash + +# exit if any command below fails +set -e +GREEN='\033[0;32m' +RED='\033[0;31m' +YELLOW='\033[0;33m' +WHITE='\033[0;37m' + +echo "Welcome to the support assistant for setting up the ROX Simulation packages" +echo "The workspace will be created in the /home/USER/ folder. In the future, we will add the option, to create the workspace in any desired directory" + +# Check if ROS is sourced +empty_ros_distro=true +ros_distros=" " +if [ "$ROS_DISTRO" == "" ]; then + echo "ROS Distro is not sourced." + for dir in /opt/ros/*/; do + if [ "$(ls -A "$dir")" ]; then + empty_ros_distro=false + echo -e "$GREEN" + echo " " $(basename "$dir") + fi + done + + if [ $empty_ros_distro == true ]; then + echo "ROS 2 is not installed at all" + echo "Please continue the installation once ROS 2 is installed" + echo "Abort" + else + echo -e "${RED} Please source any one of the ROS Distros above and try again later" + echo -e "${RED} Example: source /opt/ros/YOUR_DISTRO/setup.bash" + echo "Abort" + exit 0 + fi +fi + +# Check if the client ws is already there in the home folder +cd ~/ +is_ws_installed="" + +if [ -d "${ROS_DISTRO}_ws" ]; then + echo "${ROS_DISTRO}_ws already exists." + echo -n "Do you want to delete it before continuing? (Y/n)" + read is_ws_installed + + if [[ "$is_ws_installed" == "y" || "$is_ws_installed" == "Y" ]]; then + echo -e " Deleting.." + rm -rf ${ROS_DISTRO}_ws + echo -e " ${ROS_DISTRO}_ws has been deleted" + else + echo "Abort" + exit 0 + fi +fi + +uni_ans="" +robot_model="" + +# Go to home directory +cd ~ + +skip_depend="phidgets-drivers ur_client_library ur_msgs ur_robot_driver" + +# Install build tool +sudo apt install python3-colcon-common-extensions + +#Install xterm + +sudo apt install xterm + +cd ~ + +directory="${ROS_DISTRO}_ws/src" +directory_root="${ROS_DISTRO}_ws" + +mkdir -p "$directory" +cd "$directory" + +# clone git repos here... +git clone --branch $ROS_DISTRO https://github.com/neobotix/rox.git +git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_local_planner2.git +git clone --branch $ROS_DISTRO https://github.com/neobotix/neo_localization2.git +git clone --branch master https://github.com/neobotix/neo_common2 +git clone --branch master https://github.com/neobotix/neo_msgs2 +git clone --branch master https://github.com/neobotix/neo_srvs2 +git clone --branch main https://github.com/neobotix/neo_gz_worlds.git + +cd .. + +echo "skipping to install following dependencies:" $skip_depend +# Install relevant dependencies +rosdep install --from-paths ./src --ignore-src --rosdistro $ROS_DISTRO -r --skip-keys "$skip_depend" + +# build workspace +colcon build --symlink-install + +echo "export LC_NUMERIC="en_US.UTF-8" " >> ~/.bashrc + +echo "source ~/"$directory_root"/install/setup.bash" >> ~/.bashrc + +echo "Installation successful !!!" + +# Temporarily setting up the GZ_RESOURCE_PATH from here +echo "export IGN_GAZEBO_RESOURCE_PATH=~/"$directory"/rox/:~/"$directory"/neo_gz_worlds/models" >> ~/.bashrc + +exit 0 \ No newline at end of file From 5294fd9df676b1dea71fe5fb46c95cb86f8ea622 Mon Sep 17 00:00:00 2001 From: Pradheep Date: Wed, 16 Oct 2024 15:44:16 +0200 Subject: [PATCH 17/17] adding cyclonedds installation --- package-setup/setup-rox-simulation.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package-setup/setup-rox-simulation.sh b/package-setup/setup-rox-simulation.sh index 222e39d..8c444aa 100755 --- a/package-setup/setup-rox-simulation.sh +++ b/package-setup/setup-rox-simulation.sh @@ -63,8 +63,13 @@ cd ~ skip_depend="phidgets-drivers ur_client_library ur_msgs ur_robot_driver" # Install build tool +echo "Installing colcon extensions" sudo apt install python3-colcon-common-extensions +# Installing CycloneDDS +echo "Installing CycloneDDS" +sudo apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp + #Install xterm sudo apt install xterm