Class RobotMecanumLogic

Nested Relationships

Nested Types

Class Documentation

class RobotMecanumLogic

Public Functions

RobotMecanumLogic(const Config &config)

Refer to: https://research.ijcaonline.org/volume113/number3/pxc3901586.pdf in equation 24 The horizontalWheelDistance refers to twice as lx The verticalWheelDistance refers to twice as ly The vertical distance is parallel to the forward direction of the robot The horizontal distance is parallel to the sideways direction of the robot

RobotMecanumLogic(const Meters &horizontalWheelDistance, const Meters &verticalWheelDistance, const Meters &wheelRadius)
void setMotion(const Velocity2D &translation, const RPM &rotation)

Refer to https://gm0.org/en/latest/docs/software/tutorials/mecanum-drive.html The formula has been adapted so that the positive rotation is counter-clockwise. Although this is does not smoothly translate joystick movements, it is mathematically consistent with the convention that counter-clockwise. That is the main context for MecanumLogic. With the IMU being involved, it is imperative that a single rotational convention is used. And it is recommended that the mathematical ones would be the choice.

void setTranslation(const Velocity2D &translation)
void setRotation(const RPM &rotation)
const Velocity2D &getTranslation() const
RPM getRotation() const
QuadRPM getWheelSpeeds() const

https://research.ijcaonline.org/volume113/number3/pxc3901586.pdf This uses equation 20

struct Config

Public Members

const Meters &horizontalWheelDistance
const Meters &verticalWheelDistance
const Meters &wheelRadius