Check if key exists in gpu lidar's user data #396
Merged
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.
Signed-off-by: Ian Chen [email protected]
🦟 Bug fix
Partially fixes #394
Summary
The problem is described in #394. Summary is that the gpu lidar is flooding the console with
Error casting user data: Unexpected index
message because because objects in the scene do not have laser_retro set. This is actually ok as not all objects containlaser_retro
values. This property is set in ign-gazebo.This PR adds a
HasUserData
API to check if a UserData key exists or not. This avoid additional parsing in gpu lidar to figure out if the user data contains valid value or not.The second issue identified in #394 is that the visibility flags set to objects with
laser_retro
do not have effect.That's found to be the case. This issue is not fixed in this PR as that turns out to require more work. I've removed the visibility mask/flag logic as they are not doing their job, and added a todo in the code.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge