virtualmodelcontrol.sim.rollout¶
-
rollout(system, q0, T, dt, *, v0=
None, integrator='implicit', max_step=0.001, runtime=(), p=None, z0=None, u=None, output=())¶ Simulate the closed loop for
T[s]: the controller everydt, held, and the robot in steps of at mostmax_stepofintegrator(implicit,rk4,cvodes).Row k of
t,q,v,z(if the controller has virtual states) andu(motor torques) is the state at the start of step k and the command computed from it, likerun.preplaces the live Params (ascompiled.live_values()); a CasADi MX symbol gives the results as MX expressions to differentiate. Withu, motor torques [N·m] with one row per step, the robot gets them instead of the controller’s command (open loop, as in a logged run).outputlists output stages with asymbolicform (control.StaticFrictionCompensation), applied to the controller’s command asVMCController(output=)applies them.- Parameters:¶
- system : VirtualMechanismSystem¶
- q0 : numpy.typing.ArrayLike¶
- T : float¶
- dt : float¶
- v0 : TypeAliasForwardRef('numpy.typing.ArrayLike') | None¶
- integrator : str¶
- max_step : float¶
- runtime : Iterable[str]¶
- p : Any¶
- z0 : TypeAliasForwardRef('numpy.typing.ArrayLike') | None¶
- u : TypeAliasForwardRef('numpy.typing.ArrayLike') | None¶
- output : Iterable[Any]¶
- Return type:¶