Skip to content

Commit

Permalink
ros2 experiment support
Browse files Browse the repository at this point in the history
  • Loading branch information
slavikyd committed Sep 12, 2023
1 parent 8e53441 commit e8dcb6e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
29 changes: 29 additions & 0 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,33 @@ function px4clover_install_build(){

}

### EXPERIMENTAL FEATURE
function ros2_install_and_build_test(){

sudo apt update && sudo apt install curl gnupg2 lsb-release
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 $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

echo "Downloading core ROS2 packages"
xdg-open https://github.com/ros2/ros2/releases/download/release-iron-20230912/ros2-iron-20230912-linux-jammy-amd64.tar.bz2
echo "Done"
mkdir -p ~/ros2_dashing
cd ~/ros2_dashing
tar xf ~/Downloads/ros2-dashing-linux-x86_64.tar.bz2

sudo apt update
sudo apt install -y python-rosdep
sudo rosdep init
rosdep update
#rosdep dependencies
rosdep install --from-paths ~/ros2_dashing/ros2-linux/share --ignore-src --rosdistro dashing -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 osrf_testing_tools_cpp poco_vendor rmw_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_connext_cpp rti-connext-dds-5.3.1 tinyxml_vendor tinyxml2_vendor urdfdom urdfdom_headers"

sudo apt install -y libpython3-dev python3-pip
pip3 install -U argcomplete

. ~/ros2_dashing/ros2-linux/setup.bash

echo "looks like it worked out after all..."
exit 0
}
9 changes: 9 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@ then
ros_install_and_build_22

px4clover_install_build
#test
elif [[ $ver -eq 99 ]]
then
echo "are you sure?"
read answ
if [[ $answ == "yes" ]]
then
ros2_install_and_build_test
fi
fi

0 comments on commit e8dcb6e

Please sign in to comment.