ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Installing fastdds on ros2 galactic / rolling

asked 2021-05-10 12:30:26 -0500

Kristofer gravatar image

Hi,

In the latest ros2 variants for rolling and galactic, fastdds is no longer included in the base and core variants. Are there a simple, pre-built way of installing fastdds-support in galactic / rolling? I haven't found how it was built and included in the previous variant (that generates the apt install variants). It would be nice to have an apt install to just include the necessary pre-built binaries. Does that exists?

Currently, I am trying to include all necessary repositories and build rmw_fastrtps in my docker file that is based on ros:rolling-ros-base-focal. But since i do not know how to get all dependencies, i have to include packages and try to build the docker file, and based on the failure, add more packages. But there are a lot various ros packages that needs to be built and it does not feel like the correct way to pull them all and do colcon build. My feeling is that i need the complete desktop install to build it, but i would like to avoid that since i want just core and fastdds in my final docker files.

// Kristofer

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-05-10 14:39:29 -0500

gvdhoorn gravatar image

updated 2021-05-11 03:05:17 -0500

The packages are all there, same as in Foxy.

Selecting a different RMW from the default: Working with multiple ROS 2 middleware implementations.

I am trying to include all necessary repositories and build rmw_fastrtps in my docker file that is based on ros:rolling-ros-base-focal. But since i do not know how to get all dependencies, i have to include packages and try to build the docker file, and based on the failure, add more packages.

Similar to what I wrote in Core, base and desktop releases on ROS Discourse, you can use rosinstall_generator to generate .repos/.rosinstall files which contain all dependencies for a particular package. It doesn't just work with the variant pkgs.

But there are .debs, so apt would probably be easier.


Edit:

i have experimented with the rosinstall_generator and was able to get some help, but it was still far from trivial to make it all build in my dockerfile. [..] It would be nice to have an apt install to just include the necessary pre-built binaries. Does that exists?

Just to make sure: there are .debs available, so any system with the ROS 2 package repositories configured should just do (for Rolling, replace galactic with rolling):

sudo apt install ros-galactic-rmw-fastrtps-cpp

and then change the RMW_IMPLEMENTATION environment variable.

Having written that: if you still want to build the FastDDS RMW from source, the following steps seem to work for me, and would be the regular way to build ROS 2 (and ROS 1) packages in a Colcon workspace (although you'd use catkin_make or catkin build in the case of a Catkin workspace):

source /opt/ros/galactic/setup.bash
mkdir -p $HOME/colcon_ws/src && cd $HOME/colcon_ws
rosinstall_generator \
  rmw_fastrtps_cpp \
  --deps \
  --tar \
  --exclude-path=/opt/ros/rolling/share \
  --format=repos \
  > fastdds.repos
vcs import src --input fastdds.repos
rosdep install --from-paths=$HOME/colcon_ws/src --ignore-src -y
colcon build

after source-ing the correct setup.bash, the rmw_fastrtps_cpp package should be available to you.

The process of building packages from source in a Colcon workspace (including resolving and installing dependencies) is explained in Creating a workspace.

So it would be great with an easier way to install fastdds now that it is not included in base and core

see above. It doesn't get easier than using apt I believe (on Debian/Ubuntu).

Perhaps Installing DDS implementations should be updated with instructions for FastDDS, similar to how there is a page for Cyclone (it would be largely identical to that page of course, except for the names of the packages).

If you'd like to see that happen, I'd suggest opening an issue on the ros2_documentation issue tracker, as asking for this in a ROS Answers Q&A is not going to have much visibility.

And it was not obvious for me what to copy to the core images.

I'm not sure what you mean by this.

edit flag offensive delete link more

Comments

i have experimented with the rosinstall_generator and was able to get some help, but it was still far from trivial to make it all build in my dockerfile. And it was not obvious for me what to copy to the core images. So it would be great with an easier way to install fastdds now that it is not included in base and core. But maybe that is more of an issue for the developers of fastdds. There are no real documentation about this since it hasn't been necessary before.

Thanks for the fast response!

// K

Kristofer gravatar image Kristofer  ( 2021-05-10 15:11:38 -0500 )edit

I'd suggest opening an issue on the ros2_documentation issue tracker, as asking for this in a ROS Answers Q&A is not going to have much visibility.

seems you did that: ros2/ros2_documentation#1488.

gvdhoorn gravatar image gvdhoorn  ( 2021-05-11 05:46:33 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-05-10 12:30:26 -0500

Seen: 436 times

Last updated: May 11 '21