StepIt plugin for composing control policies from modules.
stepit::modular_policy::Actuator: defines how to apply actions to the robot.stepit::modular_policy::Module: provides fields according to input fields.
-
stepit::Policy:modular: module-based control policy.
-
stepit::modular_policy::Actuator:Name Description positionTranslates actions to joint position commands. velocityTranslates actions to joint velocity commands. torqueTranslates actions to joint torque commands. hybridTranslates actions to a combination of joint commands. -
stepit::modular_policy::Module:Name Description action_historyProvides history of action commands. action_filterApplies low-pass filtering to action commands. action_reorderingReorders action commands. field_opsApplies generic field operations. joint_reorderingReorders joint states. time_sourceProvides step count and current policy time.
Classes derived from Module require to declare their input dependencies (requirements) and output fields
(provisions) by registering named fields through a global FieldManager. FieldManager assigns a unique ID to each
field and merges its declared size and scalar data type. At runtime, modules sequentially produce or process values
identified by FieldId.
ModularPolicy orchestrates a set of Module instances into a policy pipeline. It:
- Loads YAML configuration, reads user‐specified modules and adds a configured
Actuator. - Ensures the
actionfield has a source, then resolves dependencies by creating modules from unresolved requirements. - Resolves execution order from declared
requirements/provisions, and reports circular or duplicate providers. - On
reset(), callsreset()on each resolved module. - In each
act()step, sequentially invokesupdate(), takesactionfrom the field map, and sends it to the robot through theActuator. - After
act()returns and the low-level command is handed off, runs a post-act phase for module state latching and slower work such as publishing configured fields.