Skip to content
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

Extract wheel encoder to separate thread for faster sampling #108

Closed
taesungh opened this issue Jun 1, 2024 · 0 comments · Fixed by #116
Closed

Extract wheel encoder to separate thread for faster sampling #108

taesungh opened this issue Jun 1, 2024 · 0 comments · Fixed by #116
Assignees

Comments

@taesungh
Copy link
Member

taesungh commented Jun 1, 2024

Similar to last year's process_encoder.py, the wheel encoder will not be sampled at a sufficient speed through the normal FSM tick: sensor measurements from I2C will take more than 10 ms whereas the wheel encoder needs to be sampled at around 1.5 ms for the pod's top speed of about 20 mph.

  • Explore options for multiprocessing which won't be limited to a single process
  • Instead of measuring the wheel encoder in running_periodic spawn a new task in StateMachine::run which runs its own loop to sample the wheel encoder at a faster rate than the standard FSM tick
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 a pull request may close this issue.

2 participants