From 0e4c6cec8c3fb80f0833862697137d3cdf86f49d Mon Sep 17 00:00:00 2001 From: tjcanro Date: Sun, 29 Sep 2024 23:30:31 -0400 Subject: [PATCH 1/5] Added ros2 humble installation to setup script --- scripts/install.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index 75e50065d..af266112a 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -210,7 +210,60 @@ fi cat < /dev/null + +sudo apt update && sudo apt install -y \ + python3-flake8-docstrings \ + python3-pip \ + python3-pytest-cov \ + ros-dev-tools + +python3 -m pip install -U \ + flake8-blind-except \ + flake8-builtins \ + flake8-class-newline \ + flake8-comprehensions \ + flake8-deprecated \ + flake8-import-order \ + flake8-quotes \ + "pytest>=5.3" \ + pytest-repeat \ + pytest-rerunfailures + +mkdir -p ~/ros2_humble/src +cd ~/ros2_humble +vcs import --input https://raw.githubusercontent.com/ros2/ros2/humble/ros2.repos src + +sudo apt upgrade + +# Initialize rosdep +sudo apt-get install python3-rosdep + +# Update rosdep +sudo rm -rf /etc/ros/rosdep/sources.list.d/* # Delete this file first - if not deleted, error could be thrown +sudo rosdep init +sudo rosdep update +rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers" + +# Restore path +cd ~/catkin_ws/src/mil/ + + +cat < Date: Mon, 30 Sep 2024 00:00:12 -0400 Subject: [PATCH 2/5] added ros2 humble build to installation script --- scripts/install.sh | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index af266112a..1ce43a54e 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -221,25 +221,25 @@ sudo add-apt-repository universe sudo apt update && sudo apt install curl -y sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg -echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list >/dev/null sudo apt update && sudo apt install -y \ - python3-flake8-docstrings \ - python3-pip \ - python3-pytest-cov \ - ros-dev-tools + python3-flake8-docstrings \ + python3-pip \ + python3-pytest-cov \ + ros-dev-tools python3 -m pip install -U \ - flake8-blind-except \ - flake8-builtins \ - flake8-class-newline \ - flake8-comprehensions \ - flake8-deprecated \ - flake8-import-order \ - flake8-quotes \ - "pytest>=5.3" \ - pytest-repeat \ - pytest-rerunfailures + flake8-blind-except \ + flake8-builtins \ + flake8-class-newline \ + flake8-comprehensions \ + flake8-deprecated \ + flake8-import-order \ + flake8-quotes \ + "pytest>=5.3" \ + pytest-repeat \ + pytest-rerunfailures mkdir -p ~/ros2_humble/src cd ~/ros2_humble @@ -256,10 +256,12 @@ sudo rosdep init sudo rosdep update rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers" +cd ~/ros2_humble/ +colcon build --symlink-install + # Restore path cd ~/catkin_ws/src/mil/ - cat < Date: Sun, 13 Oct 2024 21:03:07 -0400 Subject: [PATCH 3/5] added more compstible foxy ros2 installation --- scripts/install.sh | 41 ++++++----------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 1ce43a54e..e769bea5c 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -211,7 +211,7 @@ cat </dev/null -sudo apt update && sudo apt install -y \ - python3-flake8-docstrings \ - python3-pip \ - python3-pytest-cov \ - ros-dev-tools - -python3 -m pip install -U \ - flake8-blind-except \ - flake8-builtins \ - flake8-class-newline \ - flake8-comprehensions \ - flake8-deprecated \ - flake8-import-order \ - flake8-quotes \ - "pytest>=5.3" \ - pytest-repeat \ - pytest-rerunfailures - -mkdir -p ~/ros2_humble/src -cd ~/ros2_humble -vcs import --input https://raw.githubusercontent.com/ros2/ros2/humble/ros2.repos src - +sudo apt update sudo apt upgrade -# Initialize rosdep -sudo apt-get install python3-rosdep +sudo apt install ros-foxy-desktop python3-argcomplete -# Update rosdep -sudo rm -rf /etc/ros/rosdep/sources.list.d/* # Delete this file first - if not deleted, error could be thrown -sudo rosdep init -sudo rosdep update -rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers" - -cd ~/ros2_humble/ -colcon build --symlink-install +sudo apt install ros-dev-tools # Restore path cd ~/catkin_ws/src/mil/ @@ -265,7 +236,7 @@ cd ~/catkin_ws/src/mil/ cat <>~/.zshrc fi else - # User is using zsh + # User is using bash if grep -Fq "$BASH_RC_LINES" ~/.bashrc; then echo "milrc is already sourced in ~/.bashrc, skipping" else From 04888836c2d7a207f8e6122bd9f730fd92ce55cb Mon Sep 17 00:00:00 2001 From: tjcanro Date: Sun, 13 Oct 2024 22:42:06 -0400 Subject: [PATCH 4/5] added bridge environment variables --- scripts/setup.bash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/setup.bash b/scripts/setup.bash index fa3d442af..9f6e4d04a 100755 --- a/scripts/setup.bash +++ b/scripts/setup.bash @@ -201,3 +201,6 @@ export PYTHONPATH="${HOME}/catkin_ws/src/mil/mil_common/perception/vision_stack/ # Ensure that VRX does _not_ exit on completion, as we're not in a time-limited # environment, and exiting too early would not let us debug as much! export VRX_EXIT_ON_COMPLETION=0 + +export ROS1_INSTALL_PATH=/opt/ros/noetic +export ROS2_INSTALL_PATH=/opt/ros/foxy From 02a9bbabe6617a08b021c98c9411c0fe0914afab Mon Sep 17 00:00:00 2001 From: tjcanro Date: Sun, 13 Oct 2024 22:59:03 -0400 Subject: [PATCH 5/5] build fix --- scripts/install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index e769bea5c..1af687dee 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -215,10 +215,10 @@ $(color "$Pur")Installing ROS2 Foxy and dependencies... $(hash_header)$(color "$Res") EOF -sudo apt install software-properties-common +mil_system_install software-properties-common sudo add-apt-repository universe -sudo apt update && sudo apt install curl -y +sudo apt update && mil_system_install curl sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list >/dev/null @@ -226,9 +226,11 @@ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-a sudo apt update sudo apt upgrade -sudo apt install ros-foxy-desktop python3-argcomplete +mil_system_install ros-foxy-desktop python3-argcomplete -sudo apt install ros-dev-tools +mil_system_install ros-dev-tools + +mil_system_install ros-foxy-ros1-bridge # Restore path cd ~/catkin_ws/src/mil/