APIΒΆ

Scripts start with import virtualmodelcontrol as vmc: the classes and functions of the tutorials, and the modules vmc.sim, vmc.viz and the others below, are available from there. The robot templates are the one exception: import them as from virtualmodelcontrol.robots import helyx (or adapt, bimanual, turtle). The modules, from the bottom layer up:

core

Core: parameters, spaces, symbolic helpers, signals, registry and units.

math

Rotations and rigid transforms that run on numpy arrays and CasADi symbols alike.

mechanisms

Mechanisms: coordinates and the components that act on them.

models

Models: kinematics and actuation of robots.

system

A robot and the virtual mechanism that controls it, as one system.

compiler

Compile a virtual mechanism system into CasADi functions: the control law and its energetics.

dynamics

Robot dynamics assembled from the robot's own components, in the canonical residual form.

control

Control: controllers built from compiled virtual mechanisms.

sim

Simulation and the run loop: plants, a model-based simulator, guard and recorder.

adaptation

Adaptation: laws that change a running controller's Params to track a goal.

estimation

Estimation: the state of a running robot and quantities no sensor measures, from its model.

identification

Identification: robot parameters from measured data.

optimization

Optimization of virtual mechanisms: plan the closed loop's motion and tune the Params.

hardware

Hardware profiles: each robot's motors, their IDs, signs and the driver's order.

viz

Figures and animations: the lab style, drawing robots and virtual elements, saving.

robots

Robot templates: model builders and default parameters for the lab's robots.

config

Configurations: experiments in YAML files, a robot template, its controllers and how to run them, built through the registry.

testing

Checks of the library's model contract, to call from your own model's tests.