Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 2.19 KB

README-UBUNTU.md

File metadata and controls

69 lines (55 loc) · 2.19 KB

ROS2CS - Ubuntu 20.04 and Ubuntu 22.04

Building

Prerequisites

General

  • ROS2 installed on the system, along with test-msgs, cyclonedds and fastrtps packages
  • vcstool package - see here
  • .NET 6.0 sdk - see here
# Install rmw and tests-msgs for your ROS2 distribution
apt install -y ros-${ROS_DISTRO}-test-msgs
apt install -y ros-${ROS_DISTRO}-fastrtps ros-${ROS_DISTRO}-rmw-fastrtps-cpp
apt install -y ros-${ROS_DISTRO}-cyclonedds ros-${ROS_DISTRO}-rmw-cyclonedds-cpp

# Install vcstool package
curl -s https://packagecloud.io/install/repositories/dirk-thomas/vcstool/script.deb.sh | sudo bash
sudo apt-get update
sudo apt-get install -y python3-vcstool

# Install Microsoft packages (Ubuntu 20.04 only)
wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

# install .NET core 6.0 SDK
sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-6.0

Optional

  • patchelf tool for standalone version builds
sudo apt install patchelf

Steps

  • Clone this project
  • Source your ROS2 installation
    # Change foxy to whatever version you are using
    source /opt/ros/foxy/setup.bash
  • Navigate to the top project folder and pull required repositories
    ./get_repos.sh
    • You can run get_repos script with --get-custom-messages argument to fetch extra messages from custom_messages.repos file.
    • It will use vcstool to download required ROS2 packages. By default, this will get repositories as set in ros2_${ROS_DISTRO}.repos.
  • Build package in overlay mode:
    ./build.sh
    or to build a standalone version:
    ./build.sh --standalone
    • It invokes colcon_build with --merge-install argument to simplify libraries installation.
    • You can build tests by adding --with-tests argument to command.
  • To test your build please check main readme Testing section