ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

So where do you declare / define cmd_msg?

This does not appear to be a ROS problem, but a C/C++ programming one.

So where do you declare / define cmd_msg?

ros::Subscriber<std_msgs::UInt16> sub("servo", &cmd_msg);

According to this, cmd_msg is a function.

angle=cmd_msg.data;

According to this, it should be some kind of structure or object.