Including custom message inside custom message (.msg files)
I know it's possible to include ROS message
type (for instance geometry_msgs/Point) inside custom message
, you just have to link the message type inside package.xml. But it possible to include custom message
in custom message
? For example:
package_name/msg/MainMessage.msg:
Header header
string some_text
package_name/SupportMessage
package_name/msg/SupportMessage.msg:
int32 x
int32 y
For me it doesn't work. I didn't forget to put both msg files inside CMakeLists.txt. To ensure I created custom message
without custom message
inside and it works fine. What about custom message
inside custom message
?
Yes, this is fully supported.
There is no technical difference between "ROS messages" and "custom messages". It's all the same infrastructure.
However:
is not something we can help you with.
If you would show actual error messages, perhaps board members could try to help you.
expected identifier before ‘;’ token _class_type class;
One of my fields was called "class". I figured it out after many attempts, but now it works. It should be mentioned in ros wiki, I think.
For future questions: please include complete and verbatim copies of commands you run and any output those generate.
Without sufficient information we cannot help you.