Search code examples
webots

How to attach Connector after locking


I created a small sample simulation with a custom gripper and "handle". To connect the gripper to the object I used the Connector. Locking seems to work. However, I can't get the object move together with the gripper after locking.

Any ideas on how to solve this?

Below is a picture of the simulation. To clarify what I mean, I want the can to move together with the robot gripper after locking the Connectors. enter image description here

Update: Here is the screenshot with Connector display enabled: enter image description here


Solution

  • First, I strongly recommend enabling the connector axes visualization to better understand what is happening from the menu 'View / Optional Rendering / Show Connector Axes'

    From your Connector definition they are several things to pay attention (https://cyberbotics.com/doc/reference/connector#field-summary):

    • The 'type' field should be "active" for the robot and "passive" for the can.
    • The 'model' field of both connectors should be the same.
    • The 'unilateralLock' and 'unilateralUnlock' should probably be true in your case.
    • It may also be convenient to set the 'snap' field to true.

    Finally, you may also want to check this sample simulation using connectors too: https://cyberbotics.com/doc/guide/samples-devices#connector-wbt