Move_base actionlib goal doesn't change to SUCCEED

asked 2016-04-20 16:55:44 -0600

dottant gravatar image

Hi all, I'm trying to made a random waypoints generator in ROS Indigo for my autonomous navigation simulator (made in Gazebo 2.2). The robot moves without problem within the map when i send them goal publishing /move_base_simple/goal or using the 2D nav goal features on Rviz, but i always get that the status of the goals is (for ex.)

id: /move_base-3-1771.985000000
 status: 1
 text: This goal has been accepted by the simple action server

and it doesn't change when the robot reaches the goal (it should be SUCCEED, so = 3). For my generator, at the beginning i'm using this code as test

#include <ros/ros.h>
#include <move_base_msgs/MoveBaseAction.h>
#include <actionlib/client/simple_action_client.h>
typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;

int main(int argc, char** argv){
 ros::init(argc, argv, "simple_navigation_goals");
 MoveBaseClient ac("move_base", true);
  ROS_INFO("Waiting for the move_base action server to come up");
 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 = 1.0;
 goal.target_pose.pose.orientation.w = 1.0;
 ROS_INFO("Sending goal");
 if(ac.getState() == actionlib::SimpleClientGoalState::ACTIVE)
  ROS_INFO("Hooray, the base moved 1 meter forward"); 
 else  ROS_INFO("The base failed to move forward 1 meter for some reason");
 return 0;

and, when i run it, the robot does 1 meter in front of it, but the goal status get stuck on 1 (ACTIVE). I've tried to find something within the ROS answer and someone suggests that it could be something related to the odom message where the vx and vy must be zero after the reaching of the goal, otherwise the navigation stack continues to adjust everything and the goal will never be reached: based on it I've seen that the odom topic coming from gazebo doesnt have the twist setted to zero when the robot reaches the goal...could it be the problem?? thanks in advance

edit retag flag offensive close merge delete


Did you manage to solve this problem?

mostafa_nbl gravatar image mostafa_nbl  ( 2016-06-27 16:09:03 -0600 )edit

In your local_base_planner config file there is a variable called "xy_tolerance" Try increasing this, I have the same issue occasionally, and its usually when I use a smaller value for the tolerance. At 0.35m its usually fine, at 0.25m it often doesn't complete properly (stays ACTIVE).

M@t gravatar image M@t  ( 2016-08-01 22:01:37 -0600 )edit

Guys, I still have this issues. Anyone could help me?

dottant gravatar image dottant  ( 2016-10-25 08:10:27 -0600 )edit

Did you find the solution?

pmuthu2s gravatar image pmuthu2s  ( 2018-10-21 14:10:07 -0600 )edit