LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
lightcast.hpp
Go to the documentation of this file.
1#pragma once
2
5
25
36void init(const Pose& initial, const std::vector<DistanceSensorSpec>& sensors, MCLConfig cfg = {});
37
39void predict(float dLocalX, float dLocalY, float dTheta);
40
42void update();
43
45void startTask();
46
49
52
54bool converged(float threshold_in = 3.0f);
55
58
60std::vector<DistanceSensorSpec> sensors();
61
68
76void setConfig(const MCLConfig& cfg);
79} // namespace light::lightcast
Pose, sensor specs, and the global odometry / pose-estimation API.
Runtime tuning for LightCast (particle filter) and the EKF.
void startTask()
Spawn the 10 Hz LightCast update task.
void predict(float dLocalX, float dLocalY, float dTheta)
Propagate particles by a local-frame arc delta.
void update()
Measurement update: read sensors, weight particles, resample.
std::vector< DistanceSensorSpec > sensors()
void init(const Pose &initial, const std::vector< DistanceSensorSpec > &sensors, MCLConfig cfg={})
Initialize the particle filter.
uint32_t degenerateTickCount()
Number of ticks where the filter saw all-degenerate weights and reset to uniform (motion-model only).
void setConfig(const MCLConfig &cfg)
bool converged(float threshold_in=3.0f)
MCLConfig config()
Tuning knobs for the LightCast particle filter and the EKF.
Field-frame 2D pose.
Definition odometry.hpp:20