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

The reason this code was crashing was that

ros::Subscriber< baxter_core_msgs::EndpointState > Mysub("/robot/limb/right/endpoint_state/", &Callback);

was being declared within one of the public functions, this was leading to it falling out of scope when the callback tried to use it, I believe. The fix for me was to make this ros::subscriber a global variable.