Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ROS2] Add support for lidar intensity #737

Merged

Conversation

alek-kam-robotec-ai
Copy link
Contributor

What does this PR do?

This pr introduces lidar intensity data support for the ROS2 Lidar Sensor Component (does not implement this feature for the ROS2 Lidar 2D Sensor Component) . It also modifies point-cloud publishing as intensity is an optional feature and may not be provided by every lidar implementation (eg. Scene queries). For more information about the intensity capabilities and component support see the RGL gem intensity support pull request.

Note: Due to #719 and future instance segmentation integration this part of the ROS2 Lidar Sensor will soon have to be updated (see #736).

How was this PR tested?

This feature was tested on Mesh Components with and without the Material Components and on Terrain Components. Since this feature is only supported by the RGL gem, it was tested with a custom RGL gem test project (and a different closed-source project).

Signed-off-by: Aleksander Kamiński <[email protected]>
@alek-kam-robotec-ai alek-kam-robotec-ai requested review from a team as code owners July 25, 2024 07:55
@jhanca-robotecai jhanca-robotecai added the sig/simulation Categorizes an issue or PR as relevant to SIG Simulation label Jul 25, 2024
@PawelLiberadzki PawelLiberadzki self-requested a review July 26, 2024 12:06
Copy link
Contributor

@michalpelka michalpelka left a comment

Choose a reason for hiding this comment

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

As I mentioned multiple times in review, please consider using point_cloud2_iterator.hpp to build ROS 2 message.

Signed-off-by: Aleksander Kamiński <[email protected]>
@alek-kam-robotec-ai
Copy link
Contributor Author

@michalpelka I've used the pointcloud iterators as you've suggested. They simplified the code a lot and are much more easier to work with. I just wish that the message modifier would allow for more robust builder-like configuration (something similar to how o3de handles edit contexts).

Signed-off-by: Aleksander Kamiński <[email protected]>
Copy link
Contributor

@PawelLiberadzki PawelLiberadzki left a comment

Choose a reason for hiding this comment

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

Looks fine! I ran this in a simple scene with terrain and it seems to work!

Copy link
Contributor

@jhanca-robotecai jhanca-robotecai left a comment

Choose a reason for hiding this comment

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

The code works as expected, only two nitpicks.

Signed-off-by: Aleksander Kamiński <[email protected]>
@jhanca-robotecai jhanca-robotecai merged commit 9090345 into o3de:development Aug 7, 2024
2 checks passed
@alek-kam-robotec-ai alek-kam-robotec-ai deleted the feature/lidar_intensity branch August 7, 2024 12:56
alek-kam-robotec-ai added a commit to RobotecAI/o3de-extras that referenced this pull request Aug 7, 2024
jhanca-robotecai pushed a commit to RobotecAI/o3de-extras that referenced this pull request Oct 11, 2024
jhanca-robotecai pushed a commit to RobotecAI/o3de-extras that referenced this pull request Nov 22, 2024
jhanca-robotecai pushed a commit to RobotecAI/o3de-extras that referenced this pull request Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/simulation Categorizes an issue or PR as relevant to SIG Simulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants