ros2 humble publisher and cyclone dds subscriber

asked 2023-07-14 09:36:20 -0600

vico gravatar image

updated 2023-07-14 10:18:25 -0600

gvdhoorn gravatar image

Hey, i am trying to implement a chain of ros2 humble subscriber and publisher which in the end publish to a native cyclone-dds subscriber which then again publishes to a cyclone-dds subscriber(to measure the message time it takes to pass all nodes). I have finished the parts where only humble or cyclone-dds is used, but I failed to communicate between the ros2 publisher and the follow-up cyclone-dds subscriber.

I am publishing a string and therefor use <std_msgs::msg::String>in humble. In cyclone-dds i am currently using the default example(https://cyclonedds.io/docs/cyclonedds/latest/getting_started/helloworld/helloworld_building.html) and therefor use the HelloWorldData_Msg_desc created by HelloWorldData.idl

module HelloWorldData
{
    struct Msg
    {
        @key long userID;
        string message;
    };
};

They have a different message type and my question is now if it is smarter to modify the message in ros2 humble or the receiving cyclone dds message? I am not sure how it works with .msg, .idl and the rosidl_generator_dds_idl and how they communicate with each other. Do I manually have to convert the .msg into .idl?

Can somebody please help me with this or provide some useful links I can check out.

PS: I always used rmw_cyclonedds_cpp as my middleware.

In these images you can see the publisher in humble (rt/sensor_data) and the subsciber in cyclone dds (/sensor_data)

C:\fakepath\Screenshot from 2023-07-12 15-42-17.png

C:\fakepath\Screenshot from 2023-07-12 15-39-37.png

edit retag flag offensive close merge delete