-
Notifications
You must be signed in to change notification settings - Fork 956
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
How to show the complete map in Rviz? #41
Comments
Your case sounds very similar to #39 however, the answers somehow disappeared... The mapping component of loam uses a sliding window approach for holding the accumulated point cloud map around the robot. At the beginning, the current implementation initializes a 3D grid around the initial position. Each cube within this grid is represented by a point cloud. You should be able to publish the complete map to the // accumulate full map cloud
_laserCloudSurround->clear();
for (int i = 0; i < _laserCloudNum; i++) {
*_laserCloudSurround += *_laserCloudCornerArray[i];
*_laserCloudSurround += *_laserCloudSurfArray[i];
} should do the work. However, I guess this will have some negative impact on the runtime of the component, as it involves a lot of computation just to be able to display the whole map in the UI in real time. For saving the full map into a .PCD file, you can do the same as above (concatenate all point cloud cubes into one big point cloud) and save the resulting point cloud instance using the PCL. Of course, I strongly recommend to implement an external trigger for saving the map into a .PCD file, as it's not reasonable to do this within the main loop. |
@StefanGlaser Thanks a lot, it really helps. And I've been in contact with deepmeng. |
HaHa |
It didn't work.Is there a specific method? |
I want to build a big outdoor map by using the Loam. But in the rviz, it just show a fixed-size map. Actually all the points cloud still exist in the rviz but it just show the sub map around the car. So how to show the complete map? And further more, how to save the full map into a .PCD file, Thanks.
The text was updated successfully, but these errors were encountered: