IS_HIT; Rgl Lidar Publisher (Script) does not return non-hitted points.
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.
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.
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.
@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.
We are closing this issue due to inactivity. If you are still experiencing the problem or have further questions, feel free to reopen it or create a new issue.
Thank you for your interest!