frankaemika/franka_ros

Panda research 3 PID gains tweaking

Opened this issue · 6 comments

I'm using franka_ros and Moveit to control the robot. Whenever I increase the speed/acceleration via Moveit move group, the robot starts to oscillate on some joints, and/or throws this error:

[ERROR] [1692376851.550258786]: libfranka: Move command aborted: motion aborted by reflex! ["joint_motion_generator_velocity_discontinuity", "joint_motion_generator_acceleration_discontinuity"]
control_command_success_rate: 0.66

I was wondering if it was possible to use a PID in order to stabilize the robot movement but I can't find where to add those parameters.
The default_controllers.yaml file is loaded and contains PID gains for the effort_joint_trajectory_controller but nothing on the position_joint_trajectory_controller, is it where it is supposed to go ?
When using the robot at max speed on Franka desk, such oscillations never happen.

To me it seems like your problem is your control_command_success_rate. It is very low. You should run the communication test from libfranka and try to find the issue in you network setup

But does that explain the oscillation issue ?

With your success rate I wouldnt be surprised to get oscillation problems when the rate limiter is enabled. You definitely have to fix your communication issues to properly control the robot with FCI

I have fixed the communication problem, and I'm now getting this when launching the communication test :
#######################################################
Control command success rate of 10000 samples:
Max: 1.00
Avg: 0.99
Min: 0.71
#######################################################

But still, the robot is oscillating when I set high values for speed and acceleration (usually an acceleration scaling higher than 0.5 and a velocity scaling higher than 0.7) though Rviz, but seem to work fine with low acceleration scaling values (anything less than 0.5).

It's worth noting that the oscillations come at the end of the movement, and that there is no end effector attached.

This looks much better now. Try to disable the rate-limiter here: https://github.com/frankaemika/franka_ros/blob/develop/franka_control/config/franka_control_node.yaml#L14 . Then tell me if there are still oscillations

It actually introduced other errors, when I turned the rate limiter off:

[ERROR] [1695369929.279858336]: libfranka: Move command aborted: motion aborted by reflex! ["joint_motion_generator_velocity_discontinuity"]
control_command_success_rate: 1

or

[ERROR] [1695370988.957934841]: libfranka: Move command aborted: motion aborted by reflex! ["joint_motion_generator_acceleration_discontinuity"]
control_command_success_rate: 1

The oscillations came back when I turned it on, and the errors are less frequent, but when the acceleration is around 0.6 they sometime appear if the form of cartesian reflex, even thought no pressure is applied to the arm.

[ERROR] [1695370265.070006231]: libfranka: Move command aborted: motion aborted by reflex! ["cartesian_reflex"]
control_command_success_rate: 0.95