|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
Tuning knobs for the LightCast particle filter and the EKF. More...
#include <mcl_config.hpp>
Public Attributes | |
Particle filter | |
| int | numParticles = 200 |
| Particle count — reduce if CPU load is high. | |
| float | sensorSigmaIn = 2.5f |
| Distance-sensor noise std dev, inches. | |
| float | outlierGapIn = 6.0f |
| Readings this much shorter than expected → neutral. | |
| float | maxRangeIn = light::field::FIELD_SIZE_IN |
| Max ray-cast distance, inches. | |
| float | initPosSigmaIn = 1.0f |
| Initial particle x/y spread around starting pose, inches. | |
| float | initHeadingSigmaRad = 0.05f |
| Initial particle heading spread, radians (~3°). | |
EKF process noise | |
Larger values = trust sensors more over the motion model. | |
| float | ekfQPos = 0.02f |
| Position process noise, in² per second. | |
| float | ekfQTheta = 0.0005f |
| Heading process noise, rad² per second. | |
| float | ekfQVel = 1.0f |
| Velocity process noise. | |
EKF / MCL fusion snap thresholds | |
| float | snapDiverge = 9.0f |
| EKF cov trace (in²) above which MCL may snap. | |
| float | snapConverge = 3.0f |
| MCL std dev (in) below which it's trusted. | |
Tuning knobs for the LightCast particle filter and the EKF.
All fields are public and have defaults — override only what you need.
Definition at line 20 of file mcl_config.hpp.
| float MCLConfig::ekfQPos = 0.02f |
Position process noise, in² per second.
Definition at line 38 of file mcl_config.hpp.
| float MCLConfig::ekfQTheta = 0.0005f |
Heading process noise, rad² per second.
Definition at line 39 of file mcl_config.hpp.
| float MCLConfig::ekfQVel = 1.0f |
Velocity process noise.
Definition at line 40 of file mcl_config.hpp.
| float MCLConfig::initHeadingSigmaRad = 0.05f |
Initial particle heading spread, radians (~3°).
Definition at line 30 of file mcl_config.hpp.
| float MCLConfig::initPosSigmaIn = 1.0f |
Initial particle x/y spread around starting pose, inches.
Definition at line 29 of file mcl_config.hpp.
| float MCLConfig::maxRangeIn = light::field::FIELD_SIZE_IN |
Max ray-cast distance, inches.
Definition at line 28 of file mcl_config.hpp.
| int MCLConfig::numParticles = 200 |
Particle count — reduce if CPU load is high.
Definition at line 25 of file mcl_config.hpp.
| float MCLConfig::outlierGapIn = 6.0f |
Readings this much shorter than expected → neutral.
Definition at line 27 of file mcl_config.hpp.
| float MCLConfig::sensorSigmaIn = 2.5f |
Distance-sensor noise std dev, inches.
Definition at line 26 of file mcl_config.hpp.
| float MCLConfig::snapConverge = 3.0f |
MCL std dev (in) below which it's trusted.
Definition at line 48 of file mcl_config.hpp.
| float MCLConfig::snapDiverge = 9.0f |
EKF cov trace (in²) above which MCL may snap.
Definition at line 47 of file mcl_config.hpp.