Exclude area from the final map.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Exclude area from the final map.

Mikor
This post was updated on .
Hello Mathieu, it's me once again.

This time I am curious about how to exclude some areas from the final export. Let me explain to you what I mean.
I am using a lidar and 4 cameras to paint the point cloud.
Here is my final map.


And from this I want to find a way to remove the artifacts from this area.


I suspect that these are created from the front camera where the car appears, check the lidar points inside the rectangle.


In order to check that I tried using pixel_cloud_fusion from autoware to create a RGB velodyne_points topic and when I did the mapping with this topic the artifacts were gone.


But in general the map this way looks much noisier so I want to continue using the rtabmap's colorization. Even though I do not understand why there is such a difference in the colorization of rtabmap and the autoware's approach.

My question is what are the options that I have in order to remove the problematic area from my final map?

p.s. a database for the specific area can be found here.
Reply | Threaded
Open this post in threaded view
|

Re: Exclude area from the final map.

Mikor
Also, with this setup (4 images and 1 point cloud) which method is being used for the camera projection to the cloud? Is it possible to add a mask to a specific image so one area inside the image to not be projected?
Reply | Threaded
Open this post in threaded view
|

Re: Exclude area from the final map.

matlabbe
Administrator
Hi,

I don't see much ghosting in your database:


However, I remember I used the footprint filter options on that dataset, here for example I removed completly the car having the velodyne (or even a car that was following):



Parameters are not in the rtabmap-export tool, I could add them if you use it.

The database contains only RGB scans, no images. We can color the scan before sending them for mapping (like autoware point_cloud_fusion), or after mapping by projecting the cameras offline when exporting. For the first approach, it would be similar to combination of pointcloud_to_depthimage + pointcloud_xyzrgb nodelets (in contrast to autoware approach, pointcloud_to_depthimage can use a fixed frame to correct the point cloud position against the camera frame if they are not time synchronized). For the offline approach, we assemble the scans, then find the best camera for each point to color it. The approach is able to detect if a point is hidden by other points, to not color them.

We cannot set a mask, the closest option you can have right now is to set a Region of Interest (a rectangle) with projectCloudToCameras function, used in rtabmap-export here.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Exclude area from the final map.

Mikor
This post was updated on .
Hello Mathieu,

it's interesting how your result seems different than mine regarding ghosting.


and I forgot to mention but I've tried the filtering but it does not remove it.

So yeah that leaves me with more questions, with what parameters did you run the .db ?
Reply | Threaded
Open this post in threaded view
|

Re: Exclude area from the final map.

matlabbe
Administrator
Hi,

You can see the parameters in the export 3D clouds dialog. I just opened the database in rtabmap-databaseViewer, then did Edit->View 3D Map..., then filled the parameters of the screenshot. Do I have the right database?

EDIT: note that I fixed the code to correctly export scans containing RGB instead of Intensity in that commit.

cheers,
Mathieu

Reply | Threaded
Open this post in threaded view
|

Re: Exclude area from the final map.

Mikor
This post was updated on .
Yes, you do not have the right database, here is the correct link, so sorry.
Reply | Threaded
Open this post in threaded view
|

Re: Exclude area from the final map.

matlabbe
Administrator
Thx for the new link, I understand now exactly what is the problem!

My previous comment was about if the lidar was hitting its own car, causing floating points while moving, which could be filtered by the footprint filtering approach, but it is not the case here. The lidar is not hitting the car, only following cars sometimes like this one:


This kind of ghosting (following cars) cannot be filtered in post-processing with current options in rtabmap, here is the intensity point cloud:



So back to main issue, points on the road are colored with color from the car's hood. In the fourth camera, we see the hood at the bottom all the time, so the hood is like painted on the road.



By setting the ROI ratios to "0 0 0 0.4" in camera projection options, we can avoid painting the hood on the road (this is the approach I used in this video https://www.youtube.com/watch?v=vKCTg4plPkw when exporting the colored point cloud to filter the hood of the car):


However, this approach has the disadvantage to filter bottom 40% of all images from all four cameras. I implemented a new option in this commit to add a mask to only ignore the hood during the reprojection. Here is the mask I used that you can download (note the hood is on the fourth camera):


Regards,
Mathieu