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

Ruckig fails with lower CutOff Frequencies #8

Closed HiImJulien closed 3 years ago

HiImJulien commented 3 years ago

My goal is to integrate Ruckig into our research software, which controls our Franka Panda.

Using the default cutoff frequency (franka::kDefaultCutoffFrequency = 100.0) everything works fine and dandy.

However, using a lower cutoff frequency results in a franka::CommandException:

Motion finished commanded, but the robot is still moving! [joint_motion_generator_velocity_discontinuity, joint_motion_generator_acceleration_discontinuity]

Can we somehow account for the cut off frequency in ruckig? Is there something I am missing?

P.S.: My motion generator is heavily based on "frankx::motion_joint_generator";

pantor commented 3 years ago

Hi @HiImJulien,

I think that this a specific issue with the Franka Panda robot and your controller, and in general out of scope for Ruckig as an online trajectory generator.

However, the Panda has quite a few issues with motion generation, and this is indeed one of them. If you use their low-pass filter (via the cutoff frequency), you will need to wait a corresponding number of cycles to let the robot come to rest. So the key issue here is: the discontinuity and motion finished checks are after the low-pass filter. I think this is fine, but should be stated somehow more prominently in the documentation. In frankx, I've introduced a cooldown period for the cartesian motion generator.