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

RTPS_TRANSPORT_SHM Error and at the same time no topics are available in ros2 topic list

asked 2022-01-15 16:15:48 -0500

pablo.arandarod gravatar image

updated 2022-01-15 16:19:40 -0500

I've been working in some of my projects and used also the Dolly to check if something similar was going on, and it seems it isn't isolated to my project. The error that I encounter is:

[RTPS_TRANSPORT_SHM Error] Failed init_port fastrtps_port7413: open_and_lock_file failed -> Function open_port_internal

Also, I'm being unable to list the topics when using ros2 topic list (since in my project the robot spawns in the environment, and in the case of Dolly, Rviz opens, I guess the topics are working in those cases). Only 2 of them appear, parameter_events and rosout.

It might be or not related to this, but I have ROS2 foxy installed in my home directory, but when installing additional packages they get automatically installed in /opt/ros/foxy, so I have to source them both.

edit1: when I try the talker example that appear in the installation tutorial no new nodes or topics are listed.

edit retag flag offensive close merge delete

Comments

I have the same Error. I'm running different applications in dockers and it seems to come from different Fast-RTPS versions. Although I could not figure out which ones are compatible. I just updated Fast-RTPS on the host machine and the dockers are somehow affected. Did you figure out a solution to your problem?

Andreas Z gravatar image Andreas Z  ( 2022-11-24 13:58:05 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-02-01 08:55:38 -0500

Andreas Z gravatar image

I found a solution that worked for me. The problem are different rmw_fastrtps versions.
Probably Dolly is built with a different version as your normal ros2 foxy system.
To check your available version do:

ros2 doctor --report | grep fastrtps

The newest version for Ubuntu 20.04 and ROS2 Foxy should be:

rmw_fastrtps_shared_cpp = 1.3.1
rmw_fastrtps_cpp = 1.3.1

This bug fix removes the problem: commit
But you have to install it on every system.

To update these packages either do separate:

sudo apt update &&  sudo apt install ros-foxy-rmw-fastrtps-cpp ros-foxy-rmw-fastrtps-shared-cpp

or update all old packages with:

apt update && apt  dist-upgrade

A restart is required after you already encountered the error once!

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-01-15 16:15:48 -0500

Seen: 5,265 times

Last updated: Feb 01 '23