Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

robot_state_publisher crashes when using FastRTPS #1021

Open
wawanbreton opened this issue Jun 21, 2022 · 2 comments
Open

robot_state_publisher crashes when using FastRTPS #1021

wawanbreton opened this issue Jun 21, 2022 · 2 comments
Assignees

Comments

@wawanbreton
Copy link

wawanbreton commented Jun 21, 2022

When starting a simple robot_state_publisher node and using FastRTPS, the node crashes with the following error :

RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 launch my_package robot_base.launch.py
[INFO] [robot_state_publisher-1]: process started with pid [498]
[robot_state_publisher-1] terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
[robot_state_publisher-1]   what():  could not create publisher: Type support not from this implementation. Got:
[robot_state_publisher-1]     Handle's typesupport identifier (rosidl_typesupport_cpp) is not supported by this library, at /usr/src/debug/rosidl-typesupport-cpp/1.2.1-3-r0/git/src/type_support_dispatch.hpp:111
[robot_state_publisher-1]     Could not load library libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so: dlopen error: /usr/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so: undefined symbol: _ZN22unique_identifier_msgs3msg24typesupport_fastrtps_cpp19get_serialized_sizeERKNS0_5UUID_ISaIvEEEm, at /usr/src/debug/rcutils/4.0.2-2-r0/git/src/shared_library.c:99, at /usr/src/debug/rosidl-typesupport-cpp/1.2.1-3-r0/git/src/type_support_dispatch.hpp:76
[robot_state_publisher-1] while fetching it, at /usr/src/debug/rmw-fastrtps-cpp/5.0.1-1-r0/git/src/publisher.cpp:117, at /usr/src/debug/rcl/3.1.2-1-r0/git/src/rcl/publisher.c:114
[ERROR] [robot_state_publisher-1]: process has died [pid 498, exit code -6, cmd '/usr/lib/robot_state_publisher/robot_state_publisher --ros-args --params-file /tmp/launch_params_bz79aypr --params-file /tmp/launch_params_m8zgled1'].

This does not happen when using CycloneDDS (default)
My launch file is very basic and only starts a robot_state_publisher with the proper robot description from URDF.

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "raspberrypi4-64"
DISTRO               = "poky"
DISTRO_VERSION       = "3.1.13"
TUNE_FEATURES        = "aarch64 cortexa72 crc crypto"
TARGET_FPU           = ""
DISTRO_NAME          = "Poky (Yocto Project Reference Distro)"
ROS_DISTRO           = "galactic"
ROS_VERSION          = "2"
ROS_PYTHON_VERSION   = "3"
meta                 
meta-poky            
meta-yocto-bsp       = "<unknown>:<unknown>"
meta-raspberrypi     = "dunfell:934064a01903b2ba9a82be93b3f0efdb4543a0e8"
meta-oe              
meta-networking      
meta-python          = "<unknown>:<unknown>"
meta-ros2-galactic   
meta-ros-common      
meta-ros2            
meta-ros-backports-gatesgarth 
meta-ros-backports-hardknott = "dunfell:cd2e0d0625385ca821aa5129d20805640ac80734"
meta-qt5             = "master:b64b0a213240375e697185de06c3f502c65cdee7"
                     = "new-localization:c2df39275c1098fcff4774de82f453e2fcfb0779"

I have seen a very similar error output on this issue, but I don't know if it has explicitely been fixed nor how.

I have checked dependancies to fastrtps, but everything seems fine. It seems that tf2-msgs have not been properly built. However, nav-msgs and even my custom messages work well.

@wawanbreton
Copy link
Author

wawanbreton commented Jun 22, 2022

I have spent some time finding the root cause of this. It seems that the package unique-identifier-msgs is not build with FastRTPS support. By adding a unique-identifier-msgs_%.bbappend file containing this :

ROS_BUILD_DEPENDS += "builtin-interfaces"

ROS_BUILDTOOL_DEPENDS += "rosidl-typesupport-fastrtps-cpp-native"
ROS_BUILDTOOL_DEPENDS += "rosidl-typesupport-fastrtps-c-native"

The error is gone and it works fine.

However, this is probably not the best way to fix it. It seems to happen to unique-identifier-msgs because it has no dependancy to other message types. So it may happen to other packages too (seems to be the case for lifecycle-msgs).

@wawanbreton
Copy link
Author

std-srvs package is concerned too

@robwoolley robwoolley self-assigned this Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants