You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ubuntu+ROS: How to get the global map with irregular objects? Why the lidar scans trees only a simple stick?
Hello guys! I'm using Airsim and ROS to apply my navigation algorithms recently. I have two problems.
How to get the global map with irregular objects?
I am trying to get the pointcloud of the global map, and I have seen the solution in Voxel grid construction #3209, but I cannot figure out how to get the PointCloud2 as a message to publish instead of saving it in a file. To be specifically, I don't know how to use this function in C++. So I read the code in function "simcreateVoxelGrid" and I found the core part of it is three for loops, so I wrote a code similar to that as below.
I wrote this code in Airsim_ROS_Wrapper to connect airsim to ROS. Fortunately, it works well. But it has an obvious problem is that these for loops are only useful for very regular objects such as the cubes. So I wonder how to get the pointcloud by adopting the solution in Voxel grid construction #3209 by C++ and ROS as a format of PointCloud2 message to publish instead of saving it in a file? And I wonder if this solution is suitable for very irregular objects such as trees, houses and other complicated objects in a more complex environment?
Why the lidar scans only a simple stick?
I bought an Unreal Environment "Modular Neighborhood Pack" to test and I added some cubes by myself. The sensor I am using is Lidar. When scanning the cubes, it works so well and I used it for mapping. But when I placed a tree, the lidar scans only a simple stick. The apperance is shown as below.
As the pictures shown above, the lidar scans work so well when scanning the cubes, but the lidar scans only a simple stick when scanning a tree. I don't know if this problem is from the lidar or the model in Unreal environment. For UAV navigation, I hope that the lidar can scan out the complete tree instead of a simple stick because I don't expect an UAV fly through the tree leaves while navigating.
So all above, I am trying to achieve two things: get the global map in the format of pointcloud message to pulish and get the full scan of the irregular objects in the unreal environment.
I am using the newest version of the Airsim and Ubuntu 20.04. I only use C++ code because I am using ROS to navigate. The settings.json is shown as below. By the way, the reason why I don't use the depth camera is that I want to acquire the 360 degrees scan at one time.(And the processing of depth image is a little bit complex for me)
At last, I have a suggestion. As a Robotic researcher, ROS is the most widespread tool for us to use. The reason why I chose Airsim as my simulation environment is that the unreal environment is very realistic and the APIs of AIrsim are very grounded for most of the time, so I believe more and more robotic researchers will apply their robots in Airsim. Therefore, I really hope to solve these two problems and I am sincerely looking forward to your reply and solutions. Thank you!
Ubuntu+ROS: How to get the global map with irregular objects? Why the lidar scans trees only a simple stick?
Hello guys! I'm using Airsim and ROS to apply my navigation algorithms recently. I have two problems.
How to get the global map with irregular objects?

I am trying to get the pointcloud of the global map, and I have seen the solution in Voxel grid construction #3209, but I cannot figure out how to get the PointCloud2 as a message to publish instead of saving it in a file. To be specifically, I don't know how to use this function in C++. So I read the code in function "simcreateVoxelGrid" and I found the core part of it is three for loops, so I wrote a code similar to that as below.
I wrote this code in Airsim_ROS_Wrapper to connect airsim to ROS. Fortunately, it works well. But it has an obvious problem is that these for loops are only useful for very regular objects such as the cubes. So I wonder how to get the pointcloud by adopting the solution in Voxel grid construction #3209 by C++ and ROS as a format of PointCloud2 message to publish instead of saving it in a file? And I wonder if this solution is suitable for very irregular objects such as trees, houses and other complicated objects in a more complex environment?
Why the lidar scans only a simple stick?


I bought an Unreal Environment "Modular Neighborhood Pack" to test and I added some cubes by myself. The sensor I am using is Lidar. When scanning the cubes, it works so well and I used it for mapping. But when I placed a tree, the lidar scans only a simple stick. The apperance is shown as below.
As the pictures shown above, the lidar scans work so well when scanning the cubes, but the lidar scans only a simple stick when scanning a tree. I don't know if this problem is from the lidar or the model in Unreal environment. For UAV navigation, I hope that the lidar can scan out the complete tree instead of a simple stick because I don't expect an UAV fly through the tree leaves while navigating.
So all above, I am trying to achieve two things: get the global map in the format of pointcloud message to pulish and get the full scan of the irregular objects in the unreal environment.
I am using the newest version of the Airsim and Ubuntu 20.04. I only use C++ code because I am using ROS to navigate. The settings.json is shown as below. By the way, the reason why I don't use the depth camera is that I want to acquire the 360 degrees scan at one time.(And the processing of depth image is a little bit complex for me)
At last, I have a suggestion. As a Robotic researcher, ROS is the most widespread tool for us to use. The reason why I chose Airsim as my simulation environment is that the unreal environment is very realistic and the APIs of AIrsim are very grounded for most of the time, so I believe more and more robotic researchers will apply their robots in Airsim. Therefore, I really hope to solve these two problems and I am sincerely looking forward to your reply and solutions. Thank you!