# A real-time motion planner?

**URL:** <https://discourse.openrobotics.org/t/a-real-time-motion-planner/4354>\
**Category:** Manipulation\
**Created:** [March 29, 2018, 9:36pm UTC](https://discourse.openrobotics.org/t/a-real-time-motion-planner/4354 "2018-03-29T21:36:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndyZe](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/andyze/32/7276_2.png) [@AndyZe](https://discourse.openrobotics.org/u/AndyZe)\
**Post date:** [March 29, 2018, 9:36pm UTC](https://discourse.openrobotics.org/t/a-real-time-motion-planner/4354/1 "2018-03-29T21:36:39Z")

</div>

This is just a discussion of if and how to integrate real-time motion planners in MoveIt!

Currently the [jog\_arm](http://wiki.ros.org/jog_arm) package does this with a Jacobian-based jogger – it subscribes to joystick commands or force feedback commands to calculate a trajectory. I’m OK keeping this as a separate package but there are lots of advantages to moving under the MoveIt! umbrella, I think.

Of course, it’s also worth considering how future real-time planners might fit in…

Pros of the real-time Jacobian planner, in comparison to the current MoveIt! planners:

- Determinism (if starting from the same pose, with the same target, its motion will be repeatable)
- ~0 planning time
- No reconfigurations, i.e. sudden, wild swings of the arm
- The trajectory can be altered in real-time

Drawbacks of the Jacobian planner:

- Trajectories can’t be previewed in RViz
- The planner takes a straight line – it doesn’t know how to plan around obstacles, singularities, or joint limits
- This Jacobian technique is generally only useful over short distances.

Thanks!

---

<div class="post-metadata">

**Author:** ![davetcoleman](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/davetcoleman/32/1835_2.png) [@davetcoleman](https://discourse.openrobotics.org/u/davetcoleman)\
**Post date:** [April 4, 2018, 7:57pm UTC](https://discourse.openrobotics.org/t/a-real-time-motion-planner/4354/2 "2018-04-04T19:57:22Z")

</div>

Hi Andy,

Can you please edit your post above with links to the said packages e.g. jog\_arm?

Do you think the functionality in this realtime motion planner mimics some of the capabilities in the RobotState:computeCartesianPath() functions in MoveIt! already? Can we have them share the same code?

How does jog\_api connect to the low level controllers? This is the biggest question I ask myself. The FollowJointTrajectory action interface might not be fast enough - it wasn’t for me but I know others have had success with it by changing the TCIP stack. But that isn’t for the faint of heart IMHO.

I would like to see this added into the ros-planning/moveit repo, in the [moveit/moveit\_experimental at kinetic-devel · moveit/moveit · GitHub](https://github.com/ros-planning/moveit/tree/kinetic-devel/moveit_experimental) package for now.

---

<div class="post-metadata">

**Author:** ![AndyZe](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/andyze/32/7276_2.png) [@AndyZe](https://discourse.openrobotics.org/u/AndyZe)\
**Post date:** [April 4, 2018, 8:58pm UTC](https://discourse.openrobotics.org/t/a-real-time-motion-planner/4354/3 "2018-04-04T20:58:01Z")

</div>

OK, thanks for the feedback.

> The FollowJointTrajectory action interface might not be fast enough

You might be right for some robot models/controller setups. On UR robots it’s fine. Velocity control helps in that regard. I think the other two who have used it on custom robots are doing:

- Position control

- They are not using ros\_control but have written their own low-level controllers. I will have to confirm this for @machinekoder 's case.

I believe it’s also being used on a Motoman arm, so I’ll check for details there as well.

It does mimic some of the capabilities of computeCartesianPath but I don’t think you can achieve smooth compliance or teleoperation with computeCartesianPath() and an OMPL planner. I have tried and it wasn’t fast enough. Yep, it would be good if code could be shared… I’ll work on that.

BTW I added a library for compliance into the devel branch. I would like to get to the point where DARPA Challenge tasks like turning a valve with two grippers, with compliance, is supported just as well as MoveIt! supports point-to-point motion.

---

<div class="post-metadata">

**Author:** ![davetcoleman](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/davetcoleman/32/1835_2.png) [@davetcoleman](https://discourse.openrobotics.org/u/davetcoleman)\
**Post date:** [April 7, 2018, 9:41pm UTC](https://discourse.openrobotics.org/t/a-real-time-motion-planner/4354/4 "2018-04-07T21:41:43Z")

</div>

I’ve looked through the code and I think it would be great to see this merged into the experimental package! Perhaps open a Github pull request and we can continue discussion there?

---

<div class="post-metadata">

**Author:** ![hooman](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/hooman/32/3102_2.png) [@hooman](https://discourse.openrobotics.org/u/hooman)\
**Post date:** [March 13, 2019, 5:30pm UTC](https://discourse.openrobotics.org/t/a-real-time-motion-planner/4354/5 "2019-03-13T17:30:17Z")

</div>

This package looks quite interesting. I was wondering if the merge into experimental package is done and what’s the github address for that.

---

<div class="post-metadata">

**Author:** ![brycew](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/brycew/32/3104_2.png) [@brycew](https://discourse.openrobotics.org/u/brycew)\
**Post date:** [March 13, 2019, 6:50pm UTC](https://discourse.openrobotics.org/t/a-real-time-motion-planner/4354/6 "2019-03-13T18:50:21Z")

</div>

@hooman The merging is still happening at [https://github.com/ros-planning/moveit/pull/1360](https://github.com/ros-planning/moveit/pull/1360). There’s been a lot of iteration since these last posts though, it should be close to merging.

---

<div class="post-metadata">

**Author:** ![hooman](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/hooman/32/3102_2.png) [@hooman](https://discourse.openrobotics.org/u/hooman)\
**Post date:** [March 13, 2019, 8:12pm UTC](https://discourse.openrobotics.org/t/a-real-time-motion-planner/4354/7 "2019-03-13T20:12:44Z")

</div>

thanks for sharing the pull request address.
