Rosanswers logo

I have currently a faint understanding of the ROS2 system. I read that in ROS2 the msg files are converted into idl files before publishing and then these idl files are used for publishing and subscribing. In this image, how can i understand the circled part, ROS to DDS conversion functions...shouldnt there be an arrow as shown ? e.g. with help of these conversion functions, idl files are generated from msg files ?


I need to somehow access these idl or msg files and perform read and write operations ? Is there a possibility that i can do that ? Are there some examples ?

Originally posted by aks on ROS Answers with karma: 667 on 2018-06-04

Post score: 1


1 Answer 1


Rosanswers logo

The diagram only indicates how the information flows. The conversion functions mapping ROS messages to DDS messages are being generated for each DDS implementation (using their native vendor-specific DDS types). As input these templates only need the message definitions - it doesn't need any information from the .idl files - since those are generated from the message definitions themselves they don't contain any more information.

For the generated source code there is a dependency from the conversion functions on the DDS message classes as they are in e.g. C++ being included.

I am not sure what "read and write operations" you are intending to do. You will find the .idl files after building a package under <install>/share/<pkgname>/msg|srv/dds_connext|dds_opensplice. They are being generated and installed by the rosidl_generator_dds_idl package.

Originally posted by Dirk Thomas with karma: 16276 on 2018-07-05

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by golizheh_66 on 2019-11-01:
Could explain how can I use rosidl_generator_dds_idl packages? I want to convert image.msg to image.idl Thanks and look forward to hearing from you

Comment by Dirk Thomas on 2019-11-03:
You don't need to invoke rosidl_generator_dds_idl directly. It is being trigger implicitly when your message package calls rosidl_generate_interfaces().


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.