scenarioMJSceneVizard

This scenario builds on scenarioDeployPanels to show how multiple MJScene instances and a regular C++ Module: spacecraft object coexist in one simulation and feed Vizard through a single enableUnityVisualization call:

  • Primary hub (MJScene, red, 6 panels): loaded from sat_w_deployable_panels.xml - the same XML used by scenarioDeployPanels.py. Circular 500 km LEO around Earth, PID deployment, and a four-unit CSS pyramid on the hub.

  • Companion hub (MJScene, blue, 2 panels): loaded from sat_w_companion.xml. Same circular LEO, 15 m ahead along-track, with a Vizard star tracker on the hub.

  • Trailer (regular Basilisk C++ Module: spacecraft): point-mass body 15 m behind the primary along-track, gravity wired through the standard gravFactory.addBodiesTo plumbing, with a Vizard transceiver (downlink antenna).

Illustration of Simulation Results

This scenario does not generate plots; instead it writes to examples/mujoco/_VizFiles/scenarioMJSceneVizard_UnityViz.bin if the user uncomments the saveFile=__file__ line.

class scenarioMJSceneVizard.PIDController(*args, **kwargs)[source]

Bases: StatefulSysModel

scenarioMJSceneVizard.addOrbitalGravity(scene, mu, modelCache)[source]

Apply central-body point-mass gravity to every body in scene.

Uses C++ Module: NBodyGravity with one gravity target per body (hub plus each deployable panel), so the field is evaluated and applied at each body’s true center of mass. The whole structure is then in physical orbital freefall — the appendages are weightless — while the gravity gradient across it is captured.