Want to implement user defined msg in nodes I edited CMakeLists.txt to include rosbuild_genmsg().
In the publisher/subscriber node, do I have to include it like in the case of std_msg? (i.e. #include "msg/custom_msg.h" or something?)
Will this correspond to the following change: ros::Publisher chatter_pub = n.advertise**msg::custom_msg**("chatter", 1000);
Further, I want to create a subscriber node, and publish messages to it manually, should the corresponding callback method be modified as:
void chatterCallback(const msg::custom_msg::ConstPtr& msg) { ROS_INFO("I heard: [%s]", msg->data.c_str()); }
Thanks a lot, really appreciate your help.
Originally posted by kshitij on ROS Answers with karma: 115 on 2012-03-04
Post score: 0