Add wheel angular velocity sensor interface - #13
Merged
Conversation
bmabsout
requested changes
Jul 12, 2026
Resolves conflicts in examples/sensor_logger.py, validation/test_conformance.py, and validation/test_logic.py between this branch's MotorEncoderReading rename and main's now-merged IMU (#12), LidarScan (#11), and track-centering (#19) work — both sides' additions are kept side by side. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Collaborator
Author
|
PR #13 is conflict-free and ready for review. The full validation suite passes locally (40/40), and Ruff passes on all three files changed by this PR. The remaining required Ruff failures come from unrelated pre-existing files outside this PR's scope, so I left them unchanged. |
bmabsout
requested changes
Jul 17, 2026
Collaborator
Author
|
Updated the implementation to address the review feedback. MotorEncoderReading now represents one scalar motor encoder value rather than four per-wheel values. The helper was renamed to motor_encoder_reading(), the redundant averaging helper was removed, and the tests were updated to validate the single-motor abstraction. All 39 validation tests pass, and the modified files pass Ruff. |
bmabsout
approved these changes
Aug 9, 2026
Address bmabsout's PR review comment that the docstring was too long for what it describes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a reusable interface for accessing the NeoRacer's wheel angular-velocity sensors.
Changes
Added a frozen
WheelAngularVelocityReadingdataclass.Added
motor_encoder_readings()to package the existing wheel angular-velocity sensor values into a typed object.Added helpers for:
Reused the existing wheel-radius constant.
Added focused validation and logic tests.
Sensor semantics
The current MuJoCo model exposes wheel joint angular velocity through
<jointvel>sensors.It does not currently expose:
Accordingly, this interface represents wheel angular-velocity measurements rather than a full hardware encoder model.
Estimated vehicle speed
The estimated linear speed is derived from average wheel angular velocity and wheel radius.
It is explicitly an estimate and assumes negligible wheel slip, so it may differ from chassis ground-truth velocity during wheelspin or lockup.
Validation
Added tests verify:
All 22 validation tests pass.
Scope
This PR does not modify: