Add LiDAR-based wall-following controller - #25
Merged
Conversation
…-controller # Conflicts: # src/neoracer_mujoco/control/track_centering.py
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
Closes #6.
Adds a classical PD-style controller that maintains a fixed standoff distance from a configurable wall side using the existing eight-beam LiDAR ring.
No MJCF, sensor, vehicle-physics, or track-geometry changes are included.
How it works
The controller uses two primary signals:
distance_error: difference between the measured side distance and the configured target distancewall_skew: difference between the rear-side and front-side beam readings, used to estimate the car's angle relative to the wallThe signals use the same meaning for either wall side. A single directional sign is applied for
follow_side="left"orfollow_side="right", making the behaviors mirror images.The controller also:
reset()for controller stateChanges
Added
examples/wall_following.pyWallFollowingConfigControlCommandWallFollowingSignalscompute_signals()WallFollowingControllerUpdated
examples/sensor_logger.pyUpdated
examples/track_centering.pysensor_logger.pyAdded
validation/test_wall_following.pyTest coverage
The tests cover:
straight_corridor.xmlValidation
pytest validation/test_wall_following.py: 13/13 passedpytest validation/: 47/47 passedThe full-repository Ruff command continues to report the same pre-existing errors caused by the repository's Ruff version drift. This branch does not introduce additional Ruff violations.
Limitations