How to move the deformable targets by suction tools

Typically: "How do I... ", "How can I... " questions
Post Reply
Keven Sun
Posts: 10
Joined: 15 Aug 2022, 08:13

How to move the deformable targets by suction tools

Post by Keven Sun »

Hello,

I'm trying to move a softbox and a cloth by UR5 with a suction tool. The deformable targets are easily created under MuJoCo, but it seems that they cannot be sucked up by the tool.

Is there any feasible solution to achieve this goal?

thanks a lot.

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

Re: How to move the deformable targets by suction tools

Post by coppelia »

Hello,

you will have to attach the composite to another object via an equality constraint. E.g. in case of a softBody composite (cuboid), something like:

Code: Select all

        xml='<connect body1="'..prefix..'" '
        xml=xml..' body2="'..sim.getObjectAlias(sim.getObject('/Floor'),4)..'"'
        xml=xml..' anchor="0 0 0"/>'
        simMujoco.injectXML(xml,'equality')
You wil have to compute the correct anchor point at the point of attachment though.

Cheers

Keven Sun
Posts: 10
Joined: 15 Aug 2022, 08:13

Re: How to move the deformable targets by suction tools

Post by Keven Sun »

Thanks for your help, it works!

One more question, It seems that the constraint should be set in sysCall_init() function. Can I remove this constraint when the softbox is dropped by tools? Further, can the xml be modified during simulation, for example, remove the constraint mentioned above, or add <pin coord> for cloth?

Thanks!

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

Re: How to move the deformable targets by suction tools

Post by coppelia »

Yes, you can remove this constraint or composite via simMujoco.removeXML. You can also correctly regenerate such a constraint via a callback mechanism. That will be available in CoppeliaSim V4.5
If you tell me your platform, then we will provide a beta version.

Cheers

Keven Sun
Posts: 10
Joined: 15 Aug 2022, 08:13

Re: How to move the deformable targets by suction tools

Post by Keven Sun »

Thanks for your help. My platform is ubuntu 20.04. I can't wait to try the beta version!

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

Re: How to move the deformable targets by suction tools

Post by coppelia »

You can find the beta versions here. Keep in mind that only the Ubuntu20 file has the features you are looking for.

Cheers

Post Reply