coppeliasim soft-body question

Typically: "How do I... ", "How can I... " questions
Post Reply
z1257153099
Posts: 3
Joined: 08 Dec 2023, 08:46

coppeliasim soft-body question

Post by z1257153099 »

I would like to ask some questions about mujoco soft body simulation. When I tried to minimize the z-count of the purple soft body provided by the official soft body scene example and the spacing and gem spheres radius, the soft body shape would become protruding. Could you please help me solve this problem.

z1257153099
Posts: 3
Joined: 08 Dec 2023, 08:46

Re: coppeliasim soft-body question

Post by z1257153099 »

such as:
Image
Image

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

Re: coppeliasim soft-body question

Post by coppelia »

Hello,

interresting effect... not sure where it comes from. It is not that adjaceent nodes touch or push each other. You can visualize this by adding this to sensing:

Code: Select all

        if not sphereCont then
            sphereCont=sim.addDrawingObject(sim.drawing_spherepts,0.005,0,-1,0,{1,0,0})
        end
        local a=simMujoco.getCompositeInfo(injectionId,2)
        sim.addDrawingObjectItem(sphereCont,nil)
        sim.addDrawingObjectItem(sphereCont|sim.handleflag_setmultiple,a.info)
And that to sysCall_afterSimulation:

Code: Select all

sim.addDrawingObjectItem(sphereCont,nil)
And you will see that the nodes (in red) are correctly aligned. One solution would be to increase the z-count (as well as the x- and y-counts), and decrease further the spacing.

Cheers

Post Reply