step.motion.custom_velocity_dsl¶
Auto-generated step builders and DSL functions — DO NOT EDIT.
Source: custom_velocity.py
Classes¶
Builder for CustomVelocity. Auto-generated — do not edit. |
Functions¶
|
Motion step driven by a user-supplied velocity function. |
Module Contents¶
- class step.motion.custom_velocity_dsl.CustomVelocityBuilder¶
Bases:
raccoon.step.step_builder.StepBuilderBuilder for CustomVelocity. Auto-generated — do not edit.
- velocity_fn(value: step.motion.custom_velocity.VelocityFn)¶
- step.motion.custom_velocity_dsl.custom_velocity(velocity_fn: step.motion.custom_velocity.VelocityFn = _UNSET, until: raccoon.step.condition.StopCondition | None = None)¶
Motion step driven by a user-supplied velocity function.
Each update cycle
velocity_fn(robot, dt)is called and the returned(vx_pct, vy_pct, omega_pct)fractions (-1.0 to 1.0) are multiplied by the configured max velocities for each axis before being applied to the drive velocity controller. The loop runs until the optionaluntilcondition fires, at which point the baseMotionStepcallson_stopand executesrobot.drive.hard_stop().- Parameters:
velocity_fn – Callable receiving
(robot, dt)and returning(vx_pct, vy_pct, omega_pct)fractions in[-1.0, 1.0].until – Optional stop condition checked before each velocity update.
- Returns:
A CustomVelocityBuilder (chainable via
.velocity_fn(),.until(),.on_anomaly(),.skip_timing()).
Example:
from raccoon.step.motion import custom_velocity custom_velocity()