Setting Hard Constraints?
-
- Posts: 2
- Joined: Wed Jun 10, 2020 2:13 pm
Setting Hard Constraints?
I'm trying to build a robot with closed chain kinematics. I used an open chain SDF model and the "createConstraint" function to close the kinematic chain. The problem I'm having is that the constraints seem to be soft constraints and can be violated if they experience enough force. Is there a way to set the constraints to be hard constraints?
-
- Posts: 2
- Joined: Wed Jun 10, 2020 2:13 pm
Re: Setting Hard Constraints?
I was able to solve my issue by raising numSolverIterations. Code runs slower now, but doesn't violate the constraint as much.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Setting Hard Constraints?
Increasing the number of solver iterations, or using a smaller time step, or increase the number of substeps.
You can also improve convergence by making the masses more similar, if possible (PGS solver converges slower when large mass differences are present, such as 100 kg and 0.1 kg etc)
Another option is using a direct solver, but it may have its own issues. See https://github.com/bulletphysics/bullet ... tSolver.py
You can also improve convergence by making the masses more similar, if possible (PGS solver converges slower when large mass differences are present, such as 100 kg and 0.1 kg etc)
Another option is using a direct solver, but it may have its own issues. See https://github.com/bulletphysics/bullet ... tSolver.py