Page 1 of 1

How could i add a planar contraints?

Posted: 21 Jun 2022, 03:36
by liyinghui
I am trying to construct a legged robot that holds a sphere joint in the end linking a footpad. But actually, I don't want the result shown in the video.[youtube]https://youtu.be/IAvVFnrepeE[/youtube] Instead I wish the foot pad could be parallel to the ground, although that is not fit the dynamics. What could I do?

Re: How could i add a planar contraints?

Posted: 21 Jun 2022, 07:35
by coppelia
Hello,

in that case you will have to actuate the spherical joint, which is not directly possible. You'll have to replace the spherical joint with:

Code: Select all

revJoint1 --> auxShape --> revJoint2
where revJoint1 and revJoint2 are perpendicular to each other. Then, set those joints in position control mode and compute their angles, so that the pad remains parallel to the ground. Best is to add the control of those 2 joints in a joint callback function.

Cheers