36 Chassis(
float wheelDiam = 7,
float ticksPerRevolution = 1440,
float wheelTrack = 14.7)
71 void setTwist(
float forwardSpeed,
float turningSpeed);
81 void driveFor(
float forwardDistance,
float forwardSpeed,
bool block =
false);
89 void turnFor(
float turnAngle,
float turningSpeed,
bool block =
false);
void idle(void)
Idles chassis. Motors will stop.
const uint16_t ctrlIntervalMS
const float cmPerEncoderTick
void turnFor(float turnAngle, float turningSpeed, bool block=false)
Commands the chassis to turn a set angle.
void updateEncoderDeltas()
void init(void)
Initializes the chassis. Must be called in setup().
void driveFor(float forwardDistance, float forwardSpeed, bool block=false)
Commands the robot to drive at a distance and speed.
bool checkMotionComplete(void)
Checks if the motion commanded by driveFor() or turnFor() is done.
void setTwist(float forwardSpeed, float turningSpeed)
Sets target motion for the chassis.
void setMotorEfforts(int leftEffort, int rightEffort)
Sets motor efforts. Max speed is 420.
void printEncoderCounts(void)
void setMotorPIDcoeffs(float kp, float ki)
Sets PID coefficients for the motors. Not independent.
Chassis(float wheelDiam=7, float ticksPerRevolution=1440, float wheelTrack=14.7)
Chassis constructor.
void setWheelSpeeds(float leftSpeed, float rightSpeed)
Sets target wheel speeds in cm/sec.