Ask Your Question
0

Odd Custom Message Creation Behavior

asked 2013-02-22 13:01:11 -0500

pyrobat gravatar image

Hello everyone,

I seem to be getting strange behaviors on the message generation of a simple message. I'm using ros fuerte, on Ubuntu 12.04 with everything up to date. I've made the following "simple.msg"

Header header

I generate it using rosmake, with rosbuild_genmsg() set. When I try to import this message, using

 #include "msgTest/simple.h" 
It fails giving me this error
msgTest/simple.h:92:39: error: expected primary-expression before ‘==’ token I looked at the simple.h in (msg_gen/cpp/include/msgTest/simple.h) that was auto generated, and here is what seems to be causing the error.

template<class containerallocator="">
struct Definition< ::msgTest::simple_<containerallocator> > {
  static const char* value() 
  {
    return "Header header
\n\
\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\
";
  }

Its seems like the newline character is being place on the next line as I expect it to be more like "Header header \n..." Any help would be much appreciated, as some other files that I made behave as expected.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2013-12-23 05:33:48 -0500

autonomy gravatar image

Try using "std_msgs/Header" in your .msg file

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-02-22 13:01:11 -0500

Seen: 90 times

Last updated: Feb 22 '13