Mucojo rope actuation setup

Typically: "How do I... ", "How can I... " questions
Post Reply
r_dhak
Posts: 18
Joined: 02 Jan 2019, 15:10

Mucojo rope actuation setup

Post by r_dhak »

Hello,

Its really exciting that coppeliasim now supports soft bodies.
However I think the new Mujoco inclusion lacks some explanation and tutorials.

I am just playing around with it at the moment.

I am trying to make a simulation like shown in the image below, where the anchors (which can be seen as pulleys) provides cable lengths as control inputs to manipulate the position of the attached object.



Image
https://drive.google.com/file/d/1b_kpuR ... sp=sharing


Not sure if it is possible with coppeliasim at the moment to get the the cable sag information. It is shown how a rope behaves dynamically in the Mujocospecific tutorial, but I would like to know if any quantitative information can be obtained about the sag and dynamic behavior.

I think the actuated tendon should be combined with the rope to make the rope actuation, not sure if it is possible though.

Any help, suggestion or advice is greatly appreciated.

Thank you.

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: Mucojo rope actuation setup

Post by coppelia »

Hello,

the tendon functionality in MuJoCo does not offer simulation of the cable sag, since they have no mass. One could however use a rope, which is a serial construction of bodies and joints, and simulated in MuJoCo via a composite. You will have to find out how long those ropes can be while still staying relatively stable (not that long from our initial tests).

The actuated tendon has a bug in the demo scene, one should associate it with the prismatic joint.

Cheers

r_dhak
Posts: 18
Joined: 02 Jan 2019, 15:10

Re: Mucojo rope actuation setup

Post by r_dhak »

Thank you for your reply.

I Have one more question.
Is it possible to attach multiple rope to one object (sphere), If yes, then how? Because in the mujoco specific scene one rope has one child object attached to it.

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: Mucojo rope actuation setup

Post by coppelia »

I think this is possible. At least, if in MuJoCo it is possible, then it should also be possible in CoppeliaSim. You will however have to closely look at the demo scene scenes/mujocoSpecific.ttt and imitate the way the one sphere is attached to the rope. You will have to know how MuJoCo composite bodies are named, and use a connect item in the equality element, and inject this via simMujoco.injectXML, in a very similar way as was done with the sphere. As far as I know, the bodies connected to a rope will have to be in the correct position already.

Cheers

r_dhak
Posts: 18
Joined: 02 Jan 2019, 15:10

Re: Mucojo rope actuation setup

Post by r_dhak »

Thank you for the answer I managed to attach multiple rope to one object.
https://drive.google.com/file/d/12cFj9D ... sp=sharing

I would like to know if there is a possibility to change rope length in runtime using remote API, like how we do for joints by sim.setJointPosition. Also can the current length of the rope be observed using the remote API like sim.getObjectPosition.

Thank you.

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: Mucojo rope actuation setup

Post by coppelia »

A composite object in MuJoCo (i.e. the rope) cannot be modified in that ragard. If you need to modify the length of the rope during simulation, while still keeping the mass-spheres distributed along the rope, I'd then go a different path. Have a look at this scene, that represents the idea, but in simplified:

A rope is instead built manually (one could also write an add-on to generate a rope according to specific parameters), with intertwined prismatic joints in position control. To increase/reduce the length of a given rope, one would simply modify the target position of those prismatic joints.

Cheers

ZnMnCr
Posts: 2
Joined: 10 Nov 2023, 16:11

Re: Mucojo rope actuation setup

Post by ZnMnCr »

r_dhak wrote: 11 Oct 2022, 08:47 Thank you for the answer I managed to attach multiple rope to one object.
https://drive.google.com/file/d/12cFj9D ... sp=sharing

I would like to know if there is a possibility to change rope length in runtime using remote API, like how we do for joints by sim.setJointPosition. Also can the current length of the rope be observed using the remote API like sim.getObjectPosition.

Thank you.
Could you please explain in detail how to realize the connection of multiple ropes to the same object? Now I am learning mujoco, but there is no material reference.

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: Mucojo rope actuation setup

Post by coppelia »

When modelling the robot within CoppeliaSim, via many body-joint elements connected together, you can do like explained here.

Otherwise, when using rope composites, try to connect them via equality element injections (check out the MuJoCo example scenes and simMujoco.injectXML)

Cheers

Post Reply