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

IS_HIT; Rgl Lidar Publisher (Script) does not return non-hitted points. #338

Open
luis-robotic opened this issue Oct 2, 2024 · 3 comments

Comments

@luis-robotic
Copy link

Hello everyone.

I am working with the RGL LiDAR library in my project and I have observed that the pointcloud only returns the points that have collided with an object (i.e. when IS_HIT=1). But on the other hand, the points that do not collide (IS_HIT=0 ?) are not published. The pointcloud is then reduced to the points that give collision.

Isn't it possible to send the complete poincloud? So that the non-colliding points return an infinite range with which we can perform data processing?

Thank you in advance.

@luis-robotic luis-robotic changed the title IS_HIT; Rgl Lidar Publisher (Script) does not return non-hitted points. #362 IS_HIT; Rgl Lidar Publisher (Script) does not return non-hitted points. Oct 2, 2024
@msz-rai
Copy link
Collaborator

msz-rai commented Oct 2, 2024

Hello @luis-robotic

Based on your previous activity in this repository, I assume your project uses RGLUnityPlugin from AWSIM.
In this case, RglLidarPublisher connects RGL publishing nodes to LidarSensor via ConnectToLidarFrame() method. At this point, the point cloud is already compacted (does not contain non-hit points).
The easiest way to omit compaction is to change the parent subgraph of the rglSubgraphToLidarFrame from rglSubgraphCompact to rglGraphLidar in this place.
Note: This change will also affect other components that connect to the point cloud in the lidar frame using the mentioned method. If any problems occur, it may be necessary to redesign the RGL graph (and subgraphs).

I hope this will help with your issue.

@luis-robotic
Copy link
Author

Thanks a lot. It helped.
I don´t know whether it can affect the algorithms to be applied afterwards...

This is an error that appeared after the modification.

RGLException: Cannot get results from YieldPointsNode; it hasn't been run yet, or the run has failed
RGLUnityPlugin.RGLNativeAPI.CheckErr (System.Int32 status) (at Assets/RGLUnityPlugin/Scripts/LowLevelWrappers/RGLNativeAPI.cs:276)
RGLUnityPlugin.RGLNativeAPI.GraphGetResult[T] (System.IntPtr node, RGLUnityPlugin.RGLField field, T[]& data, System.Int32 expectedPointSize) (at Assets/RGLUnityPlugin/Scripts/LowLevelWrappers/RGLNativeAPI.cs:646)
RGLUnityPlugin.RGLNodeSequence.GetResultData[T] (T[]& data) (at Assets/RGLUnityPlugin/Scripts/LowLevelWrappers/RGLNodeSequence.cs:561)
RGLUnityPlugin.PointCloudVisualization.OnNewLidarData () (at Assets/RGLUnityPlugin/Scripts/PointCloudVisualization.cs:198)
RGLUnityPlugin.LidarSensor.NotifyNewData () (at Assets/RGLUnityPlugin/Scripts/LidarSensor.cs:362)
RGLUnityPlugin.LidarSensor.FixedUpdate () (at Assets/RGLUnityPlugin/Scripts/LidarSensor.cs:322)

But anyway, thank you for the proposal.

@msz-rai
Copy link
Collaborator

msz-rai commented Oct 8, 2024

@luis-robotic

I tested the modification on the latest main branch of AWSIM, and it worked well for me. If you could provide your version of the RGLUnityPlugin you are working with (or share your code), I would be happy to help you further.

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

No branches or pull requests

2 participants