scenarioSimpleDocking
It’s recommended to review the following scenario(s) first (and any recommended scenario(s) that they may have):
examples/mujoco/scenarioArmWithThrusters.py
This script shows how one can simulate two independent spacecraft
docking and constraining their movement with respect to each other.
This illustrates the use of MuJoCo equality in MJScene.
The single MJScene is
sent to Vizard as two individual spacecraft, hub_1
and hub_2. The system can also be visualized in Vizard
through the enableUnityVisualization call.
The multi-body system is defined in the XML file sats_dock.xml.
The system defined in this XML file is simple, but it illustrates some
of the tools MuJoCo offers for our simulation needs. First, this shows
how contact physics can be disabled through flag contact="disable".
Second, it illustrates how two free-floating bodies can be defined.
Third, it shows how to declare an equality.
Equalities are a way to add dynamical constraints to a system. In this case, we use a ‘weld’ constraint between two sites, which tells MuJoCo to enforce that the frames associated with the sites are aligned. This prevents any relative movement between them, and thus between the bodies that they are attached to. We use this to simulate the dynamics after docking. MuJoCo will automatically compute the force and torques that are produced at this point to ensure the equality constraint is met.
For more information about constraints, see https://mujoco.readthedocs.io/en/stable