Arm
The arm subsystem is for a single arm. It can be used to move to a position and respond to manual commands.
To create an arm subsystem, you can use the following code:
Parameters
Type | Name | Description | See Also |
---|---|---|---|
wom::ArmConfig | config | The configuration for the arm |
Config
Type | Name | Description | See Also |
---|---|---|---|
std::string | path | The path to the arm in the NT tables | |
wom::Gearbox | leftGearbox | The left gearbox for the arm | |
wom::Gearbox | rightGearbox | The right gearbox for the arm | |
wom::CANSparkMaxEncoder | armEncoder | The encoder for the arm | |
wom::utils::PIDConfig<units::radian, units::volt> | pidConfig | The PID configuration for the arm | PID Config |
wom::utils::PIDConfig<units::radians_per_second, units::volt> | velocityConfig | The velocity PID configuration for the arm | PID Config |
units::kilogram_t | armMass | The mass of the arm | |
units::kilogram_t | loadMass | The mass of the load | |
units::meter_t | armLength | The length of the arm | |
units::radian_t | minAngle | The minimum angle of the arm | |
units::radian_t | maxAngle | The maximum angle of the arm | |
units::radian_t | initialAngle | The initial angle of the arm | |
units::radian_t | angleOffset | The angle offset of the arm |
States
wom::ArmState is an enum of states for the arm.
Name | Value | Description |
---|---|---|
kIdle | 0 | The arm is idle |
kAngle | 1 | The arm is in angle mode |
kRaw | 2 | The arm is in raw mode |
kVelocity | 3 | The arm is in velocity mode |
Methods
SetIdle
Sets the arm to idle mode.
Usage
SetAngle
Sets the arm to angle mode.
Usage
SetRaw
Sets the arm to raw mode.
Usage
SetVelocity
Sets the arm to velocity mode.
Usage
SetState
Sets the state of the arm.
See States for the possible states.
Usage
SetArmSpeedLimit
Sets the arm speed limit.
Usage
GetConfig
Returns the arm config.
Usage
GetAngle
Returns the arm angle.
Usage
MaxSpeed
Returns the maximum speed of the arm.
Usage
GetArmVelocity
Returns the arm velocity.
Usage
IsStable
Returns whether the arm is stable.