Class MecanumDrive¶
Defined in File mecanum_drive.hpp
Nested Relationships¶
Nested Types¶
Inheritance Relationships¶
Base Type¶
public fang::chassis::HolonomicSubsystem(Class HolonomicSubsystem)
Derived Type¶
public fang::chassis::UltraMk2MecanumDrive(Class UltraMk2MecanumDrive)
Class Documentation¶
-
class MecanumDrive : public fang::chassis::HolonomicSubsystem¶
Provides taproot friendly subsystem control functionality for a mecanum drive with dimensional analysis
Subclassed by fang::chassis::UltraMk2MecanumDrive
Public Functions
-
MecanumDrive(Drivers &drivers, std::unique_ptr<IQuadDrive> quadDrive, std::unique_ptr<Imu> imu, const Config &config)¶
- Parameters:
quad – drive- QuadDrive to be owned by Mecanum subsystem
imu – - imu attached to the chassis
config – - see config
-
void setTargetTranslation(const physics::Velocity2D &translation) override¶
This is relative to the field - the axis are basically wherever the robot faces forward at the start of the round
-
void setTargetRotation(const RPM &rotation) override¶
Set the angular velocity of the chassis. Counterclockwise is positive. This is due to ensuring consistency within mathematical convention. If you are taking the horizontal joystick position, you will likely need to multiply it by -1.
-
virtual void initialize() override¶
-
void update() override¶
-
virtual void refresh() override¶
Called regularly
-
virtual void refreshSafeDisconnect() override¶
Kills functionality upon loss of remote input
-
struct ChassisDimensionConfig¶
-
struct Config¶
Rotation Ramp Speed - how many RPM/s Translation Ramp Speed - how how many m/s/s mecanumLogicConfig - see FieldMecanumLogic powerLimiterConfig - see PowerLimiter
Public Members
-
FieldMecanumLogic::Config mecanumLogicConfig¶
-
FieldMecanumLogic::Config mecanumLogicConfig¶
-
MecanumDrive(Drivers &drivers, std::unique_ptr<IQuadDrive> quadDrive, std::unique_ptr<Imu> imu, const Config &config)¶