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

Implement the new move base flex interface for the global planner #774

Closed

Conversation

vsteinb
Copy link

@vsteinb vsteinb commented Jul 31, 2018

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.

@mikeferguson
Copy link
Contributor

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.

@spuetz
Copy link

spuetz commented Aug 1, 2018

Aaa circular dependencies. :/ @corot How could we handle that?

@spuetz spuetz mentioned this pull request Aug 1, 2018
@corot
Copy link
Contributor

corot commented Aug 1, 2018

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

@mikaelarguedas
Copy link
Contributor

I believe what @mikeferguson means is that the ROS release infrastructure works on a per repository basis.
So circular dependencies should not only be avoided at the package level but also at the repository level. And this PR will introduce a repository level circular dependency between navigation and move_base_flex that will prevent them from being released

Copy link

@spuetz spuetz left a 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;
Copy link

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;
Copy link

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!");
Copy link

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*/) {
Copy link

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>

Copy link

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>
Copy link

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
Copy link

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

@mikeferguson
Copy link
Contributor

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).

@jspricke
Copy link
Member

jspricke commented Aug 2, 2018

I would propose to not change navigation and handle the extended plugins at runtime in mbf.

@corot
Copy link
Contributor

corot commented Aug 2, 2018

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).

@corot
Copy link
Contributor

corot commented Aug 2, 2018

So as I see, there are several possibilities (all for melodic and later, kinetic will just remain as it is):

  • add mbf_core and mbf_msgs to ROS navigation repo, and upgrade the plugins to the new interface (backward compatible!). Main problem is the increased complexity (possibly confusing for newcomers) of ROS navigation stack
  • move the plugins to a separated repo, so the can freely depend on both ROS nav (core, msgs, costmaps...) and MBF (mbf_core, mbf_msgs). Probably too much work for the maintainers.
  • duplicate the plugins and re-release with a mbf_ prefix. Duplicate == 👿
  • let things as they are and make a common interface (both C++ plugin and ROS API) for ROS 2.0 navigation.

@mikeferguson
Copy link
Contributor

Going to close this since we never resolved the circular dependency - and we certainly aren't going to make this change in Kinetic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kinetic PRs for kinetic-devel planners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants