ros2.Crystal embedding Header.msg to custom message

asked 2019-02-07 03:42:38 -0500

Obeseturtle gravatar image

Hi,

If I embed a msgs as field in my custom message, I am able to use the embedded message and build the project without issue. When using ros2 topic echo I am only able to view the originally defined message but not the embedded one.

std_msgs/Header header   
int32 count
int32 nch
int32 lenght

After echo:

count: 721
nch: 1
length: 0

Using ros2 msg show also shows that the message has the std_msgs/Header header field on it:

std_msgs/Header header   
int32 count
int32 nch
int32 lenght

Is there an example on how to use the common_interfaces/Header.msg? Or is there a circumstance where the message would not be displayed?

edit retag flag offensive close merge delete