rst-tu-dortmund / mpc_local_planner

The mpc_local_planner package implements a plugin to the base_local_planner of the 2D navigation stack. It provides a generic and versatile model predictive control implementation with minimum-time and quadratic-form receding-horizon configurations.
http://wiki.ros.org/mpc_local_planner
GNU General Public License v3.0
545 stars 143 forks source link

ROS2 navigation2 controller #13

Open soldierofhell opened 4 years ago

soldierofhell commented 4 years ago

Hi @croesmann, are there any plans for a ROS2 integration with nav2 stack similar like in teb? There's ros2-master branch, but seems like it doesn't implement nav2_core/controller.hpp interface

Regards,

croesmann commented 4 years ago

Hi @soldierofhell,

Yes, of course. But since the package is still in an early stage, I wanted to focus on bug fixing in ROS1 before porting to ROS2. I also expect some API changes in the integration with homotopy class planning (as it is done for the TEB).

However, the port to ROS2 should be straightforward as most of the code (planning backend) is ROS-free.

The only problem at the moment is my limited spare time for working on the project ;-)

soldierofhell commented 4 years ago

Thank you @croesmann. So I'll try to do it myself. Fortunatelly I noticed some similarities with teb code base, so should be easier.

Regards,

SteveMacenski commented 4 years ago

Make sure to PR it back here! @croesmann can you open a ros2 branch?

Also, maybe some documentation about the current status of this work and any positives / negatives people should know.

soldierofhell commented 4 years ago

@croesmann , while doing ROS2 port I found a copy-bug here: https://github.com/rst-tu-dortmund/mpc_local_planner/blob/0ad611113cc215d2dd5f46eaabe7014b57288d30/mpc_local_planner/src/controller.cpp#L894

soldierofhell commented 4 years ago

Can we safely replace g2o::normalize_theta() with normalize_theta() from math_utils.h? https://github.com/rst-tu-dortmund/mpc_local_planner/blob/0ad611113cc215d2dd5f46eaabe7014b57288d30/mpc_local_planner/src/mpc_local_planner_ros.cpp#L280 https://github.com/rst-tu-dortmund/mpc_local_planner/blob/0ad611113cc215d2dd5f46eaabe7014b57288d30/mpc_local_planner/src/controller.cpp#L906

croesmann commented 4 years ago

Thanks for the pointer to the bug. I‘ll check that later.

Yes, you can safely replace the g2o variant by the internal normalizing function.

croesmann commented 4 years ago

I fixed the bug and synced ros2-master with the ros1 master.

dkuenster commented 4 years ago

@soldierofhell I'm also thinking about porting this to ROS2. How far along are you with your port? Maybe we can avoid doing the same work twice.

soldierofhell commented 4 years ago

I've already done it, although didn't have time to test it before holidays. I'm back on Monday and start testing

dkuenster commented 4 years ago

Any estimation on when the PR will be available?

ss26 commented 3 years ago

Is there any update on this PR? I would like to use mpc_local_planner in ros2.

dkuenster commented 3 years ago

I created a PR in this repo. Check out https://github.com/rst-tu-dortmund/mpc_local_planner/pull/35

rzeeshan565 commented 2 years ago

Is there any update on this PR? I would like to use mpc_local_planner in ros-foxy.