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

Revision history [back]

You are subscribing to the same topic in a while.

You have to subscribe only once.

Since you are already subscribing to the node before the while, try to remove the bump_sensor_sub_ = nh.subscribe("/bumper", 1000, &MoveBase::BumperSensorCB, this); that is inside the while(right_bumper==1){} and see if it works.