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.
Create a
frame containerinstance. See Frames layer recipes section.Create a
multibodysystem.See Rigid multibody models recipes section for options on creating rigid multibody systems manually, procedurally, or from URDF,
data structetc files.See Flexible body dynamics recipes section for adding flexible bodies to the multibody systems.
Create a
state propagatorinstance. See State Propagation recipes section.Use the
TREE_DYNAMICSsolver type
Create
KModelinstances to apply forces and poll the dynamics. See recipe_kmodels_register_sec recipes section.Set
state propagatorinitial state. See Setting state propagator state recipes section.[OPTIONAL] Analysis aids
Set up 3D graphics visualization. See Graphics visualization.
Set up plotting. See Plotting recipes section.
Set up data logging. See Data logging recipes section.
[OPTIONAL] Set up simulation
timed events. See Using events recipes section.Advance simulation time by calling either
advanceTo(){py:meth} oradvanceBy()methods of thestate propagatorinstance.[OPTIONAL] Clean up and shutdown the simulation.
[OPTIONAL] Process data logged output. See Data logging recipes section.
Closed-chain multibody dynamics simulaton#
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 thos for Serial-chain/Tree multibody system dynamics simulation section. The differences are highlighted like so.
Create a
frame containerinstance. See Frames layer recipes section.Create a
multibodysystem.See Rigid multibody models recipes section for options on creating rigid multibody systems manually, procedurally, or from URDF,
data structetc files.See Flexible body dynamics recipes section for adding flexible bodies to the multibody systems
[OPTIONAL] Add any additional
bilateral constraintbetween 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.[OPTIONAL] Do static kinematics analysis of the closed-chain multibody system. See the Pose-level constraint kinematics and Velocity-level constraint kinematics recipe sections.
Create a
state propagatorinstance. See State Propagation recipes section.Use the
TREE_AUGMENTED_DYNAMICSsolver type
Create
KModelinstances to apply forces and poll the dynamics. See recipe_kmodels_register_sec recipes section.Set
state propagatorinitial state. See Setting state propagator state recipes section.It is important that the multibody initial state satisfy the
bilateral constraintat both the pose and velocity levels. You can check the initial errors using theposeError()andvelError()methods. discussed in the Pose-level constraint kinematics and Velocity-level constraint kinematics recipe sections.
[OPTIONAL] Analysis aids
Set up 3D graphics visualization. See Graphics visualization.
Set up plotting. See Plotting recipes section.
Set up data logging. See Data logging recipes section.
[OPTIONAL] Set up simulation
timed events. See Using events recipes section.Advance simulation time by calling either
advanceTo()oradvanceBy()methods of thestate propagatorinstance.[OPTIONAL] Clean up and shutdown the simulation.
[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 thos for Serial-chain/Tree multibody system dynamics simulation and Closed-chain multibody dynamics simulaton sections. The differences are highlighted in red.
Create a
frame containerinstance. See Frames layer recipes section.Create a
multibodysystem.See Rigid multibody models recipes section for options on creating rigid multibody systems manually, procedurally, or from URDF,
data structetc files.
Set up collision data. See Collision dynamics in the usage guide.
instantiate a collision scene
add collision geometries for thh bodies.
set up collision filters.
add default or custom contact force models
Create a
state propagatorinstance. See State Propagation recipes section.Create
KModelinstances to apply forces and poll the dynamics. See recipe_kmodels_register_sec recipes section.Set
state propagatorinitial state. See Setting state propagator state recipes section.[OPTIONAL] Analysis aids
Set up 3D graphics visualization. See Graphics visualization.
Set up plotting. See Plotting recipes section.
Set up data logging. See Data logging recipes section.
[OPTIONAL] Set up simulation
timed events. See Using events recipes section.Advance simulation time by calling either
advanceTo(){py:meth} oradvanceBy()methods of thestate propagatorinstance.[OPTIONAL] Clean up and shutdown the simulation.
[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 (eg. 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 equiibration
State space model generation
Stress recovery process