google-deepmind / mujoco

Multi-Joint dynamics with Contact. A general purpose physics simulator.
https://mujoco.org
Apache License 2.0
7.74k stars 768 forks source link

How to use weld to fix a cable on the link? #1553

Open Wangzihao12ous opened 5 months ago

Wangzihao12ous commented 5 months ago

I used weld to fix a cable on the link2 , but in simulate if i apply force on the cable ,the cable will be separated from the link2. Here is the code:

    <weld name="right_boundary1" body1="1B_last" body2="link2_cable_2" anchor="0 0 0" />
    <weld name="right_boundary2" body1="2B_last" body2="link2_cable_3" anchor="0 0 0" />
Wangzihao12ous commented 5 months ago

I used weld to fix a cable on the link2 , but in simulate if i apply force on the cable ,the cable will be separated from the link2. Here is the code: `

    <weld name="right_boundary1" body1="1B_last" body2="link2_cable_2" anchor="0 0 0" />
    <weld name="right_boundary2" body1="2B_last" body2="link2_cable_3" anchor="0 0 0" />
</equality>`

The gray ball is the weld point. 微信图片_20240327201241

Wangzihao12ous commented 5 months ago

And how to make the cable through the small hole in link? The cable have no gemo name,so i cant use contact pair. 微信图片_20240327202024

yuvaltassa commented 4 months ago

why are you not using tendons?

Wangzihao12ous commented 4 months ago

why are you not using tendons?

Thank you! I need to use rigid cable in the simulation,ensure that the force on the cable is consistent and there is as little deformation as possible.

yuvaltassa commented 4 months ago

And which part of this do you think you cannot do with a tendon?

Wangzihao12ous commented 4 months ago

And which part of this do you think you cannot do with a tendon?

Thank you!In the model I hope to achieve, I can change the position of the first site where the tendon is located, in order to change the length of the tendon. I used muscles and general as actuator, but the results were not very good.