Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Self defined messages

Hi everyone,

I'm a bit new in ROS and I want to know how to create a self described message and use it in ROS to exchange information between ROS nodes. I've found this ros answer 1 and this video 2 about how to create and use you own ROS message. But there's still some question that remains unanswer or unclear for me.

1) You have to call a header file to start using your own message as the video and the answer question show, but what should I code in that header file (my_msg.h) and its realated cpp file (my_msg.cpp)? Or they must stay empty and its a trick ROS use to call self described messages? If anyone could done or refer me to a github easy example of an self defined message I will be very pleased.

2) Do you have to add any dependence or export any dependence of that package? If so, how can I do it?

Thanks in advance for your help.