IDL to .msg interfacing with ROS2

3 posts / 0 new
Last post
Offline
Last seen: 5 years 2 months ago
Joined: 01/18/2019
Posts: 1
IDL to .msg interfacing with ROS2

Greetings,

I am learning ROS2 and have RTI DDS nodes that I would like to communicate with. However, I am unsure of the IDL translation to .msg that ROS uses.

Does anyone know what the .idl translation would look like in a .msg?

Example:

depth.idl:

include "fluid pressure.idl"
module robot
{
    const octet WATER_TYPE_SALT =1;

    struct depth    {
        sensor::msg::dds::fluidpressure pressure;
        string id;//@key
        float depth;
   };
};

fluidpressure.idl:

module sensor {  module msg  { module dds {
    struct fluidpressure {
        double fluid_pressure;
        double variance;
    };

};};};

Is it as simple as saying:

depth.msg:

constbyte WATER_TYPE_SALT =1

sensor/msg/dds/fluidpressure   pressure

float32 depth

And fluidpressure.idl:

double32  fluid_pressure

double32  variance

?

Thanks

Jim

Organization:
Offline
Last seen: 3 years 7 months ago
Joined: 08/06/2020
Posts: 3

Hey Jim N,

 

Did you manage to get it working?

 

Best,

Maciej

Howard's picture
Offline
Last seen: 1 day 14 hours ago
Joined: 11/29/2012
Posts: 565

Probably should check this out for examples:

https://github.com/rticommunity/ros-data-types