Robot elements are hanging down due to gravity

Post Reply
veio
Posts: 9
Joined: Sun Aug 21, 2016 6:04 pm

Robot elements are hanging down due to gravity

Post by veio »

Hi,

I have a robot modelled in bullet with btHingeConstraint joints.
If I run the robot in real time mode (around 10ms per cycle), the elements are not at their place, especially in the other axes of the hinge joint. They are hanging down a little bit. If I decrease the gravity, they dont hang down anymore.
The masses of the elements are realistic ones from a real robot.
If I do 1ms steps the problem is not present. But then it is not real time, so not an option.

I found the solver parameter btContactSolverInfoData.m_erp, which kinda solves it if I increase to 1.0f. But then the joints start to oscillating, when moved once. Increasing damping additionally does not help.
Isnt btContactSolverInfoData the wrong place to tune since there are no contacts involved?

What would be the correct parameters to fix this?

thanks!

cheers
veio
veio
Posts: 9
Joined: Sun Aug 21, 2016 6:04 pm

Re: Robot elements are hanging down due to gravity

Post by veio »

Ok, the P value of the PID controller needed some tweaking after changing the erp value (erp = ErrorReductionParameter by the way). Now it works.
davey1
Posts: 1
Joined: Sat Aug 20, 2016 6:58 pm

Re: Robot elements are hanging down due to gravity

Post by davey1 »

veio wrote:Ok, the P value of the PID controller needed some tweaking after changing the erp value (erp = ErrorReductionParameter by the way). Now it works.
Brilliant, was facing same issue, followed your suggestion and its sorted now.
veio
Posts: 9
Joined: Sun Aug 21, 2016 6:04 pm

Re: Robot elements are hanging down due to gravity

Post by veio »

Though, it doesnt make much sense.
The position PID controller should not need to increase the velocity to reach a target at all. Something is wrong with the btHingeConstraint.
The btHingeConstraint doesnt seem to select a suitable impulse to reach a target (when using btHingeConstraint::enableAngularMotor() and setting a target velocity and a maxImpulse).
I should not make a difference if I give a small or high velocity to reach a target at all, just how fast. Only a too low impulse should matter to whether the target velocity is reached or not.

Or am I missing something?

The problem reappeared for me when scaling all elements up by factor 3 to have better results for the small objects. And now increasing the P value of the PID Controller is in a scale where the joints are starting to oscillate sometimes.
veio
Posts: 9
Joined: Sun Aug 21, 2016 6:04 pm

Re: Robot elements are hanging down due to gravity

Post by veio »

Is there a way to read the impulse applied to a body calculated by the constraint solver?
Post Reply