-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Implement the new move base flex interface for the global planner #774
Conversation
So, this really isn't going to work -- we can't depend on things from the MBF repo, since the MBF repo has packages that depend on at least costmap_2d, base_local_planner, and nav_core. |
Aaa circular dependencies. :/ @corot How could we handle that? |
I think build just fails because mbf_msgs dependency is missing; same for the local planner. I don't see any circular dependency; true mbf_costmap_core depends on costmap_2d, but also does nav_core |
I believe what @mikeferguson means is that the ROS release infrastructure works on a per repository basis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some things to change. And some things also missing. mbf_msgs dependency, and cost is not computed or set and message is not set. The rest looks fine to me.
@@ -271,7 +286,7 @@ bool GlobalPlanner::makePlan(const geometry_msgs::PoseStamped& start, const geom | |||
if (!costmap_->worldToMap(wx, wy, goal_x_i, goal_y_i)) { | |||
ROS_WARN_THROTTLE(1.0, | |||
"The goal sent to the global planner is off the global costmap. Planning will always fail to this goal."); | |||
return false; | |||
return mbf_msgs::GetPathResult::INTERNAL_ERROR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INVALID_GOAL
would be the right outcome number code here.
@@ -256,7 +271,7 @@ bool GlobalPlanner::makePlan(const geometry_msgs::PoseStamped& start, const geom | |||
if (!costmap_->worldToMap(wx, wy, start_x_i, start_y_i)) { | |||
ROS_WARN( | |||
"The robot's start position is off the global costmap. Planning will always fail, are you sure the robot has been properly localized?"); | |||
return false; | |||
return mbf_msgs::GetPathResult::INTERNAL_ERROR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INVALID_START
would be the right number code here.
} | ||
|
||
if (canceled_) { | ||
ROS_ERROR("This planner was canceled!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error msg is a bit unspecific.
} | ||
|
||
uint32_t GlobalPlanner::makePlan(const geometry_msgs::PoseStamped &start, const geometry_msgs::PoseStamped &goal, | ||
double tolerance, std::vector<geometry_msgs::PoseStamped> &plan, double &cost, std::string &/*message*/) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- /message/ ?
- where is the cost computed
- where is the message set? -> The message should be defined following to the error meaning.
@@ -24,6 +24,7 @@ | |||
<build_depend>pluginlib</build_depend> | |||
<build_depend>roscpp</build_depend> | |||
<build_depend>tf</build_depend> | |||
<build_depend>mbf_costmap_core</build_depend> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mbf_msgs is missing here
@@ -34,8 +35,10 @@ | |||
<run_depend>pluginlib</run_depend> | |||
<run_depend>roscpp</run_depend> | |||
<run_depend>tf</run_depend> | |||
<run_depend>mbf_costmap_core</run_depend> | |||
<export> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mbf_msgs
@@ -8,6 +8,7 @@ find_package(catkin REQUIRED | |||
dynamic_reconfigure | |||
geometry_msgs | |||
nav_core | |||
mbf_costmap_core | |||
navfn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mbf_msgs is missing here
Yes, what @mikaelarguedas mentioned is the problem -- since we certainly want to release debians. I think the proper way to get this out would be to include a minimal set of headers in nav_core (Ala this PR: #605). Since we haven't sync'd the first round of debians yet -- it is definitely still early enough to get this into Melodic. Or split the core stuff out of move_base_flex into a new repo (but before I would support navigation depending on said code, I'd suggest that move_base_flex_core be part of ors-planning, so that if in the future you guys decide to stop maintaining it, we can still release it and the navigation stack). |
I would propose to not change navigation and handle the extended plugins at runtime in mbf. |
That's what we currently do; when dealing with "old-stile" API (nav_core) plugins, MBF wraps them so they can be used indistinctly from "new-stile" API (mbf_core) plugins. Problem is that we miss the richer interface, as nav_core plugins don't provide error code or message, just success/failure, nor can be canceled (plus other new fancy stuff). |
So as I see, there are several possibilities (all for melodic and later, kinetic will just remain as it is):
|
Going to close this since we never resolved the circular dependency - and we certainly aren't going to make this change in Kinetic |
Added a second inheritance to GlobalPlanner from the mbf_costmap_core::CostmapPlanner interface to be able to use move_base_flex while backwards compatible to move_base.