Complete the code to initialize the ROS node for navigation.
ros::init(argc, argv, [1]);The navigation stack commonly uses the node name move_base to handle path planning and movement.
Complete the code to subscribe to the robot's odometry topic.
ros::Subscriber odom_sub = nh.subscribe([1], 1000, odomCallback);
The odometry data is published on the /odom topic, which provides the robot's position and velocity.
Fix the error in the costmap configuration parameter name.
costmap_ros->setParameter("[1]_layer", true);
The correct parameter name is obstacle_layer but here only the prefix obstacle is needed before _layer.
Fill both blanks to create a simple global planner plugin class declaration.
class [1] : public [2] { };
The global planner plugin class should inherit from BaseGlobalPlanner and can be named SimpleGlobalPlanner.
Fill all three blanks to complete the move_base action client initialization.
actionlib::SimpleActionClient<[1]> ac("[2]", true); if(!ac.[3](ros::Duration(5.0))) { ROS_ERROR("Failed to connect to action server"); }
The action client uses move_base_msgs::MoveBaseAction as the template, connects to the move_base action server, and calls waitForServer to wait for the server to be ready.
