I have an occupancy grid map and an exploration algorithm that provides me with 2 dimensional co-ordinates to travel to. The mapping and goal generation are working perfectly. Unfortunately, an error arises when I send the goal to move_base. The robot does not move and I get the following error:
Quaternion has length close to zero... discarding as navigation goal
This is the part of the code that sends the goal:
MoveBaseClient ac("move_base", true);
move_base_msgs::MoveBaseGoal goal;
goal.target_pose.header.frame_id = "base_link";
goal.target_pose.header.stamp = ros::Time::now();
goal.target_pose.pose.position.x = goalx;
goal.target_pose.pose.position.y = goaly;
ac.sendGoal(goal);
where goalx and goaly are integers that contain the map co-ordinates of the goal. MoveBaseClient has been defined earlier, as given in this [link](http://wiki.ros.org/navigation/Tutorials/SendingSimpleGoals). I believe I'm publishing the goal incorrectly, can anyone point out the mistake?
Also, if someone has links/documentation on move_base, quaternions in ROS or examples of sending goals to move_base apart from this [tutorial link](http://wiki.ros.org/navigation/Tutorials/SendingSimpleGoals), please post them as well, I would be extremely grateful. I haven't perfectly understood how to programmatically send goals to move_base.
Thank You!
↧