0
$\begingroup$

Rosanswers logo

Hi, this is a problem extended from my previous post. Are both Gmapping and amcl publishing Map to Odom TF? I described my objective and my system there.

After some more testing, we have found that there is no problem if we use our own global path, launch the navigation package without both gmapping and amcl. The tf from map to odom is published by a static tf. The robot can move along with the global path, can generate local cost map and local path.

The problem is when we launch fake_localization, there is no global plan and it gives a warning "Unable to get starting pose of robot, unable to create global plan". This warning is from move-base.

  //get the starting pose of the robot
    tf::Stamped<tf::Pose> global_pose;
    if(!planner_costmap_ros_->getRobotPose(global_pose)) {
      ROS_WARN("Unable to get starting pose of robot, unable to create global plan");
      return false;
    }

I have checked the TF, the related topics such as base_link_ground_truth, amcl_pose, all correct.

I cannot figure it out .. The only difference is that the fake_localization is updated at a only 1 Hz in frequency.


Originally posted by tianb03 on ROS Answers with karma: 710 on 2013-03-20

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Solved. I have checked the getRobotPose function in costmap_2d_ros.cpp. start from line 1331

// check global_pose timeout
    if (current_time.toSec() - global_pose.stamp_.toSec() > transform_tolerance_) {
      ROS_WARN_THROTTLE(1.0, "Costmap2DROS transform timeout. Current time: %.4f, global_pose stamp: %.4f, tolerance: %.4f",
          current_time.toSec() ,global_pose.stamp_.toSec() ,transform_tolerance_);
      return false;
    }

So we increased the transform_tolerance, and finally it can get the robot pose and make global plan.


Originally posted by tianb03 with karma: 710 on 2013-03-20

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by nancy_nan on 2013-10-28:
i just wondering how to increased the transform_tolerance

Comment by Tones on 2016-01-07:
transform_tolerance is a parameter of the corresponding costmap. Simply change the value for this parameter.

Comment by LEECHEOLWON on 2020-11-08:
I also solved the problem by increasing transform_tolerence. The transform_tolerence parameter is in the cost_common_param.yaml file of move_base.

Good luck. Thank you.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.