Skip to content

fix: int() truncates negative pixel coordinates toward zero - #70

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/occupancy-map-1bc0068c
Open

fix: int() truncates negative pixel coordinates toward zero#70
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/occupancy-map-1bc0068c

Conversation

@andrewwhitecdw

Copy link
Copy Markdown

This PR addresses the following issue in examples/occupancy_map.py: int() truncates negative pixel coordinates toward zero.

Changes

  • examples/occupancy_map.py: int() truncates negative pixel coordinates toward zero.

Details

Before:

        x_px = int(pixel[0, 0])
        y_px = int(pixel[0, 1])

After:

        x_px = int(np.floor(pixel[0, 0]))
        y_px = int(np.floor(pixel[0, 1]))

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant