Skip to content

Fix: RPLidar angle blanking has no effect due to continue in nested loop#2139

Open
letmehateu wants to merge 3 commits intoOpenMind:mainfrom
letmehateu:rplidar
Open

Fix: RPLidar angle blanking has no effect due to continue in nested loop#2139
letmehateu wants to merge 3 commits intoOpenMind:mainfrom
letmehateu:rplidar

Conversation

@letmehateu
Copy link

Overview

[Provide a brief overview of the changes in this pull request.]
(If applicable, linked issue: [ ])

Type of change

  • Bug fix
  • New feature
  • Documentation improvement
  • Bounty issue submission
  • Other:

Changes

  • Fix continue statement in rplidar_provider.py that targeted the inner for b in self.angles_blanked loop instead of the outer for angle, distance in data loop, causing blanked angle ranges to never be filtered out
  • LiDAR readings from robot chassis/bracket reflections were always passed to the path planner as phantom obstacles

Checklist

  • Code complies with style guidelines
  • Self-review completed
  • Documentation updated (if applicable)
  • Local testing completed
  • Tests added/updated (if applicable)

Impact

Any robot with non-empty angles_blanked config (Turtlebot4, test_lidar, etc.) was affected. Fixed reflections from the chassis were treated as real obstacles, potentially causing unnecessary stops or evasive manoeuvres.

FIxed: #2138

@letmehateu letmehateu requested review from a team as code owners February 6, 2026 09:29
@github-actions github-actions bot added robotics Robotics code changes python Python code labels Feb 6, 2026
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@Wanbogang
Copy link
Collaborator

Hi @letmehateu
Can you make the test coverage according to codecov's suggestions?

@letmehateu letmehateu requested a review from a team as a code owner February 6, 2026 13:28
@github-actions github-actions bot added the tests Test files label Feb 6, 2026
Copy link
Collaborator

@0xbyt4 0xbyt4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests pass on the buggy code too , test angles don't fall within blanked ranges after sensor_mounting_angle conversion. Please fix test data.

@letmehateu
Copy link
Author

Tests pass on the buggy code too , test angles don't fall within blanked ranges after sensor_mounting_angle conversion. Please fix test data.

Thanks, should work properly now

@Wanbogang
Copy link
Collaborator

@letmehateu
please fix the conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code robotics Robotics code changes tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: continue in nested loop fails to filter blanked RPLidar angles — phantom obstacles reach path planner

3 participants