Mapping using Rtabmap

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

Mapping using Rtabmap

Engy
while executing mapping.launch i received the following warning and i couldn't find 2d map
Is there any solution to generate 2d occupancy grid map
I found that all topics are mapped well


Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

matlabbe
Administrator
Is the scan valid? If you do:

$ rostopic echo /scan

Are there values and not all "inf"?
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

Engy
that was the output
some values are zero and the others are inf

Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

matlabbe
Administrator
It looks like the lidar cannot see any structures. You may have to debug why the lidar is returning only inf values.
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

Engy
Excuse me, what are the possible reasons behind this issue ?!
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

matlabbe
Administrator
Is it in simulation? or with a real lidar?
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

Engy
simulation
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

matlabbe
Administrator
I know that when running Gazebo in some virtual machines (and maybe computers without dedicated GPU), the laser plugin cannot hit any obstacles. Seem to be a GPU problem: https://bitbucket.org/osrf/subt/issues/11/x2-laser-scanner-data-not-valid

On which kind of computer is Gazebo running?

Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

Engy
I run it on udacity workspace while enabling GPU
it is on of the robotics nanodegree program tasks
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

matlabbe
Administrator
Is the gazebo world empty? Otherwise you may ask them why the lidar is seeing only inf values in their environment. Another post to look up: http://answers.gazebosim.org/question/13497/laserscanner-look-through-objects/
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

Engy
thank you for your help
but I have a final question how to update rtabmap and rtabmaprviz
I want to get 2D occupancy grid map from rtabmaprviz
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

matlabbe
Administrator
Subscribe to /rtabmap/grid_map topic (an output of rtabmap node). However, as long you have the lidar problem, you will get an empty map.
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

Engy
I get the 3d map on rtabmaprviz but I could not get the 2d
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

Engy
<?xml version="1.0" encoding="UTF-8"?>

<launch>
 
  <arg name="database_path"     default="rtabmap.db"/>
  <arg name="rgb_topic"         default="/camera/rgb/image_raw"/>
  <arg name="depth_topic"       default="/camera/depth/image_raw"/>
  <arg name="camera_info_topic" default="/camera/rgb/camera_info"/> 
 
 
  <group ns="rtabmap">
    <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
       
       
       
       
       
       
       
       
       

       
        <remap from="scan"            to="/scan"/>
        <remap from="rgb/image"       to="$(arg rgb_topic)"/>
        <remap from="depth/image"     to="$(arg depth_topic)"/>
        <remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>

       
        <remap from="grid_map" to="/map"/>

       
         

       
             

       
       
         
               
       
       
         
       
       
       
       
       
       
         
       
       
         
       
       
       
       
    </node>

   
   
    <node pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output="screen">
     
     
     
     
      <remap from="rgb/image"       to="$(arg rgb_topic)"/>
      <remap from="depth/image"     to="$(arg depth_topic)"/>
      <remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
      <remap from="scan"            to="/scan"/>
      <remap from="odom"            to="/odom"/>
    </node>
   
  </group>
</launch>
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

Engy
the previous was my mapping.launch file
how could I subscribe ??
Reply | Threaded
Open this post in threaded view
|

Re: Mapping using Rtabmap

matlabbe
Administrator
In RVIZ, you can add Occupancy grid display and subscribe to /map topic in your case.

In rtabmapviz, you can do "Window->Show view-> Graph view" to show a 2d view with the grid. To show in 3D Map panel, you should enable "Preferences->3D Rendering->Grid Map Assembling->Show in 3D Map view"

You can add
<param name="Grid/FromDepth" value="true"/>
under rtabmap node to create the 2D map from the depth image projection instead of laser scan (until you find a solution of inf values in the scans)