Program skeletons#

Serial-chain/Tree multibody system dynamics simulation#

The following is an outline of the major steps involved in setting up a time-domain simulation for a multibody system with serial-chain or tree topology.

  1. Create a frame container instance. See Frames layer recipes section.

  2. Create a multibody system.

    1. See Rigid multibody models recipes section for options on creating rigid multibody systems manually, procedurally, or from URDF, data struct etc files.

    2. See Flexible body dynamics recipes section for adding flexible bodies to the multibody systems.

  3. Create a state propagator instance. See State Propagation recipes section.

    1. Use the TREE_DYNAMICS solver type

  4. Create KModel instances to apply forces and poll the dynamics. See Registering and unregistering a KModel recipes section.

  5. Set state propagator initial state. See Setting state propagator state recipes section.

  6. [OPTIONAL] Analysis aids

    1. Set up 3D graphics visualization. See Graphics visualization.

    2. Set up plotting. See Plotting recipes section.

    3. Set up data logging. See Data logging recipes section.

  7. [OPTIONAL] Set up simulation timed events. See Using events recipes section.

  8. Advance simulation time by calling either advanceTo() {py:meth} or advanceBy() methods of the state propagator instance.

  9. [OPTIONAL] Clean up and shutdown the simulation.

  10. [OPTIONAL] Process data logged output. See Data logging recipes section.

Closed-chain multibody dynamics simulation#

The following is an outline of the major steps involved in setting up a time-domain simulation for a multibody system with closed-chain topology, i.e. systems with bilateral constraints between bodies. The steps are very similar to those for Serial-chain/Tree multibody system dynamics simulation section. The differences are highlighted like so.

  1. Create a frame container instance. See Frames layer recipes section.

  2. Create a multibody system.

    1. See Rigid multibody models recipes section for options on creating rigid multibody systems manually, procedurally, or from URDF, data struct etc files.

    2. See Flexible body dynamics recipes section for adding flexible bodies to the multibody systems

  3. [OPTIONAL] Add any additional bilateral constraint between bodies. See the Using Bilateral Closure Constraints recipes section. This step may not be needed if the model loaded in the previous step already sets up the bilateral constraints.

  4. [OPTIONAL] Do static kinematics analysis of the closed-chain multibody system. See the Pose-level constraint kinematics and Velocity-level constraint kinematics recipe sections.

  5. Create a state propagator instance. See State Propagation recipes section.

    1. Use the TREE_AUGMENTED_DYNAMICS solver type

  6. Create KModel instances to apply forces and poll the dynamics. See Registering and unregistering a KModel recipes section.

  7. Set state propagator initial state. See Setting state propagator state recipes section.

    1. It is important that the multibody initial state satisfy the bilateral constraint at both the pose and velocity levels. You can check the initial errors using the poseError() and velError() methods. discussed in the Pose-level constraint kinematics and Velocity-level constraint kinematics recipe sections.

  8. [OPTIONAL] Analysis aids

    1. Set up 3D graphics visualization. See Graphics visualization.

    2. Set up plotting. See Plotting recipes section.

    3. Set up data logging. See Data logging recipes section.

  9. [OPTIONAL] Set up simulation timed events. See Using events recipes section.

  10. Advance simulation time by calling either advanceTo() or advanceBy() methods of the state propagator instance.

  11. [OPTIONAL] Clean up and shutdown the simulation.

  12. [OPTIONAL] Process data logged output. See Data logging recipes section.

Contact/Collision dynamics simulation#

The following is an outline of the major steps involved in setting up a time-domain simulation with contact and collision dynamics for a rigid-body multibody system with tree or closed-chain topology. The steps are very similar to those for Serial-chain/Tree multibody system dynamics simulation and Closed-chain multibody dynamics simulation sections. The differences are highlighted in red.

  1. Create a frame container instance. See Frames layer recipes section.

  2. Create a multibody system.

    1. See Rigid multibody models recipes section for options on creating rigid multibody systems manually, procedurally, or from URDF, data struct etc files.

  3. Set up collision data. See Collision dynamics in the usage guide.

    1. instantiate a collision scene

    2. add collision geometries for the bodies.

    3. set up collision filters.

    4. add default or custom contact force models

  4. Create a state propagator instance. See State Propagation recipes section.

  5. Create KModel instances to apply forces and poll the dynamics. See Registering and unregistering a KModel recipes section.

  6. Set state propagator initial state. See Setting state propagator state recipes section.

  7. [OPTIONAL] Analysis aids

    1. Set up 3D graphics visualization. See Graphics visualization.

    2. Set up plotting. See Plotting recipes section.

    3. Set up data logging. See Data logging recipes section.

  8. [OPTIONAL] Set up simulation timed events. See Using events recipes section.

  9. Advance simulation time by calling either advanceTo() {py:meth} or advanceBy() methods of the state propagator instance.

  10. [OPTIONAL] Clean up and shutdown the simulation.

  11. [OPTIONAL] Process data logged output. See Data logging recipes section.

Closed-loop simulations#

  • set up platform dynamics simulation (using above approaches)

  • pick option for the external s/w - wrapped in a KModel, IPC (e.g., ROS)

  • define input/output interfaces for closing the loop

Robotics system analysis#

  • create frame container

  • create mbody systems - options manually, procedurally, from

  • FK, IK, Jacobian, CM , overall inertia, gravity compensation, computed torque, mass matrix, mass matrix inverse,

Embedded model manager in control stack#

  • create frame container

  • create mbody systems - options manually, procedurally, from

Training simulator#

  • create frame container

  • create mbody systems - options manually, procedurally, from

  • set up gymnasium

Flexible body dynamics simulation#

  • FEMBridge use

  • State equilibration

  • State space model generation

  • Stress recovery process