Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #517: create a getRobotPose method on move_base #520

Closed
wants to merge 1 commit into from

Conversation

corot
Copy link
Contributor

@corot corot commented Sep 22, 2016

instead of using that on the costmaps.

Solves (I would say surprisingly) the

"Unable to get starting pose of robot, unable to create global plan"

problem.

Change is very simple and hardly harmful. But I cannot tell what is exactly fixing nor why...

Copy link
Contributor

@mikeferguson mikeferguson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this PR -- but I don't like the breaking of ABI in the Costmap2dROS class (which will cause all sorts of hell on people with out-of-sync plugins, which is tough to track down). Here's my proposal:

  • I will cherry-pick this as-is into Lunar. There are far fewer users and we've still been fixing build issues over there, so stability should not yet be expected.

  • We update this PR to hard-code name+tolerance as parameters to MoveBase::getRobotPose() since ABI of MoveBase class does not matter.

  • Once we merge this updated version into indigo, I will cherry-pick to Kinetic

@@ -1181,4 +1181,46 @@ namespace move_base {
controller_costmap_ros_->stop();
}
}

bool MoveBase::getRobotPose(tf::Stamped<tf::Pose>& global_pose, costmap_2d::Costmap2DROS* costmap)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ABI in MoveBase doesn't matter, for Indigo+Kinetic -- let's add the name & transform_tolerance to this function signature, and then hard code them above (not great, but avoids ABI break). For Lunar -- let's go ahead and put this PR just this way (with the Costmap2DROS ABI change)

Copy link
Contributor Author

@corot corot Aug 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Btw, I think I understand better now the problem I was solving with this PR: As we look the global costmap before calling the global planner (

boost::unique_lock<costmap_2d::Costmap2D::mutex_t> lock(*(planner_costmap_ros_->getCostmap()->getMutex()));
), it stops updating and get outdated, so we get the 'Costmap2DROS transform timeout. Current time: 1470136643.4973, global_pose stamp: 1470136643.1959, tolerance: 0.3000' WARN.
As I mention on #441, I think this costmap locking should be responsibility of the planners, and last for the shorter possible time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw @mikeferguson, do you want me to apply the requested changes? Or will you do by yourself?

@mikeferguson mikeferguson self-assigned this Aug 1, 2017
mikeferguson added a commit that referenced this pull request Aug 1, 2017
@DLu DLu added the indigo label Apr 30, 2018
@DLu
Copy link
Member

DLu commented Jul 3, 2020

This was merged into lunar in #601 and is a part of melodic and noetic as well.

@DLu DLu closed this Jul 3, 2020
Combinacijus pushed a commit to Combinacijus/navigation that referenced this pull request Mar 27, 2024
Signed-off-by: ARK3r <kermani.areza@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants