step.motion.custom_velocity_dsl

Auto-generated step builders and DSL functions — DO NOT EDIT.

Source: custom_velocity.py

Classes

CustomVelocityBuilder

Builder for CustomVelocity. Auto-generated — do not edit.

Functions

custom_velocity([velocity_fn, until])

Motion step driven by a user-supplied velocity function.

Module Contents

class step.motion.custom_velocity_dsl.CustomVelocityBuilder

Bases: raccoon.step.step_builder.StepBuilder

Builder for CustomVelocity. Auto-generated — do not edit.

velocity_fn(value: step.motion.custom_velocity.VelocityFn)
until(value: raccoon.step.condition.StopCondition | None)
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 optional until condition fires, at which point the base MotionStep calls on_stop and executes robot.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()