ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
And here is my callback function:
void chatterCallback(const std_msgs::String::ConstPtr& msg) { int id = msg->id; }
you define a custom message (SWrite.msg
), but in your callback signature you still appear to be using std_msgs::String
. That doesn't make sense to me.
The error message ("there is no field id
in std_msgs::String
) does make sense in that case.
2 | No.2 Revision |
And here is my callback function:
void chatterCallback(const std_msgs::String::ConstPtr& msg) { int id = msg->id; }
you define a custom message (SWrite.msg
), but in your callback signature you still appear to be using std_msgs::String
. That doesn't make sense to me.
The error message ("there is no field id
in std_msgs::String
) ") does make sense in that case.