rtabmap in my robot

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

rtabmap in my robot

dounia
Hi matlabbe
great job ! thanks a lot for this package
I am planning to use rtab map for my college project. I will be only using a kinect sensor as my rgbd senor and laser scanner (hokuyo laser), No stereo camera no odometry.
I have tested the rtbamap basic maping handled kinect tuorials on a computer on ubuntu 14.04 lts and ros indigo and It works perfectlly. Now I wont to tested in my robot ( for my robot it's B21 robot non holonomic )
I have some question :
1) can I have 3D and 2D map in the same map !!?
2) the version of opencv that I should to install? ( I have installed Opencv 2.4.11 but it doesn't work for rtabmap)
3) for the navigation I have installed move_base, how do rtabmap work with move_base? Can rtabmap avoid obstacles? If yes please tell me how is it work ?

thanks
 
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

matlabbe
Administrator
Hi,

1) 3D and 2D formats are not compatible (point cloud / octomap vs 2d occupancy grid map). However, you can have both on respective topics: /rtabmap/cloud_map and /rtabmap/grid_map.
2) 2.4.11 should be ok (if rtabmap cannot be built with it, is is a bug), though I recommend the one used by your ROS distribution.
3) rtabmap can provide a global occupancy grid map for move_base, then for obstacle avoidance and navigation stuff, you should look the navigation's tutorials. There is a navigation example working on Turtlebot here:http://wiki.ros.org/rtabmap_ros/Tutorials/MappingAndNavigationOnTurtlebot

cheers
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

dounia
Hi
thanks a lot for your fast reply,
I have installed OpenCV.3  in my old computer and when I make the rtabmap package ( cmake ..), I got this
  With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = YES (License: Non commercial)
--   With Freenect             = YES (License: Apache v2 and/or GPLv2)
--   With OpenNI2              = NO (OpenNI2 not found)
--   With Freenect2            = NO (WITH_FREENECT2=OFF)
--   With dc1394               = YES (License: LGPL)
--   With FlyCapture2/Triclops = NO (WITH_FLYCAPTURE2=OFF)
--   With TORO                 = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
--   With g2o                  = YES (License: BSD)
--   With GTSAM                = YES (License: BSD)
--   With VERTIGO              = YES (License: GPLv3)
--   With cvsba                = YES (License: GPLv2)
--   With Qt4                  = YES (License: Open Source or Commercial)
but I had some error when I make it and rtabmap doesn't work for my old computer, for this reason I make it in my new computer and I use the Opencv 2.11.4 version, I follow the instructions for the installation but I got this
 With OpenCV 2 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = NO (License: Non commercial)
Can I use the Opencv.3 ?!

cheers
 
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

matlabbe
Administrator
Hi,

The following message is wrong (it should not state OpenCV 2 but 3):
With OpenCV 2 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = NO (License: Non commercial) 

In the logic of the main CMakeLists.txt:
IF(OpenCV_FOUND)
  IF(OpenCV_VERSION_MAJOR EQUAL 2)
    IF(OPENCV_NONFREE_FOUND)
      MESSAGE(STATUS "  With OpenCV 2 nonfree module (SIFT/SURF) = YES (License: Non commercial)")
    ELSE()
      MESSAGE(STATUS "  With OpenCV 2 nonfree module (SIFT/SURF) = NO (not found, License: BSD)")
    ENDIF()
  ELSE()
    IF(OPENCV_XFEATURES2D_FOUND)
      MESSAGE(STATUS "  With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = YES (License: Non commercial)")
    ELSE()
      MESSAGE(STATUS "  With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = NO (not found, License: BSD)")
    ENDIF()
  ENDIF()
ENDIF(OpenCV_FOUND)

If you have tried OpenCV3 before OpenCV2, make sure to clean the build directory before trying again with a different OpenCV:
$ rm -r rtabmap/build/*
$ cd rtabmap/build
$ cmake ..

Note that if rtabmap doesn't build with OpenCV3, it is a bug, you can report the issue here with the cmake and make outputs.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

matlabbe
Administrator
On rtabmap_ros, it is stated:
If you want SURF/SIFT on Indigo/Jade (Hydro has already SIFT/SURF), you have to build OpenCV from source to have access to nonfree module. Install it in /usr/local (default) and the rtabmap library should link with it instead of the one installed in ROS. I recommend to use latest 2.4 version (2.4.11) and build it from source following these instructions. RTAB-Map can build with OpenCV3+xfeatures2d module, but rtabmap_ros package will have libraries conflict as cv-bridge is depending on OpenCV2. If you want OpenCV3, you should build ros vision-opencv package yourself (and all ros packages depending on it) so it can link on OpenCV3.
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

dounia
Hi

I reinstalled the opencv 2.4.11 and I got this

With OpenCV 2 nonfree module (SIFT/SURF) = YES (License: Non commercial)

the problem is solved thanks,
but I can't select SIFT or SURF from the gui. should I pay the license? because it is nonfree module.

cheers
   
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

matlabbe
Administrator
Hi,

No, you don't have to pay a License. You just cannot use it in a commercial application if SIFT/SURF are used. It is strange that SIFT/SURF is not available if cmake detected them. It should have built rtabmap with SIFT/SURF support. Make sure you are starting the right application built (not another one installed somewhere):
$ cd rtabmap/build
$ ./rtabmap
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

dounia
Hi
I have re-built it and re-made my workspace catkin, now it works perfectly  I can select a SIFT/SURF, thanks a lot matlabbe.
Well
I have some question :
  1) can I do navigation and SLAM in the same time with RTAB-map ?  
  2) I built a map 2D and 3D
 

please tell me how can I save and use it for the navigation?
 3) my robot has rflex platform ( B21r robot), is it compatible with move_base package or not?  
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

matlabbe
Administrator
Hi,

1) Yes. You can run move_base and rtabmap at the same time. rtabmap will provide a static map (/rtabmap/grid_map or /rtabmap/proj_map) to move_base so that it can create a global costmap (used to make global plans). You can look at the navigation tutorials and set the following to connect your 2D map to move_base:
<launch>
  <!--- Run RTAB-MAP -->
  <include file="$(find rtabmap_ros)/launch/rgbd_mapping.launch">

    <!-- Set to false if you want to use wheel odometry -->
    <arg name="visual_odometry" value="true"/> 

  </include>
  <remap from="/rtabmap/proj_map" to="/map"/>

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find my_robot_name_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find my_robot_name_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find my_robot_name_2dnav)/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find my_robot_name_2dnav)/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find my_robot_name_2dnav)/base_local_planner_params.yaml" command="load" />
  </node>
</launch>

2) You are using the standalone, you can close it and save it somewhere. If you want to use it under ROS, copy it to ~/.ros/rtabmap.db and rtabmap node will load it automatically when rgbd_mapping.launch is started. Note that you may not want to use SURF features for odometry, only for the loop closure detector's vocabulary.

3) It should, most ground robots are. However, you may have to setup your robot to be move_base compatible. Following the links in the referred link in 1).

cheers
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

dounia
Hi
thank you for your answer
  When I restarted the GUI, I can't select SIFT/SURF again I can't understand , Although  yesterday it was working.  
thanks
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

dounia
Hi mathieu
I solved the problem again, I exported my library

export LD_LIBRARY_PATH=$HOME/rtabmap/bin

Now it works, thank you for all the help you gave me
Well
   now , I want to do a comparison between SIFT/SURF/ORB using the statistics in GUI, but I don't understand the statistics, please could you explain me this statistics and how can I use it?

cheers
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

matlabbe
Administrator
Hi,

You may have another rtabmap installed in /usr/local/bin or /opt/ros/indigo/bin. Make sure to uninstall other versions.

Unfortunatly, there is no documention explaining each value in statistics. For those with a name not descriptive, you may want to look in the code here, here and here to know what they represent (following the referred variables).

For basic comparison of the features, you can look at the find-object project.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

dounia
Hi mathieu
1) I have installed find_object but I had an error

error : package 'uvc_camera' not found package

when I run:

 $ roscore
 $ rosrun uvc_camera uvc_camera_node
 $ rosrun find_object_2d find_object_2d image:=image_raw  

I use my Kinect as a camera.

2) How can I show the ground truth trajectory and the estimate trajectory in the same figure.

3) I think that the 2D map is given by the Kinect in graph view ! So how can I create a 2D map from laser ( hokuyo laser) with rtabmap ?

Thank you very much,

Cheers,

Dounia.
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

dounia
hi again
the map doesn't show up when i run demo_hector_mapping.launch , are these all that has to be changed
 /jn0/base_scan to /scan
 <remap from="rgb/image"       to="/data_throttled_image"/>
      <remap from="depth/image"     to="/data_throttled_image_depth"/>
      <remap from="rgb/camera_info" to="/data_throttled_camera_info"/>    to   <remap from="rgb/image"       to="/camera/rgb/image_rect_color"/>
   <remap from="depth/image"     to="/camera/depth_registered/image_raw"/>
   <remap from="rgb/camera_info" to="/camera/depth_registered/camera_info"/>
and base_footprint to map
if no what else to be changed?? and how??
also i wanted to ask about rviz configuration , there is an error in map and point cloud configuration (red color ) and a warrning in TF and image (yellow color)
plz show me how to set rviz configuration
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

matlabbe
Administrator
Hi,

1) If you use a Kinect, use the color image topic sent by openni or freenect instead of uvc_camera. FYI, uvc_camera package is for standard USB cameras/webcams.

2) Do you have a ground truth? If so, it should be published as a TF between /world and base frame_id, then set "ground_truth_frame_id" parameter of rtabmap node to save it in the nodes. rtabmapviz should then detect these values and show them along the estimated trajectory.

3) Do you have a screenshot? If in Preferences->3D Rendering-> "Occupancy from projection..." is unchecked, the occupancy grid you see in rtabmapviz's graph view is the one of the laser scans. You can compare with the map published in RVIZ (/rtabmap/proj_map and /rtabmap/grid_map).

For demo_hector_mapping.launch, I cannot tell if your remapping are correct since I don't know which topics are published on your robot. Remapping /base_footprint to /map seems wrong to me as they do not describe the same thing. "use_sim_time" should be false if you are not using a rosbag. You can remove "rgb/image_transport" and "depth/image_transport" lines to use directly your raw image topics.

RVIZ topic errors when showing a topic are generally that caused by RVIZ cannot transforming the sensor data the fixed frame set in RVIZ general parameters.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

dounia
Hi mathieu

thanks for your responses

I don't have a ground truth, so please could you tell me how can  I have it step by step ? ( recall : I don't have a odometry I just have a Kinect sensor in my robot)  


thanks a lot
Dounia
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap in my robot

matlabbe
Administrator
Hi,

A ground truth is generally created using an external localization system like a VICON. I cannot help more to setup a ground truth.

A ground truth is for validation purpose, you don't need one to use rtabmap.

cheers