Skip to content

differential

Array API differential-drive controller for batched ground vehicles.

Classes:

Name Description
DifferentialDriveController

PX4-style position/heading cascade with differential speed allocation.

DifferentialDriveController

DifferentialDriveController(params: VehicleParams, control_mask: dict | None = None, gains: dict | None = None, limits: dict | None = None, num_envs: int = 1, device=None, *, backend: BackendName | None = None, xp: ModuleType | None = None)

Bases: ControllerBase

PX4-style position/heading cascade with differential speed allocation.

The output is [left, right] drive-shaft angular velocity in rad/s. The controller is independent of wheel count: a platform adapter commands one physical drive joint per side, while backend mechanical constraints synchronize any follower road wheels or wheel shells.

Initialize the batched differential-drive controller.

Methods:

Name Description
randomize

Randomize gains and limits for selected environments.

reset

Reset all PID state for selected environments.

update

Compute left/right drive-shaft angular-velocity targets in rad/s.

Attributes:

Name Type Description
params VehicleParams

Vehicle parameters for the controller.

params instance-attribute

params: VehicleParams = params

Vehicle parameters for the controller.

randomize

randomize(env_ids=None, gains: dict[str, Any] | None = None, limits: dict[str, Any] | None = None)

Randomize gains and limits for selected environments.

reset

reset(env_ids=None)

Reset all PID state for selected environments.

update

update(target: ControllerTarget, state: ControllerState) -> ArrayLike

Compute left/right drive-shaft angular-velocity targets in rad/s.