fsstudio-team / ZeroSimROSUnity

Robotic simulation in Unity with ROS integration.
https://roboticsimulationservices.com/
MIT License
168 stars 21 forks source link

Change count value in field array to 1 for X,Y,Z. #13

Closed pedro1713 closed 3 years ago

pedro1713 commented 3 years ago

I was trying to use ZeroSim to test an algorithm that filters point clouds using the PCL, although the output of the LIDAR 3D sensor can be properly displayed in RViz, my algorithm was not working. I believe the issue is that the count field in the point field array is currently being set to the total number of points. Based on https://answers.ros.org/question/234455/pointcloud2-and-pointfield/ I believe the correct value for this field is 1. Setting the value of count for the fields X, Y, and Z when I receive the message in my node allows my algorithm to run correctly. I have made that change in the proposed PR.

micahpearlman commented 3 years ago

@pedro1713 Fantastic! This is why we do open source! :-)