Msg gen error (stray '#' in program)
Hi there,
I'm building a program this message (Pose2DArray.msg):
Header header
geometry_msgs/Pose2D[] poses
But when I build it, with an empty main function, I get the following errors:
error: stray \ in program
error: stray # in program
error: stray \ in program
error: stray # in program
(more omitted)
This appears to be from the following, in Pose2DArray.h:
return "Header header \n\
\n\ geometry_msgs/Pose2D[] poses\n\
================================================================================\n\ MSG: std_msgs/Header\n\
# Standard metadata for higher-level stamped data types.\n\
# This is generally used to communicate timestamped data \n\
# in a particular coordinate frame.\n\
# \n\
# sequence ID: consecutively increasing ID \n\ uint32 seq\n\
#Two-integer timestamp that is expressed as:\n\
# * stamp.secs: seconds (stamp_secs) since epoch\n\
# * stamp.nsecs: nanoseconds since stamp_secs\n\
# time-handling sugar is provided by the client library\n\ time stamp\n\
#Frame this data is associated with\n\
# 0: no frame\n\
# 1: global frame\n\ string frame_id\n\ \n\
================================================================================\n\ MSG: geometry_msgs/Pose2D\n\
# This expresses a position and orientation on a 2D manifold.\n\ \n\ float64 x\n\ float64 y\n\ float64 theta\n\ "; }
When I removed all that and replace it with
return "";
everything works. But since it is auto generated, the error re-appears later.
So I tried to remove the Header, so the msg was only
geometry_msgs/Pose2D[] poses
and everything works. Why can't I use Header here? Is this a bug or do I forget something?
edit: putting a comment in there ( # and some text) will also cause this