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

[ROS 2] How is the name of the typesupport library generated?

asked 2019-12-18 14:45:16 -0500

alsora gravatar image

updated 2019-12-18 14:45:43 -0500

Hi,

I have a package where I create custom messages.

In my application I create a subscription that uses this custom type. If I look into the RMW implementation code (FastRTPS for example) I think I found where the typesupport library is loaded

  const rosidl_message_type_support_t * type_support = get_message_typesupport_handle(
    type_supports, rosidl_typesupport_introspection_c__identifier);
  if (!type_support) {
    type_support = get_message_typesupport_handle(
      type_supports, rosidl_typesupport_introspection_cpp::typesupport_identifier);
    if (!type_support) {
      RMW_SET_ERROR_MSG("type support not from this implementation");
      return nullptr;
    }
  }

https://github.com/ros2/rmw_fastrtps/...

As you can see, this uses a type_supports handle and an identifier. These are used to genereate the name of a shared library (for example my_custom_msg_rosidl_typesupport_fastrtps_cpp)

I would like to know where is the code that generates that name

thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-01-14 17:18:08 -0500

Dirk Thomas gravatar image

The rosidl_typesupport_cppperforms the dispatch (in case there is more than one typesupport library available for C++). It happens in this file: https://github.com/ros2/rosidl_typesu...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-12-18 14:45:16 -0500

Seen: 742 times

Last updated: Jan 14 '20