Gz sim crashes when Joint Position Controller reaches joint limits

asked 2023-02-06 14:08:14 -0600

gragleas gravatar image

Hello all, I'm simulating a boat using PX4 Autopilot and gz sim, the rudders are revolute joints with +/- 30 degree limits about the z axis and controlled by the JointPositionController plugin. I'm also using the LiftDrag plugin to apply lateral forces to steer the boat, and those coefficients were taken from the corresponding airfoil polars. The PID values are taken from the motors used on the actual boat I am attempting to simulate.

Whenever I command the rudders to move with PX4, they move until they reach their limits and then an extraordinarily large force is produced on the boat which causes the simulation to freeze and abort. I've tried placing limits on the joints and reducing the maximum and minimum commands (which helped slightly but did not prevent the error.) I've seen some issues raised in the github about a similar issue with JointVelocityControl, has anyone else encountered this issue and if so are there any hotfixes or resources i could look at? Thank you and I can provide more output/tests if needed.

edit retag flag offensive close merge delete