google-deepmind / mujoco

Multi-Joint dynamics with Contact. A general purpose physics simulator.
https://mujoco.org
Apache License 2.0
7.82k stars 780 forks source link

Modify the connection relationship during operation #20

Closed haoboluo closed 1 year ago

haoboluo commented 2 years ago

I would like to express my gratitude to the contributors of MuJoCo. This issue is posted to seek advice on changing the connection relationship online.

At present, most simulation engines such as MuJoCo have defined fixed connection relationships before running, such as MJCF, URDF, etc. This limits the simulation of modular self-reconfigurable robots, which need to change the connection relationship between modules during operation, such as changing from a snake-shaped robot to a three-legged robot. In other words, the parent-child relationship, maybe also the joints, between the different links of the robot will change during the simulation, but the 3D position of the links will remain unchanged. For example, in the figure below, module 3 was originally connected to module 2. At a certain moment in the simulation, module 3 was disconnected from module 2 and then connected to module 1, but its 3D position remained unchanged.

图片

Look forward to getting suggestions from the community. Thanks in advance.

rjeli commented 2 years ago

you could define equalities for every possible connection and change whether they are active at runtime? not sure how that would affect stability of the kinematic tree.

haoboluo commented 1 year ago

Hi, thanks for your suggestion! I tried the solution you gave, but I ended up using the new adhesion actuators.

https://mujoco.readthedocs.io/en/latest/XMLreference.html#actuator-adhesion

you could define equalities for every possible connection and change whether they are active at runtime? not sure how that would affect stability of the kinematic tree.