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

Revision history [back]

Fast glance: I think that the issue is that your ros::ServiceServer service goes out of scope as soon as the imu_callback exits and the service server is then destroyed.

Fast glance: I think that the issue is that your ros::ServiceServer service goes out of scope as soon as the imu_callback exits and the service server is then destroyed.destroyed. Note, there are likely better structures for this program, but I think if you declared service globally, and then defined it once you've received enough messages inside of the imu_callback, then I think this would work.