Skip to content

Conversation

@LycoKodo
Copy link
Contributor

@LycoKodo LycoKodo commented Jul 28, 2025

Summary:

Implementing a classic tracking wheel robot localisation algorithm first developed by 5225A Pilons. (Specific algorithm here: https://www.vexforum.com/t/team-5225-introduction-to-position-tracking-document/49640)

And also a relevant telemetry system for debugging purposes.

Motivation:

Robot localisation is a key part of a good VEX auton, and critical for any feedback-loop based self correcting algorithm involved in a good auton.

Test Plan:

  • Compare tracking accuracy relative to Lemlib's implementation
  • Test Edge movement cases (Also relative to LemLib):
    • Forward/backword
    • Side strafing
    • In place rotation
    • Arc motion

@LycoKodo LycoKodo self-assigned this Jul 28, 2025
@LycoKodo LycoKodo changed the title feat: Robot localisation using 5225a-algorithm feat: tracking wheel robot localisation Jul 28, 2025
@LycoKodo LycoKodo changed the title feat: tracking wheel robot localisation feat: 🛞 tracking wheel robot localisation Jul 28, 2025
@LycoKodo
Copy link
Contributor Author

Notes

  • Implement tests folder
  • [ ]

Copy link
Collaborator

@outsidermm outsidermm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need think controller component structure with superclass controller


[dependencies]
vexide = "0.7.0"
vexide = { version = "0.7.0" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can version control be less explicit. idk if you can do it in rust where u specify only the big version numbers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure i fully understand your comment, cargo.toml is read by rust compiler to include proper libraries

@@ -0,0 +1,63 @@
use vexide::devices::math::Point2;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change file name for relevance

@@ -1,7 +1,9 @@

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally how you structure a library for robots is weird. Shouldnt there be a controller module and a componenet module and the logics are seperate


use vexide::{devices::adi::motor, prelude::*};
use alloc::{sync::Arc, vec::Vec};
use alloc::vec;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant

src/main.rs Outdated
let display = Arc::new(Mutex::new(peripherals.display));

vexide::task::spawn(async move {
vexide::time::sleep(Duration::from_millis(10)).await;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the purpose of adding a async sleep.then ending the task

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XD

}

/// Returns the offset of the tracking wheel.
pub fn get_offset(&self) -> f64 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where are ur other getters and setters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes!


fn brake(&mut self, mode: BrakeMode) {
for motor in self.motors.iter_mut() {
let _ = motor.brake(mode);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.ok?

@LycoKodo LycoKodo merged commit e0bfa6e into main Nov 9, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants