Page 1 of 1

How to move the deformable targets by suction tools

Posted: 31 Jan 2023, 08:23
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.

Re: How to move the deformable targets by suction tools

Posted: 31 Jan 2023, 17:42
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

Re: How to move the deformable targets by suction tools

Posted: 01 Feb 2023, 04:04
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!

Re: How to move the deformable targets by suction tools

Posted: 02 Feb 2023, 13:07
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

Re: How to move the deformable targets by suction tools

Posted: 03 Feb 2023, 01:20
by Keven Sun
Thanks for your help. My platform is ubuntu 20.04. I can't wait to try the beta version!

Re: How to move the deformable targets by suction tools

Posted: 03 Feb 2023, 19:36
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