-
Notifications
You must be signed in to change notification settings - Fork 4
feat: 🛞 tracking wheel robot localisation #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit d0aa966.
|
Notes
|
outsidermm
left a comment
There was a problem hiding this 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" } |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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; | |||
There was a problem hiding this comment.
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 @@ | |||
|
|
|||
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.ok?
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: