is it possible to change dynamic of a (not base) link into static?

Post Reply
diazdaiz
Posts: 2
Joined: Thu May 07, 2020 12:28 pm

is it possible to change dynamic of a (not base) link into static?

Post by diazdaiz »

i am currently making humanoid robot simulation, and for example i want to make walking movement for my robot, so when making the movement when the left foot stepped i want to make it static for a while, and then when making the movement when the right foot stepped, i make want to make left foot become dynamic again and then make the right foot static. So, is it possible to change dynamic of a link into static?, thanks!
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: is it possible to change dynamic of a (not base) link into static?

Post by drleviathan »

In short: no.

Longer answer: it is possible but there are probably better ways to achieve what you really want.

Even longer:

Assuming you want to enforce the robot feet not slipping when in contact with the ground in an a priori way rather than configuring the dynamic interaction to make it effectively true... I can think of at least two ways one might go about it.

(1) Toggle a foot between dynamic (when moving) and kinematic (when locked down). This is very close to what you were thinking except for the slight distinction between static and kinematic. Specifically: it you don't need to rebuild the broadphase proxy for an object when it transitions between dynamic and kinematic, whereas you do need to do it when transitioning to/from static.

(2) Dynamically add a btFixedConstraint to the foot when it should be locked down and remove it when you want to allow it to move again.

All that said, it should be possible to tweak a fully dynamic robot to not slip its feet purely from friction forces. However, you might need to tweak the simulation: take small substeps, increase friction, reduce restitution, tune motor strengths of robot arms, etc. Locking the feet a priori could be considered a shortcut, or maybe your robot's feet have electromagnets and is walking on an iron floor, I dunno.
Post Reply