Description
-
Installing ROS2 Dashing using APT in a Linux environment
-
Test environment: Ubuntu 18.04 + ROS2 Dashing
Installation Steps
- Set the language environment
$ sudo locale-gen en_US en_US.UTF-8
$ sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
$ export LANG=en_US.UTF-8
- Add the key
$ sudo apt update && sudo apt install curl gnupg2 lsb-release
$ curl http://repo.ros2.org/repos.key | sudo apt-key add -
- Then add the repository to the source list:
$ sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
- Install the ROS2 package
$ sudo apt update && sudo apt install ros-dashing-desktop
- Install argcomplete
$ sudo apt install python3-argcomplete
- Sourcing the setup script in .bashrc
$ echo "source /opt/ros/dashing/setup.bash" >> ~/.bashrc
- Install additional middleware
$ sudo apt update
$ sudo apt install ros-dashing-rmw-opensplice-cpp # for OpenSplice
$ sudo apt install ros-dashing-rmw-connext-cpp # for RTI Connext (requires license agreement)
-
By setting the environment variable
<span>RMW_IMPLEMENTATION=rmw_opensplice_cpp</span>, you can switch to use OpenSplice instead. For ROS 2 releases Bouncy and newer,<span>RMW_IMPLEMENTATION=rmw_connext_cpp</span>can also be selected to use RTI Connext. -
If you want to install the Connext DDS-Security plugins please refer to this page.
-
University, purchase or evaluation options are also available for RTI Connext.
Testing Usage
- In a new terminal, run the talker example
$ ros2 run demo_nodes_cpp talker
- In a new terminal, run the listener example
$ ros2 run demo_nodes_py listener

