Connect Multiple Deformable Object with Single Rigid Part #5329
-
Connect Multiple Deformable Object with Single Rigid PartHello creative community members (@EulalieCoevoet @damienmarchal @alxbilger @hugtalbot @bakpaul @olivier-goury ), I'm trying to reproduce a simulation similar to the one in the Soft Robotic Toolkit. However, I'm encountering an issue with the connector part (see the image below): I found a related discussion on a similar structure here, which suggests a spring formulation to simplify the connection. My goal is to use a Below is the code I'm using (inspired by the soft robots plugin tutorial CableGripper). Currently, the simulation produces an unexpected behavior: the deformable part appears to be fixed in the global frame's fixing box rather than being attached to the I’d really appreciate any guidance or suggestions, as I've been stuck on this for several days. Screencast.from.03-14-2025.03.27.08.AM.webm # Connect with deformable part (questionable)
for i in range(bellow_num):
angle_rad = math.radians(i * angle_step)
x = radius * math.cos(angle_rad)
z = radius * math.sin(angle_rad)
# Get the bellow model - assuming it has a "modelNode" as in typical Bellow implementation
bellow = selfNode.getChild(f"Bellow{i+1}")
# Create a BoxROI to select the top surface of each bellow
top_margin = 3.0 # Height from top of bellow to select
box_half_size = 12.0 # Half size of the box in x and z
bellow.addObject('BoxROI',
name="topROI",
box=[x - box_half_size, height - 43 + top_margin, z - box_half_size,
x + box_half_size, height - 43, z + box_half_size],
drawBoxes=True)
bellow.addObject('RestShapeSpringsForceField',
name="attachToConnector",
points="@topROI.indices",
external_rest_shape='@../ConnectorCap/dofs',
stiffness=1e12,
angularStiffness=1e12)
# Environment: Ubuntu 22.04 + SOFA_24.06.00 binary |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
Hello ! If I understood correctly, what you are trying to do here is to attach both object with springs ? If so, you shouldn't be using the RestShapeSpringForcefield which is only here to attach body in space. What you should use is a SpringForceField. To do so you need to specify the two objects |
Beta Was this translation helpful? Give feedback.
-
|
I temporarily solved this questions by assigning different material parameters to one single part to mimic the rigid part, instead of doing the complicated connection. |
Beta Was this translation helpful? Give feedback.



I temporarily solved this questions by assigning different material parameters to one single part to mimic the rigid part, instead of doing the complicated connection.