Turtlebot navigation with TurtlebotMoveAction much slower than with MoveBaseAction [closed]
Hi there,
I was trying to move Turtlebot by one meter in Gazebo. I have spawned a world, created its map and followed sending simple MoveBaseGoal tutorial. The robot moved one meter as expected.
If the code is modified to use the TurtlebotMoveAction instead of MoveBaseAction as in
typedef actionlib::SimpleActionClient<turtlebot_actions::TurtlebotMoveAction> MoveBaseClient;
int main(int argc, char** argv){
ros::init(argc, argv, "turtlebot_move_action_client");
//tell the action client that we want to spin a thread by default
MoveBaseClient ac("turtlebot_move_action_server/turtlebot_move", true);
//wait for the action server to come up
while(!ac.waitForServer(ros::Duration(5.0))){
ROS_INFO("Waiting for the turtlebot_move action server to come up");
}
turtlebot_actions::TurtlebotMoveGoal goal;
goal.turn_distance = 1.0;
goal.forward_distance = -1.0;
ROS_INFO("Sending goal");
ac.sendGoal(goal);
bool finished_before_timeout = ac.waitForResult(ros::Duration(36000.0));
if (finished_before_timeout)
{
actionlib::SimpleClientGoalState state = ac.getState();
ROS_INFO("Action finished: %s",state.toString().c_str());
}
else
ROS_INFO("Action did not finish before the time out.");
return 0;
}
The robot appears to be doing nothing. Following the /turtlebot_move_action_server/turtlebot_move/feedback reveals that the robot actually does steadily progress to the goal, but it is extremely slow.
It moves about 25cms in 10 hours or so in contrast to the MoveBaseAction version which travels one meter in less than a minute.
Any thoughts why this is the case or possible errors?
Cheers!