IDL to .msg interfacing with ROS2

2 posts / 0 new
Last post
Offline
Last seen: 1 year 8 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: 1 month 2 weeks ago
Joined: 08/06/2020
Posts: 3

Hey Jim N,

 

Did you manage to get it working?

 

Best,

Maciej