Two wheels differential drive with dynamic constraints#

module:

navground.core.kinematics

Bases: TwoWheelsDifferentialDriveKinematics, WheeledKinematics

Two differential drive wheels (left, right) (e.g., a wheelchair) with acceleration limits due to limited motor torque.

The two motors have the same maximal torque.

Registered properties:

Constructs a new instance.

Parameters:
  • max_speed – The maximal wheel speed

  • wheel_axis – The wheel axis (i.e., the distance between the wheels)

  • max_angular_speed – The maximal angular speed, that is also limited by the 2 * max_speed / axis, if the axis is positive.

  • max_forward_speed – The maximal linear speed when moving forwards (set to negative or infinite to leave unconstrained)

  • max_backward_speed – The maximal linear speed when moving backwards (set to negative or infinite to leave unconstrained)

  • max_acceleration – The maximal linear body acceleration

  • moi – The scaled moment of inertial (moi = I / (mass * axis^2 / 8)) Equal to 1 for an homogeneous disc of diameter wheel_axis.

Applies wheel torques to accelerate a twist over a time step

Does not check the motor torques are feasible.

Parameters:
  • values – The motor torques

  • current – The current twist

  • time_step – The time step

Returns:

The accelerated twist.

Computes the wheel torques required to accelerate over a time step

Parameters:
  • value – The target value

  • current – The current value

  • time_step – The time step

Returns:

{left, right} wheel torques. May not be feasible

Type:

float

The maximal (body) acceleration.

Type:

float

The maximal (body) angular acceleration.

Type:

float

The maximal [scaled] wheel torque.

Type:

float

The scaled moment of inertial

it is equal to 1 for an homogeneous of disc of diameter twowheelsdifferentialdrivekinematics.wheel_axis. lower for when weight is shifted towards the center.