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

Your drive_callback function is probably getting called before the obstacle variable is set. You should set it (and your other globals too) to a default value at the start of the program.