Ask Your Question
0

MoveIt! - How to execute trajectories backwards

asked 2018-06-25 05:00:23 -0500

znbrito gravatar image

Hello guys,

I was wondering if it is possible to execute a trajectory backwards in MoveIt!. So, for example, let's say that I have a manipulator and I want to go from point 1 to point 2 and MoveIt! calculates a plan for a trajectory with 5 waypoints. When the trajectory is executed, the manipulator goes to the first waypoint, then to the second, and so on until it reaches the 5th waypoint.

If I want to go from point 2 to point 1 right after I reach point 2, I shouldn't necessarily have to calculate a new trajectory again, right? I should simply have use the trajectory calculated from point1 to point 2 and go from waypoint 5 to waypoint 4 till I reach waypoint 1, right? So, is there any way to reuse the first trajectory calculated in order to follow its path backwards?

Thanks in advance!

Best regards, José Brito

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2018-06-25 05:26:43 -0500

gvdhoorn gravatar image

This is not supported right now.

A semi-manual way could be to write a short function that takes in a JointTrajectory, reverses the order of the JointTrajectoryPoints in it and then re-runs the time parameterisation.


One reason I can come up with for why this isn't directly supported (apart from 'no one' needing this sort of functionality badly enough to add it) would be that it's quite an assumption to make that the environment hasn't changed between planning & executing the "to" motion and the time you'd want to make the "return" motion. As MoveIt is primarily intended to perform motion planning in dynamic (or at least not in completely static) scenes, reusing trajectories does not seem like something that would be often done.

edit flag offensive delete link more

Comments

Thanks a lot @gvdhoorn! I found a possible way to do it in this link: https://groups.google.com/forum/#!top...

I will try to spend some time with this! Thanks a lot :)

znbrito gravatar image znbrito  ( 2018-06-25 05:32:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-06-25 05:00:23 -0500

Seen: 263 times

Last updated: Jun 25 '18