How to pass constants using a .idl file directly ?
I'm using ros2 eloquent and trying to write a .idl message directly so that it could be compatible with Fast-DDS; I'm trying to pass constants in the .idl file. The file I wrote looks like
module package_name{
module idl {
struct exmaple_msg{
// constants
uint32 CONSTANT = 0;
};
};
};
I failed to pass it through rosidl_generate_interfaces; Could you give an correct syntax to write it and how to use it later ?
I would suggest to create a
.msg
file with just a constant and after building the package look at / copy the generated.idl
file.