LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
mcl_config.hpp
Go to the documentation of this file.
1#pragma once
2
4
20struct MCLConfig {
25 int numParticles = 200;
26 float sensorSigmaIn = 2.5f;
27 float outlierGapIn = 6.0f;
29 float initPosSigmaIn = 1.0f;
30 float initHeadingSigmaRad = 0.05f;
38 float ekfQPos = 0.02f;
39 float ekfQTheta = 0.0005f;
40 float ekfQVel = 1.0f;
47 float snapDiverge = 9.0f;
48 float snapConverge = 3.0f;
50};
Fixed-map ray caster used by LightCast's sensor model.
constexpr float FIELD_SIZE_IN
Field side length, inches (12 ft).
Definition field_map.hpp:20
Tuning knobs for the LightCast particle filter and the EKF.
float snapDiverge
EKF cov trace (in²) above which MCL may snap.
float outlierGapIn
Readings this much shorter than expected → neutral.
float ekfQPos
Position process noise, in² per second.
float ekfQVel
Velocity process noise.
float snapConverge
MCL std dev (in) below which it's trusted.
float sensorSigmaIn
Distance-sensor noise std dev, inches.
float ekfQTheta
Heading process noise, rad² per second.
float initHeadingSigmaRad
Initial particle heading spread, radians (~3°).
float maxRangeIn
Max ray-cast distance, inches.
float initPosSigmaIn
Initial particle x/y spread around starting pose, inches.
int numParticles
Particle count — reduce if CPU load is high.