fix(pai-converter): center ego-vehicle bbox z-gate at height/2#163
Open
Willyzw wants to merge 1 commit into
Open
fix(pai-converter): center ego-vehicle bbox z-gate at height/2#163Willyzw wants to merge 1 commit into
Willyzw wants to merge 1 commit into
Conversation
filter_ego_vehicle_points only offset the box center in x (rear_axle_to_bbox_center); y and z stayed centered at 0. Since the rig z origin is at ground level, the z-gate spanned [-(h/2+pad), h/2+pad] instead of [ground-pad, roof+pad], leaving the upper body / roof (z > height/2 + padding) outside the box. Ego self-returns near the roof-mounted lidar were therefore not filtered and showed up as noise within ~1.5 m of the sensor at roof height. Center the z-gate at height/2 so the box spans ground..roof. Verified on a PAI clip: near-sensor ego roof returns drop to ~0.
Collaborator
|
Verified fix locally, thanks for spotting and correcting @Willyzw ! Merging once CI is happy |
Collaborator
|
/ok to test be0876b |
janickm
enabled auto-merge
July 21, 2026 07:30
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.
Description
Fixes a bug in the PAI converter's ego-vehicle bbox filter that leaves Lidar self-return points near the ego roof unfiltered.
Root cause. In
tools/data_converter/pai/utils.py, the functionfilter_ego_vehicle_pointsonly offsets the box center in x (rear_axle_to_bbox_center), while y and z stay centered at 0. According to the PAI coordinate-system docs, the rig z origin is at ground level, so the z-gate spans[-(h/2+pad), h/2+pad]instead of[ground-pad, roof+pad]. Thus the self-return points at upper roof part fall outside the box and are not filtered.Fix. Center the z-gate at
height/2so the box spans from ground to roof:Verification. Confirmed on a PAI clip as shown below, red = box before this fix, green = after (rear y-z views); the red box top cuts through the middle of ego vehicle while the green box encloses the vehicle entirely.
Type of Change