pantor / ruckig

Motion Generation for Robots and Machines. Real-time. Jerk-constrained. Time-optimal.
https://ruckig.com
MIT License
734 stars 166 forks source link

Template makes it difficult to use Ruckig as a class member #46

Closed AndyZe closed 3 years ago

AndyZe commented 3 years ago

I tried to use Ruckig as a class member like this:

std::unique_ptr<ruckig::Ruckig<6 /* num dof */>> ruckig_;

A challenge is, I don't know the "num dof" beforehand. So I had to hard-code it to 6 for now. Could you refactor this somehow so that the constructor takes "num_dof" as an argument?

This issue could make it hard to use Rucking in MoveIt where all numbers of DOF are possible.

pantor commented 3 years ago

Hi @AndyZe, PR #47 should solve your issue. It is already in a good state, however I‘ll add some more tests and do some benchmarking before merging.

pantor commented 3 years ago

47 is now merged, so I'll close this issue. If there is anything I can do for integrating Ruckig into MoveIt, I'd be happy to help!

AndyZe commented 3 years ago

Great!

Right now, MoveIt2 usually parameterizes the trajectory with TOTG. This is acceleration-limited but not jerk-limited.

To my understanding, it would be a good idea to (optionally) pass the trajectory through Ruckig next. Jerk limits would be applied here. Does that make sense to you?

What we would need to do, then, is wrap Ruckig as a plugin just like TOTG. It would be awesome if you can do this! Otherwise we'll get to it soon.