RTAB-map only for mapping

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

RTAB-map only for mapping

Shirantha
Hello Sir,

we are planning on building a robot capable of autonomous navigation and generation of a 3D map of a shop environment for our final year project. we are planning on using a LIDAR sensor and implement 2D SLAM. then for 3D mapping we have decided to use RTAB-map. is it possible to use RTAB-map only for mapping the environment without going into 3D SLAM?. if it is possible what about loop closures?

currently we're having these problems.

thanks
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

matlabbe
Administrator
Hi,

RTAB-Map can do 2D SLAM while having the 3D and 2D maps (this is the setup used for the Robot Mapping demo).

You don't need RTAB-Map if you just want to create a point cloud following a trajectory computed by another 2D SLAM approach (you may just subscribe to a point cloud topic and assemble them). The tricky part is to update the point cloud when a loop closure occurs. If you use only RTAB-Map for 2D SLAM, it will manage that for you.

cheers



Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

Shirantha
Thank a lot sir,

So is that the method you've given in that step for robot demo??

Also how can I assemble frames obtained from the kinect for an input trajectory?? Since you've mentioned that

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

matlabbe
Administrator
Hi,

The Kinect+Odometry+2D Laser approach is SLAM 2D, with 2D and 3D maps.

If you don't use RTAB-Map, your SLAM system needs somewhat to publish a trajectory, on which you can associate the point clouds from the camera. To assemble them, you may use PCL to susbscribe to PointCloud2 messages coming form the RGBD camera, then add them to a point cloud buffer. If the trajectory changes (on loop closure for example), each point cloud recorded so far should be transformed and assembled again.

cheers

Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

Shirantha
Thank you I will look into this
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

Shirantha
Hi Sir,

Now I have a clear understanding about ROS topics, nodes. but I need more research on PCL.

Could you please tell me how should I,

1. Start writing the subscriber to follow the trajectory given by the 2D SLAM using PCL (as u mentioned    above)

2. Write the algorithm to transform the ordered point cloud in case of a loop closure or any other trajectory change.

3. Take the final output map and in which format. Also, the maximum supported size of such a map that can be built.

4. Are there any GPU requirements for the robot in implementing such algorithms (unfortunately our robot does not have a dedicated GPU. we are using an Intel corei5 motherboard with the onboard VGA)

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

matlabbe
Administrator
Hi,

For 1, if you are using another 2D SLAM approach other than rtabmap, I cannot help more.

For 2 and 3, rtabmap already implements this kind of stuff. You may take a look at how the map_assembler or the MapCloud rviz plugin works.

4. manipulating point clouds in PCL doesn't require a GPU.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

Shirantha
Hi,

what is the difference between rgbdicp_odometry.cpp and rgbd_odometry.cpp in rtabmap??

thanks
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

matlabbe
Administrator
With rgbdicp_odomerty, you can synchronize a laser scan or a PointCloud2 for ICP refining after computing the visual transformation (the "rgbd" part). It is experimental, so the documentation is not yet done. To save computation time I prefer using ICP refining on rtabmap node (which is done at lower Hz). However, if you need that odometry includes ICP refining, this is the way to go.

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

Re: RTAB-map only for mapping

Shirantha
is this the approach you're following for registration of two point clouds
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

matlabbe
Administrator
Hi,

the estimator used by ICP is either pcl::registration::TransformationEstimationPointToPlaneLLS (point to plane) or to default one in pcl::IterativeClosestPoint (point to point). See bottom of util3d_registration.cpp. Indeed, other approaches could be used based on the application and sensor used as shown in the paper.

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

Re: RTAB-map only for mapping

Shirantha
Thanks sir that was so helpful

also, is there any initial alignment of two clouds (source and target), before going through ICP in RTAB-Map? if so, what key-points and descriptors do you use?

Shirantha
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

matlabbe
Administrator
Hi Shirantha,

By default, OpenCV's GFTT detector + BRIEF descriptor are used for visual odometry and for the initial guess for ICP if used.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

Shirantha
Hi

Wish you a Happy New Year!

In one of you Wiki's you have mentioned that ICP is disabled by default.
What is the technique you're using for dense registration of point clouds if ICP is disabled?

Thanks
Shirantha
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

matlabbe
Administrator
Hi Shirantha,

When ICP is not used or not, sparse visual registration is done with know correspondences from matched features described above. Then if ICP is enabled, the guess from visual registration is used for ICP, otherwise the guess is used directly as the transform between the two point clouds.

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

Re: RTAB-map only for mapping

Shirantha
Hi Sir

what is the default method used in rtabmap to build the 3D map by assembling pointcloud messages to a trajectory?
as in what trajectory is used by default is it the trajectory computed by visual transforms or by the trajectory of the SLAM approach. is there any parameters to be changed if we want to subscribe to another trajectory

thanks
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

matlabbe
Administrator
Hi,

I will quote this paper (section II):
There are two types of links: neighbor and loop closure. Neighbor links are added between the current and the previous nodes with their odometry transformation. Loop closure links are added when a loop closure detection is found between the current node and one from the same or previous maps.
Loop closures are computed using visual transform, and then refined by ICP if configured to do so. The final trajectory is this graph optimized using g2o, GTSAM or TORO.

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

Re: RTAB-map only for mapping

Shirantha
Thank you Sir

If real-time updating of the 3D map is not required, what is required to do it offline (after the SLAM process) is it only the  graph generated and depth frames for each node in the graph?. if so, how do we relate frames with nodes in the graph, via time-stamps or any other techniques?
So that, we don't have to worry about loop closure corrections in the 3D map because, the final graph will include loop closures detected.

Thanks,
Shirantha
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

matlabbe
Administrator
Hi,

if you have a robot doing SLAM online, loop closure detection and map correction should be done online too. Normally, there is nothing to do offline after the SLAM process, because the SLAM is already online, so you have the map online with loop closures detected and graph corrected. Not sure if I understand correctly the first question. For the second one, the nodes contain a timestamp (epoch time). It is also possible that rtabmap uses frame id (generated by camera node), but they are generally reset to 0 when the camera node is restarted, so not very convenient. Timestamps are uniques across the mapping sessions.

cheers,
Mathieu


Reply | Threaded
Open this post in threaded view
|

Re: RTAB-map only for mapping

Shirantha
Hi Sir,

I meant something like what rtabmap database viewer does. once you have the graph with all the nodes and depth frames in each node timestamped, the map could be assembled offline (as per my knowledge in the database viewer you have developed, we can view the 3D map after the mapping process).
But, the graph will be developed based on a SLAM approach running on a grid map generated using laser data (a 2D SLAM approach where 3D depth sensor data is related only for obstacle avoidance)
is such a thing possible?

thanks a lot for your help!
Shirantha
12