Robotics StackExchange | Archived questions

RTPS TRANSPORT SHM Error

Hello Everyone, I get the following error when i let run some small example from ros2

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

has anyone experienced this before? After error issue, the program is still running correct. i would like to fix it

Asked by kolasha on 2021-10-15 07:42:38 UTC

Comments

Yes, I am getting this now trying to start a python app. Nothing has changed with the code, seems to be an underlying system issue. Were you able to resolve it?

Asked by guru_florida on 2021-11-08 10:45:57 UTC

Answers

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!

Asked by Andreas Z on 2023-02-01 09:56:46 UTC

Comments