![]() |
1516X Push Back 1.0
1516X's robot code for the 2025-2026 VEX Robotics Competition
|
Functions | |
| mt19937 | Random (random_device {}()) |
| vector< Particle > | Particles (num_particles) |
| double | getAvgVelocity (void) noexcept |
| void | StartMCL (double x_, double y_, double theta_) |
| void | MonteCarlo (void) |
| vector< Particle > | Resampled (num_particles) |
| vector< double > | CDF (num_particles) |
Variables | |
| double | X = 0 |
| double | Y = 0 |
| double | theta = 0 |
| double | Velo = 0 |
| double | Deviation |
| double | weights_sum |
| double | start_theta |
| vector< MCLDistanceSensor > | Sensors |
| Field | field_ |
| vector< MCLDistanceSensor > | activeSensors |
| pros::Mutex | particle_mutex |
| const double | LOOP_DELAY_MS = 20.0 |
| const double | LOOP_DT_SEC = LOOP_DELAY_MS / 1000.0 |
| const float | wheel_circumference = (float)lemlib::Omniwheel::NEW_325 * M_PI |
| const float | gear_ratio = 4.0f / 3.0f |
| const float | rpm_to_ips_factor = (wheel_circumference / gear_ratio) / 60.0f |
| vector< double > MCL::CDF | ( | num_particles | ) |
Referenced by MonteCarlo().
|
noexcept |
Definition at line 171 of file MCL.cpp.
References leftMotors, rightMotors, and rpm_to_ips_factor.
Referenced by MonteCarlo().
| void MCL::MonteCarlo | ( | void | ) |
Definition at line 63 of file MCL.cpp.
References activeSensors, CDF(), chassis, Deviation, field_, getAvgVelocity(), LOOP_DELAY_MS, LOOP_DT_SEC, particle_mutex, Particles(), Random(), Resampled(), Sensors, Velo, weights_sum, X, and Y.
| vector< Particle > MCL::Particles | ( | num_particles | ) |
Referenced by MonteCarlo(), and StartMCL().
| mt19937 MCL::Random | ( | random_device {} | () | ) |
Referenced by MonteCarlo(), and StartMCL().
| vector< Particle > MCL::Resampled | ( | num_particles | ) |
Referenced by MonteCarlo().
| void MCL::StartMCL | ( | double | x_, |
| double | y_, | ||
| double | theta_ ) |
Definition at line 40 of file MCL.cpp.
References particle_mutex, Particles(), and Random().
| vector<MCLDistanceSensor> MCL::activeSensors |
Definition at line 29 of file MCL.cpp.
Referenced by MonteCarlo().
| double MCL::Deviation |
Definition at line 15 of file MCL.cpp.
Referenced by MonteCarlo().
| Field MCL::field_ |
Definition at line 28 of file MCL.cpp.
Referenced by MonteCarlo().
| const double MCL::LOOP_DELAY_MS = 20.0 |
Definition at line 37 of file MCL.cpp.
Referenced by MonteCarlo().
| const double MCL::LOOP_DT_SEC = LOOP_DELAY_MS / 1000.0 |
Definition at line 38 of file MCL.cpp.
Referenced by MonteCarlo().
| pros::Mutex MCL::particle_mutex |
Definition at line 31 of file MCL.cpp.
Referenced by fusion_loop_fn(), MCL_reset(), MonteCarlo(), and StartMCL().
| const float MCL::rpm_to_ips_factor = (wheel_circumference / gear_ratio) / 60.0f |
Definition at line 169 of file MCL.cpp.
Referenced by getAvgVelocity().
| vector<MCLDistanceSensor> MCL::Sensors |
Definition at line 21 of file MCL.cpp.
Referenced by MonteCarlo().
| double MCL::Velo = 0 |
Definition at line 14 of file MCL.cpp.
Referenced by MonteCarlo().
| double MCL::weights_sum |
Definition at line 16 of file MCL.cpp.
Referenced by MonteCarlo().
| const float MCL::wheel_circumference = (float)lemlib::Omniwheel::NEW_325 * M_PI |
| double MCL::X = 0 |
Definition at line 10 of file MCL.cpp.
Referenced by fusion_loop_fn(), MCL_reset(), and MonteCarlo().
| double MCL::Y = 0 |
Definition at line 10 of file MCL.cpp.
Referenced by fusion_loop_fn(), MCL_reset(), and MonteCarlo().