|
HoloLib
High-performance holonomic (X-Drive) control library for VEX V5
|
Handles resetting the robot's odometry using distance sensors. More...
#include <distanceReset.hpp>
Public Member Functions | |
| DistanceReset (const std::vector< DistanceSensor > &robot_sensors, EncoderEKFOdometry &odom=::odom, float heading_tolerance=40.0, float filter_range=3.5) | |
| Construct a DistanceReset handler. | |
| distancePose | update (bool setPose=false, bool filter=true) |
| Updates position using all configured sensors. | |
| distancePose | update (const std::vector< bool > &use_flags, bool setPose=false, bool filter=true) |
| Updates position using a specific set of sensors by flags. | |
| distancePose | updateSpecific (const std::vector< DistanceSensor > &active_sensors, bool setPose, bool filter) |
| Updates position using an explicitly provided list of active sensors. | |
Handles resetting the robot's odometry using distance sensors.
It calculates the absolute position on the field using distance to walls.
Definition at line 33 of file distanceReset.hpp.
| hololib::DistanceReset::DistanceReset | ( | const std::vector< DistanceSensor > & | robot_sensors, |
| EncoderEKFOdometry & | odom = ::odom, |
||
| float | heading_tolerance = 40.0, |
||
| float | filter_range = 3.5 |
||
| ) |
Construct a DistanceReset handler.
| robot_sensors | Vector of DistanceSensor configurations. |
| odom | Reference to the encoder EKF odometry object. |
| heading_tolerance | Tolerance in degrees for the sensor to be considered perpendicular to the wall. |
| filter_range | Maximum acceptable deviation from the current odometry reading. |
| distancePose hololib::DistanceReset::update | ( | bool | setPose = false, |
| bool | filter = true |
||
| ) |
Updates position using all configured sensors.
| setPose | If true, automatically updates the chassis odometry with the calculated position. |
| filter | If true, applies filtering based on filter_range. |
| distancePose hololib::DistanceReset::update | ( | const std::vector< bool > & | use_flags, |
| bool | setPose = false, |
||
| bool | filter = true |
||
| ) |
Updates position using a specific set of sensors by flags.
| use_flags | Boolean flags corresponding to each configured sensor (true to use). |
| setPose | If true, automatically updates the chassis odometry. |
| filter | If true, applies filtering. |
| distancePose hololib::DistanceReset::updateSpecific | ( | const std::vector< DistanceSensor > & | active_sensors, |
| bool | setPose, | ||
| bool | filter | ||
| ) |
Updates position using an explicitly provided list of active sensors.
| active_sensors | Vector of sensors to use for this update. |
| setPose | If true, automatically updates the chassis odometry. |
| filter | If true, applies filtering. |