Skip to content

fix: update to only render crosswalk polygons#186

Merged
ktro2828 merged 2 commits into
mainfrom
fix/viewer/render-crosswalk-polygon
Sep 1, 2025
Merged

fix: update to only render crosswalk polygons#186
ktro2828 merged 2 commits into
mainfrom
fix/viewer/render-crosswalk-polygon

Conversation

@ktro2828

@ktro2828 ktro2828 commented Sep 1, 2025

Copy link
Copy Markdown
Collaborator

What

This pull request updates the render_lanelets function in t4_devkit/viewer/lanelet.py to only render lanelets of subtype "crosswalk", simplifying both the filtering logic and rendering behavior. The changes remove support for rendering other lanelet subtypes, such as "road" and "shoulder".

Currently, some part of polygon meshes are lacked, and crosswalk polygons are overlapped by road lanelets.

before:

Screenshot from 2025-09-02 03-33-58 Screenshot from 2025-09-02 03-34-11

After:

Screenshot from 2025-09-02 03-33-28

Rendering logic simplification:

  • The function now filters lanelets to only those with subtype equal to "crosswalk", and skips all others during rendering.
  • The color and element type assignment logic is simplified to always use the "crosswalk" values, removing conditional handling for "road" and "shoulder" subtypes.

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Copilot AI review requested due to automatic review settings September 1, 2025 18:38
@github-actions github-actions Bot added the bug Something isn't working label Sep 1, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request modifies the render_lanelets function to exclusively render crosswalk lanelets, addressing visualization issues where crosswalk polygons were being overlapped by road lanelets. The change simplifies the rendering logic by filtering out all non-crosswalk lanelet subtypes at the entry point and removing conditional color/element type assignments.

  • Adds filtering to only process lanelets with subtype "crosswalk"
  • Removes conditional logic for different lanelet subtypes ("road", "shoulder")
  • Updates function documentation to clarify the crosswalk-only behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread t4_devkit/viewer/lanelet.py
@github-actions

github-actions Bot commented Sep 1, 2025

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ❌

Overall Coverage

Lines Covered Coverage Threshold Status
2642 2000 76% 50% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
t4_devkit/viewer/lanelet.py 45% 🔴
TOTAL 45% 🔴

updated for commit: 439370d by action🐍

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 1, 2025
@ktro2828 ktro2828 merged commit dd77966 into main Sep 1, 2025
4 of 5 checks passed
@ktro2828 ktro2828 deleted the fix/viewer/render-crosswalk-polygon branch September 1, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants