RTABMAP on a robot with client side visualization

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

RTABMAP on a robot with client side visualization

mwolf
Hi again and thanks for having such a great forum!

Using a ZED stereo camera, a laserscan and the odometry from my robot I want to use rtabmap to create 3d maps.

I followed this tutorial (used the launch file in chapter 2.1) and remapped my topics. Rtabmap does run perfectly on my robot. I can get the 2D map via:

 rosrun pcl_ros pointcloud_to_pcd input:=/rtabmap/cloud_map
 pcl_pcd2ply input.pcd output.ply

However if i want to do the same with the topic /rtabmap/mapGraph or /rtabmap/mapData I do get a version error like below:
[ERROR] [1510072162.355703627]: Client [/pointcloud_to_pcd_1510072172118202762] wants topic /rtabmap/mapGraph to have datatype/md5sum [sensor_msgs/PointCloud2/1158d486dd51d683ce2f1be655c3c181], but our version has [rtabmap_ros/MapGraph/903c2e44ed7e275e08ef323188cb38ee]. Dropping connection.

The same error appears if I start the rtabmapviz node on my client via this launchfile:

<launch>
  <!-- Visualisation (client side) -->
  <group ns="rtabmap">
    <node pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output="screen">
      <param name="subscribe_depth" type="bool" value="true"/>
      <param name="subscribe_scan" type="bool" value="true"/>
      <param name="queue_size" type="int" value="50"/>
      <param name="frame_id" type="string" value="base_link"/>

          <remap from="odom" to="/odometry/filtered"/>

          <remap from="rgb/image" to="/zed/rgb/image_rect_color"/>
          <remap from="depth/image" to="/zed/depth_registered/image_raw"/>
          <remap from="rgb/camera_info" to="/zed/rgb/camera_info"/>


      <param name="rgb/image_transport" type="string" value="compressed"/>
      <param name="depth/image_transport" type="string" value="compressedDepth"/>
    </node>
  </group>
</launch>

BTW if I start both rtabmap and rtabmapviz on the client it does work, but as my network is not that fast it takes forever to display the 3dmap.

Do you have any idea what is causing this problem?

Thanks for reading this! Have a great day,

Moritz
Reply | Threaded
Open this post in threaded view
|

Re: RTABMAP on a robot with client side visualization

matlabbe
Administrator
Hi,

/rtabmap/mapGraph and /rtabmap/mapData are not sensor_msgs/PointCloud2 msgs, so you cannot connect them to pointcloud_to_pcd. Note that /rtabmap/cloud_map is a sensor_msgs/PointCloud2 and it is the same as reconstructing the cloud from /rtabmap/mapData with a voxel size of 5 cm (default).

When using rtabmapviz on a remote computer, don't subscribe to high frame rate data like images or laser scans. Let it just subscribe to /rtabmap/mapData and odometry like below:

<launch>
  <!-- Visualisation (client side) -->
  <group ns="rtabmap">
    <node pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output="screen">
      <param name="frame_id" type="string" value="base_link"/>

          <remap from="mapData" to="mapData"/>
          <remap from="odom" to="/odometry/filtered"/>
    </node>
  </group>
</launch>

The network bandwidth required will be minimal (see this section about remote visualization), then use parameters in Preferences-­>3D Rendering panel to adjust the density of the cloud generated in rtabmapviz. To get the final assembled cloud, pause rtabmapviz then do File->Export 3D clouds...

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

Re: RTABMAP on a robot with client side visualization

mwolf
This post was updated on .
Thanks for your fast answer Mathieu!

You are right. What I tried did not make any sense as the datatypes are different.

I launched your launchfile but I got the error as well?

[ERROR] [1510149649.835704749]: Client [/rtabmap/rtabmapviz] wants topic /rtabmap/mapData to have datatype/md5sum [rtabmap_ros/MapData/150da8e574f437839a50106f27c0e364], but our version has [rtabmap_ros/MapData/e04ef599b004428f358363f9dff993b8]. Dropping connection.

Also if I do
rostopic echo /rtabmap/mapData

on my client it produces the error again:

[ERROR] [1510149889.426732158]: Client [/rostopic_4028_1510149835094] wants topic /rtabmap/mapData to have datatype/md5sum [rtabmap_ros/MapData/150da8e574f437839a50106f27c0e364], but our version has [rtabmap_ros/MapData/e04ef599b004428f358363f9dff993b8]. Dropping connection.

I guess this is caused by some the different machines is using s different definitions for the same message type. Very likely this is because the message was modified but not compiled on one of the machines. So I am going to recompile the rtabmap binaries again. Will post if I get any results.

EDIT: I guess I found my problem! I did had two different rtabmap versions installed...

So I need to downgrade the rtabmap version I built from source.  I am now trying to build the correct version (indigo 11.8.) but it fails when I try to build rtabmap_ros in my catkin workspace after I built the standalone libraries.

Thanks for your help! I go it working. Was totally my bad!

Cheers, Moritz
Reply | Threaded
Open this post in threaded view
|

Re: RTABMAP on a robot with client side visualization

matlabbe
Administrator
Yes you should checkout the same version/tag of rtabmap and rtabmap_ros packages to be compatible together. Make sure to clean the build directory before remaking and install. Note that master version should build on any ros distribution from hydro, so it may be easier to upgrade instead of downgrading.

Cheers,
Mathieu