ARMS
3.1.1
Documentation for ARMS movement library
|
The ARMS configuration file. This file is where you setup everything about your chassis, including the motors, the sensors, and constants. This is also where you will setup autonomous selector. More...
Go to the source code of this file.
Macros | |
#define | ODOM_DEBUG 0 |
Odom debug mode. More... | |
#define | LEFT_MOTORS 0 |
Left chassis motors. More... | |
#define | RIGHT_MOTORS 0 |
Right chassis motors. More... | |
#define | GEARSET pros::E_MOTOR_GEAR_200 |
Chassis gearset. More... | |
#define | TPI 0 |
Ticks per Inch. More... | |
#define | MIDDLE_TPI 0 |
Middle Ticks Per Inch. More... | |
#define | TRACK_WIDTH 0 |
Track Width. More... | |
#define | MIDDLE_DISTANCE 0 |
Middle Distance. More... | |
#define | IMU_PORT 0 |
IMU Port. More... | |
#define | ENCODER_PORTS 0, 0, 0 |
Encoder Ports. More... | |
#define | EXPANDER_PORT 0 |
Encoder ADI Expander Port. More... | |
#define | ENCODER_TYPE arms::odom::ENCODER_ADI |
Encoder Type. More... | |
#define | SLEW_STEP 0 |
Slew Step. More... | |
#define | LINEAR_EXIT_ERROR 0 |
Linear Exit Error. More... | |
#define | ANGULAR_EXIT_ERROR 0 |
Angular Exit Error. More... | |
#define | SETTLE_THRESH_LINEAR 0 |
Linear Settle Threshold. More... | |
#define | SETTLE_THRESH_ANGULAR 0 |
Angular settle threshold. More... | |
#define | SETTLE_TIME 0 |
Settle Time. More... | |
#define | LINEAR_KP 0 |
Linear kP. More... | |
#define | LINEAR_KI 0 |
Linear kI. More... | |
#define | LINEAR_KD 0 |
Linear kD. More... | |
#define | TRACKING_KP 0 |
Tracking kP. More... | |
#define | ANGULAR_KP 0 |
Angular kP. More... | |
#define | ANGULAR_KI 0 |
Angular kI. More... | |
#define | ANGULAR_KD 0 |
Angular kD. More... | |
#define | LEAD_PCT 0 |
Lead Percent. More... | |
#define | MIN_ERROR 0 |
Minimum Error. More... | |
#define | AUTONS 0 |
Auton Selector Routines. More... | |
#define | HUE 0 |
Autonomous Selctor Hue. More... | |
#define | DEFAULT 0 |
Autonomous Selctor Default Routine. More... | |
Functions | |
void | arms::init () |
Initialize ARMS using the user defined constants Example 1: More... | |
The ARMS configuration file. This file is where you setup everything about your chassis, including the motors, the sensors, and constants. This is also where you will setup autonomous selector.
YOU NEED TO REPLACE ALL OF THESE VALUES WITH THE CORRECT VALUES FOR YOUR ROBOT.
#define ANGULAR_EXIT_ERROR 0 |
Angular Exit Error.
error | the error to use when exiting angular movement |
Example 1:
Sets the error to use when exiting angular movement to error.
#define ANGULAR_KD 0 |
Angular kD.
kd | the derivative constant for the angular motion PID controller |
Example 1:
Sets the derivative constant for the angular motion PID controller to kd.
#define ANGULAR_KI 0 |
Angular kI.
ki | the integral constant for the angular motion PID controller |
Example 1:
Sets the integral constant for the angular motion PID controller to ki.
#define ANGULAR_KP 0 |
Angular kP.
kp | the proportional constant for the angular motion PID controller |
Example 1:
Sets the proportional constant for the angular motion PID controller to kp.
#define AUTONS 0 |
Auton Selector Routines.
auton_names | the names of your autonomous routines. |
Example 1:
Sets the auton names to run. The names should be seprated by commas. The maximum number of autons is 10. This is part of the autonomous selector configuration. More details can be found at selector.h
#define DEFAULT 0 |
Autonomous Selctor Default Routine.
index | the index for the default autonomous routine to run. |
Example 1:
Sets the default auton to run. This is part of the autonomous selector configuration. More details can be found at selector.h
#define ENCODER_PORTS 0, 0, 0 |
Encoder Ports.
left | the port the left encoder is plugged into. 0 for disabled. |
right | the port the right encoder is plugged into. 0 for disabled. |
middle | the port the middle encoder is plugged into. 0 for disabled. |
Example 1:
Example 2:
Sets up the 1-3 encoders being used on the bot. An IMU_PORT should be set if you do not use all 3 encoders. An encoder perpindicular to the chassis (middle) should be used if the robot is expected to be pushed sideways. Negative values reverse the direction of the encoder. A value of 0 disables the encoder and uses the integrated motor encoders instead. The values should be valid smart ports if using the V5 rotation sensor, or odd numbered adi ports if using the optical shaft encoders. This is configured at ENCODER_TYPE If all encoders are disabled, the integrated encoders in the chassis motors will be used.
#define ENCODER_TYPE arms::odom::ENCODER_ADI |
Encoder Type.
type | The type of encoder being used |
Example 1:
Example 2:
Which type of vex encoder is being used on the chassis. Using a mixture of encoder types is not currently supported. This influences what the valid values for ENCODER_PORTS are.
#define EXPANDER_PORT 0 |
Encoder ADI Expander Port.
port | the port the ADI expander is plugged into. 0 for disabled. |
Example 1:
Example 2:
Uses the expander port in port port for the encoder's configured at ENCODER_PORTS.
#define GEARSET pros::E_MOTOR_GEAR_200 |
Chassis gearset.
rpm | the rpm of the chassis's motors |
Example 1:
Sets the robot's chassis gearset to rpm.
#define HUE 0 |
Autonomous Selctor Hue.
hue | the hue of your autonomous selector Example 1: //using a hue of 60 (yellow)
#define HUE 0
|
S This is part of the autonomous selector configuration. More details can be found at selector.h
#define IMU_PORT 0 |
IMU Port.
port | the port the imu is plugged into. Set to 0 for disabled |
Example 1:
Example 2:
Sets the chassis' imu to the sensor in port port.
#define LEAD_PCT 0 |
Lead Percent.
pct | the lead percent to use for go to pose movements (boomerang controller) |
Example 1:
Sets the lead percent to use for go to pose movements to pct. In theory, lower percents will be more linear movements, while higher percents will be more curvy.
#define LEFT_MOTORS 0 |
Left chassis motors.
ports | the motor ports on the right side of the chassis |
Example 1:
Example 2:
Comma seperated ports that the chassis's left motors are in. Negative values reverse the motor on that port.
#define LINEAR_EXIT_ERROR 0 |
Linear Exit Error.
error | the error to use when exiting linear movement |
Example 1:
Sets the error to use when exiting linear movement to error.
#define LINEAR_KD 0 |
Linear kD.
kd | the derivative constant for the linear motion PID controller |
Example 1:
Sets the derivative constant for the linear motion PID controller to kd.
#define LINEAR_KI 0 |
Linear kI.
ki | the integral constant for the linear motion PID controller |
Example 1:
Sets the integral constant for the linear motion PID controller to ki.
#define LINEAR_KP 0 |
Linear kP.
kp | the proportional constant for the linear motion PID controller |
Example 1:
Sets the proportional constant for the linear motion PID controller to kp.
#define MIDDLE_DISTANCE 0 |
Middle Distance.
dist | the distance between the middle wheel and the center of the robot |
Example 1:
#define MIDDLE_TPI 0 |
Middle Ticks Per Inch.
mtpi | encoder ticks per inch of robot movement for the perpendicular middle wheel |
Example 1:
Sets the number of middle encoder ticks per inch of perpendicular robot movement to tpi.
#define MIN_ERROR 0 |
Minimum Error.
error | the minimum error for the robot to be considered at the target position |
Example 1:
Sets the minimum error for the robot to be considered at the target position to error.
#define ODOM_DEBUG 0 |
Odom debug mode.
db | Enable/disable odom debug |
Example 1:
Example 2:
Enable/disable odometry debugging messages being sent to the terminal. This can be useful when trying to troubleshoot chassis movements. Note: Enabling odom debug prints the robot's x, y, and angle to the termal 100 times a second. Make sure to connect to your brain with a wire when using this. Connecting wirelessly through the controller will cause values to take dozons of seconds to show up.
#define RIGHT_MOTORS 0 |
Right chassis motors.
ports | the motor ports on the right side of the chassis |
Example 1:
Example 2:
Comma seperated ports that the chassis's right motors are in. Negative values reverse the motor on that port.
#define SETTLE_THRESH_ANGULAR 0 |
Angular settle threshold.
threshold | the threshold to use when settling angular movement |
Example 1:
Sets the threshold to use when settling angular movement to threshold. The robot is considered settled if it does not move this many units within the duration of SETTLE_TIME.
#define SETTLE_THRESH_LINEAR 0 |
Linear Settle Threshold.
threshold | the threshold to use when settling linear movement |
Example 1:
Sets the threshold to use when settling linear movement to threshold. The robot is considered settled if it does not move this many units within the duration of SETTLE_TIME.
#define SETTLE_TIME 0 |
Settle Time.
time | the time the chassis must be still to be considered settled |
Example 1:
Sets the time the chassis must be still to be considered settled to time in milliseconds. A high settle time may make movements take too long to complete, where as a low settle time may cause the robot to exit its movement prematurely.
#define SLEW_STEP 0 |
Slew Step.
step | how much to slew the motors by each time the motors are updated |
Example 1:
Sets the slew step to step. A smaller value results more slew.
#define TPI 0 |
Ticks per Inch.
tpi | the number of encoder ticks per inch of forward robot movement. |
Example 1:
Sets the number of encoder ticks per inch of forward robot movement to tpi.
#define TRACK_WIDTH 0 |
Track Width.
twidth | The track width of the robot (distance between left and right weels) |
Example 1:
Sets the number of encoder ticks per inch of forward robot movement to tpi.
#define TRACKING_KP 0 |
Tracking kP.
trackkp | the proportional constant for turning strength during point to point movements |
Example 1:
sets the proportional constant for turning strength during point to point movements to trackkp
|
inline |
Initialize ARMS using the user defined constants Example 1:
initialize ARMS (pid, chassis, odom, etc) using the defined constants in config.h