ARMS
3.1.1
Documentation for ARMS movement library
|
This namespace deals with the odometry system. More...
Classes | |
struct | config_data_s |
Typedefs | |
typedef enum arms::odom::EncoderType | EncoderType_e_t |
typedef struct arms::odom::config_data_s | config_data_s_t |
Enumerations | |
enum | EncoderType { ENCODER_ADI , ENCODER_ROTATION } |
Functions | |
double | getLeftEncoder () |
double | getRightEncoder () |
double | getMiddleEncoder () |
Point | getPosition () |
double | getHeading (bool radians=false) |
void | reset (Point point={0, 0}) |
void | reset (Point point, double angle) |
double | getAngleError (Point point) |
double | getDistanceError (Point point) |
Variables | |
std::shared_ptr< pros::Imu > | imu |
This namespace deals with the odometry system.
It is used to track the robot's position on the field.
double arms::odom::getAngleError | ( | Point | point | ) |
point | The point we want to get the angle error of |
Example:
Return the angle error between the robot's current heading and the angle to the provided point.
double arms::odom::getDistanceError | ( | Point | point | ) |
point | The point we want to get the distance error of |
Example:
Return the distance error between the robot's current position and the provided point.
double arms::odom::getHeading | ( | bool | radians = false | ) |
radians | If true, the heading will be returned in radians. If false, the heading will be returned in degrees. |
Return the robot's heading based in degrees or radians, depending on the radians option
double arms::odom::getLeftEncoder | ( | ) |
Return the left encoder position
double arms::odom::getMiddleEncoder | ( | ) |
Return the middle encoder position
double arms::odom::getRightEncoder | ( | ) |
Return the right encoder position
void arms::odom::reset | ( | Point | point, |
double | angle | ||
) |
point | The position to reset the robot to |
angle | The angle to reset the robot to |
Example:
Reset the odometry system to the provided position and angle.
void arms::odom::reset | ( | Point | point = {0, 0} | ) |
point | The position to reset the robot to |
Example:
Reset the odometry system to the provided position.
|
extern |
The IMU sensor. This is used by odom to get the robot's heading.