Ask Your Question
0

Fix time step in generated MoveIt trajectories

asked 2017-11-30 09:09:42 -0500

paw gravatar image

I currently am trying to integrate MoveIt on a custom robot. The robot already has the capability to accept position-velocity trajectories which are defined over a fixed control rate (i.e t1-t0 = t2-t1 = dt) and execute.

Therefore my implementation of a FollowJointTrajectory action would be very simple as long as I make sure it only accepts goals with a fixed time step. I think this also makes sense from a real-time control perspective. The time step can change per trajectory, but must be the same within each one.

My problem is the trajectories generated by MoveIt have sporadic time deltas. I have tried setting the rate parameter in controllers.yaml but appears to do nothing and I can't really find any documentation that deals with this issue. Here is an example of the time deltas of a MoveIt trajectory: image description

Is there anyway I can force MoveIt to generate trajectories evenly spaced along time? I would rather not have to interpolate the trajectory points in my action server, although this is currently my backup solution.

edit retag flag offensive close merge delete

Comments

Not an answer, but something to consider:

I would rather not have to interpolate the trajectory points in my action server,

If you don't do the interpolation there, you're essentially putting the burden on all your clients to import specific implementation details about your robot ..

gvdhoorn gravatar image gvdhoorn  ( 2017-12-01 03:17:22 -0500 )edit

.. into their application (as without the knowledge that your specific action server / robot requires trajectories with equidistant dts clients cannot successfully use its services).

In component based applications, this would seem to be really undesirable, and looking at FollowJointTrajectory ..

gvdhoorn gravatar image gvdhoorn  ( 2017-12-01 03:18:51 -0500 )edit

.. it would also seem to go against the specification of the msg/interface (which is, granted, not as explicit as it could have been). FollowJointTrajectory accepts a goal with a JointTrajectory. Those contain JointTrajectoryPoints, which have time_from_start fields. This particular ..

gvdhoorn gravatar image gvdhoorn  ( 2017-12-01 03:19:50 -0500 )edit

.. design does not include any specific requirements on values for time_from_start, other than that they are 'strictly increasing in time'. So an action server that imposes additional constraints (like equidistant time_from_start values) would appear to violate the interface specification.

gvdhoorn gravatar image gvdhoorn  ( 2017-12-01 03:21:28 -0500 )edit

You are obviously completely free in how you implement your server, but if you value coherence, substitutability, separation of concerns and there is a chance that others might want to use your component, it would probably make the most sense to have your driver guarantee equidistant dts.

gvdhoorn gravatar image gvdhoorn  ( 2017-12-01 03:27:24 -0500 )edit

and there is a chance that others might want to use your component

Btw: this goes two ways: applications will become less flexible if they're build 'around' your component (with the special action server) and your component is less re-usable (as it has special requirements).

gvdhoorn gravatar image gvdhoorn  ( 2017-12-01 03:41:52 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-12-01 07:53:36 -0500

v4hn gravatar image

I fully agree with @gvdhoorn's long comment on your question. One additional thing to keep in mind is that if your trajectory server does not support sparse (and dynamic interval) trajectories, the trajectories you send to your action server have to be much bigger in size.

Apart from that the answer to your question lies here. ROS-I provides a PlanningRequestAdapter that ensures the planning result is a trajectory with fixed sampling interval.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-11-30 09:09:42 -0500

Seen: 855 times

Last updated: Dec 01 '17