Add VFH Step 1: polar histogram construction from LiDAR data - #80
Open
Khushi0512 wants to merge 1 commit into
Open
Add VFH Step 1: polar histogram construction from LiDAR data#80Khushi0512 wants to merge 1 commit into
Khushi0512 wants to merge 1 commit into
Conversation
Implements the first incremental step of the Vector Field Histogram (VFH) roadmap agreed with the maintainer in issue ShisatoYano#52: build a 1D polar obstacle density histogram around the vehicle directly from the existing 2D LiDAR sensor simulation, with configurable sector resolution and smoothing. - PolarHistogram (src/components/mapping/polar_histogram/polar_histogram.py): pure-logic histogram construction. Bins LiDAR returns into angular sectors, weights each by the classic VFH linear magnitude falloff (Borenstein & Koren, 1991), and applies a triangular smoothing filter across neighboring sectors. - PolarHistogramMapper (polar_histogram_mapper.py): wires PolarHistogram to the existing OmniDirectionalLidar point cloud and renders it as a ring of colored wedges around the vehicle (denser sectors longer/redder), using the project's existing mapper slot on FourWheelsVehicle - mirrors PotentialFieldMapper's update(point_cloud, state) / draw(axes, elems) interface, so no changes were needed to shared vehicle/visualizer code. - vfh_polar_histogram_construction.py: simulation entry point, reusing the same obstacle scenario as the existing lidar_obstacle_sensing sample so the histogram's behavior can be compared directly against the raw point cloud it's built from. - Unit tests for histogram binning/smoothing math, the mapper, and the simulation entry point (15 tests total). - Regenerated pyrightconfig.json / devcontainer.json extraPaths via generate_pyrightconfig.py for the two new module directories. Valley/direction selection is intentionally left for Step 2 per the agreed roadmap, to keep this PR small and reviewable. How it was verified: all 15 new tests pass via pytest (matching the project's existing show_plot=False test convention), and the full simulation runs cleanly end to end.
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.
Implements the first incremental step of the Vector Field Histogram (VFH) roadmap agreed with the maintainer in issue #52: build a 1D polar obstacle density histogram around the vehicle directly from the existing 2D LiDAR sensor simulation, with configurable sector resolution and smoothing.
Valley/direction selection is intentionally left for Step 2 per the agreed roadmap, to keep this PR small and reviewable.
How it was verified: all 15 new tests pass via pytest (matching the project's existing show_plot=False test convention), and the full simulation runs cleanly end to end.