-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vibration occurs when self collision constraint enabled #7
Comments
Hello, there are several points here so I address separately for clarity 1. Self collisions constraintFirst, as a disclaimer, PlaCo self-collision system is quite experimental, it was not extensively tested.
2. About limiting accelerationsI understand what you suggest and I already considered this feature. However, I believe limiting the acceleration is not appropriate in a first-order solver. Suppose you want an effector to reach a target with zero velocity. The effector will accelerate towards its target position to reduce its error, and the velocity will ramp according to your constraint. However, when reaching the target, the velocity will not be zero and because of the acceleration limit, it will not be possible to stop instantly. This will result in an overshoot, and the same problem is likely to happen again and again creating an oscillation. Limiting acceleration requires either control of the velocity (like the damping "KD" term of a PID controller), or some proper trajectory planning. The QP IK solver is totally near-sighted and not able to do that. For those reasons, I currently don't believe it is a good idea. 3. Understanding QP FailureQP failures happen when the constraints are not compatible. For example, it is possible that your acceleration limit makes it impossible to avoid hitting a joint limit. Velocity and joint limits are currently always hard (I could consider adding an option to make them soft), you might want to try disabling them to understand if they are the source of conflict. For debug purpose, you can consider: try:
solver.solve(True)
except:
solver.problem.dump_status()
raise This will dump the number of equalities and inequalities still remaining in the underlying problem that was formulated I hope this helps! |
Thanks for your comment! @Gregwar 1. Self Collision Constraint
3. Understanding QP FailureI tried disabling joint limits and velocity limits, and no QP failures occurred, though robot configuration looked strange. This seems to confirm your suspicion. |
Environment:
Issue Details:
I'm trying to control a humanoid's upper body motion using PlaCo. To avoid self-collisions between the arms, I enabled the self-collision constraint. However, vibrations occur when the arms get close enough to trigger the self-collision constraint. When this happens, the joint accelerations show significant fluctuations, as depicted below:
In order to suppress these vibrations, I implemented acceleration limits based on velocity limits which already available in
KinematicsSolver
. Below are the code details:Math principle:
It seems acceleration limits make effective, as the accelerations are clamped to 100.0.
However, an error occurs when I attempt to reduce the acceleration threshold from 100.0 to 10.0. The error log is as follows:
How to explain this error from a math perspective? The issue persists even after I changed the priorities of all tasks, such as the frame task and self-collision task, from hard to soft.
Is there a better solution to suppress these vibration? Should I consider adding a joint acceleration task, similar to the existing joint task? Any hints or suggestions would be greatly appreciated.
The text was updated successfully, but these errors were encountered: