Ask Your Question
0

Using rtabmap on a remote workstation [closed]

asked 2016-07-21 08:06:10 -0600

MahsaP gravatar image

updated 2016-07-22 04:18:18 -0600

Hi,

@matlabbe, I have connected an asus xtion live pro camera to adroid xu4. The ros master is running on the odroid and I am subscribing the image data on my laptop through wifi (Both ROS distros are indigo). After that, I run the following command:

roslaunch rtabmap_ros rgbd_mapping.launch rtabmap_args:="--delete_db_on_start" rviz:=true rtabmapviz:=false

But, when I run this I don't see anything for the map building. Also, the image stream is really slow.

image description

Do you know how I can solve this problem? Thank you.

Edit: After applying the changes to the launch of the camera, these are the rqt_graph on (the ros master is on odroid): 1) odroid: image description 2) laptop: image description

Still, no success in getting the map.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by MahsaP
close date 2016-08-19 09:40:22.054911

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-07-21 09:29:47 -0600

matlabbe gravatar image

updated 2016-07-22 12:12:29 -0600

If images are streamed from another computer, I would suggest to add compressed:=true to your line:

$ roslaunch rtabmap_ros rgbd_mapping.launch rtabmap_args:="--delete_db_on_start" rviz:=true rtabmapviz:=false compressed:=true

Your remote computer will then subscribe to compressed image topics instead of the raw ones, saving a lot of network bandwidth.

You may also want to reduce the frame rate of your camera to ~10/15 Hz to save even more bandwidth, similar to this example. You could use rtabmap_ros/data_throttle nodelet on adroid to reduce the frame rate, if the driver used for the camera doesn't have the option. Here is an example loading the nodelet in the camera nodelet manager of your camera:

  <group ns="camera">
    <node pkg="nodelet" type="nodelet" name="data_throttle" args="load rtabmap_ros/data_throttle camera_nodelet_manager" output="screen">
      <param name="rate" type="double" value="10.0"/>

      <remap from="rgb/image_in"       to="rgb/image_rect_color"/>
      <remap from="depth/image_in"     to="depth_registered/image_raw"/>
      <remap from="rgb/camera_info_in" to="rgb/camera_info"/>

      <remap from="rgb/image_out"       to="data_throttled_image"/>
      <remap from="depth/image_out"     to="data_throttled_image_depth"/>
      <remap from="rgb/camera_info_out" to="data_throttled_camera_info"/>
    </node>
  </group>

The line above would be modified with the correct topics:

$ roslaunch rtabmap_ros rgbd_mapping.launch rtabmap_args:="--delete_db_on_start" rviz:=true rtabmapviz:=false compressed:=true rgb_topic:=/camera/data_throttled_image depth_registered_topic:=/camera/data_throttled_image_depth camera_info_topic:=/camera/data_throttled_camera_info

EDIT

For the first example, you can verify that you are correctly receiving the compressed topics on the laptop with:

 $ rostopic hz /camera/rgb/image_rect_color/compressed
 $ rostopic hz /camera/depth_registered/image_raw/compressedDepth

EDIT 2

Making sure that ROS_IP is set on both computers (to avoid a computer not seeing topics of the other), it works if I do this (well openni2_launch can be used instead of freenect_launch):

A) computer A:

$ roslaunch freenect_launch freenect.launch depth_registration:=true

B) computer B:

$ roslaunch rtabmap_ros rgbd_mapping.launch rtabmap_args:="--delete_db_on_start" rviz:=true rtabmapviz:=false compressed:=true

Make sure to uncheck Image display in RVIZ to avoid subscribing to raw image, which would results in 30 MB/sec bandwidth!! Removing the Image display or setting Transport hint to "theora" instead of "raw", I have 3.5 MB/sec bandwidth. If I do the data_throttle example with 10 Hz instead of 30 Hz framerate:

A) computer A:

$ roslaunch freenect_launch freenect.launch depth_registration:=true
$ roslaunch data_throttle.launch

B) computer B:

$ roslaunch rtabmap_ros rgbd_mapping.launch rtabmap_args:="--delete_db_on_start" rviz:=true rtabmapviz:=false compressed:=true rgb_topic:=/camera/data_throttled_image depth_registered_topic:=/camera/data_throttled_image_depth camera_info_topic:=/camera/data_throttled_camera_info

With this setup, I have now 1 MB/sec bandwidth.

image description

cheers

edit flag offensive delete link more

Comments

@matlabbe thanks for the explanation. I modified the openni2.launch and added the section you said for the camera. Still no success. Also, without modifying openni2.launch if I run the first command you said I can't see anything in rviz.

MahsaP gravatar imageMahsaP ( 2016-07-21 10:42:31 -0600 )edit

Just to give more information: I am running openni2.launch on odroid and roslaunch rtabmap_ros rgbd_mapping.launch on my laptop.

MahsaP gravatar imageMahsaP ( 2016-07-21 11:41:18 -0600 )edit

Can you add your rqt_graph after launching vanilla openni2_launch on odroid and rtabmap with compressed:=true? I also modified the answer above.

matlabbe gravatar imagematlabbe ( 2016-07-21 13:36:32 -0600 )edit

@matlabbe thanks. I updated the question.

MahsaP gravatar imageMahsaP ( 2016-07-22 04:25:09 -0600 )edit

see EDIT 2...

matlabbe gravatar imagematlabbe ( 2016-07-22 12:12:56 -0600 )edit

@matlabbe From what you said, the image stream is not that slow anymore. But, still I don't get any mapping. I just changed freenect_launch to openni2_launch, and also I unchecked the image display on Rviz.

MahsaP gravatar imageMahsaP ( 2016-07-25 07:01:30 -0600 )edit

I am getting the following warning (is it causing the problem?): [ WARN] rtabmap: Could not get transform from odom to camera_link after 0.200000 seconds (for stamp=1469447469.217299)!

MahsaP gravatar imageMahsaP ( 2016-07-25 07:03:07 -0600 )edit

[ WARN] Could not get odometry value for depth image 0 stamp (1469447469.217299s). Latest odometry stamp is 1469447469.248058s. The depth image pose will not be synchronized with odometry.

MahsaP gravatar imageMahsaP ( 2016-07-25 07:03:56 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-07-21 08:06:10 -0600

Seen: 560 times

Last updated: Jul 22 '16