getWheelSpeed method

double getWheelSpeed(
  1. int wheelIndex
)

Get current rotational velocity of a wheel

Implementation

double getWheelSpeed(int wheelIndex){
  final axis = wheelAxes[wheelIndex];
  final wheelBody = wheelBodies[wheelIndex];
  final w = wheelBody.angularVelocity;
  chassisBody.vectorToWorldFrame(axis, _worldAxis);
  return w.dot(_worldAxis);
}