ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Remote RGBDSLAM

asked 2016-04-09 18:27:31 -0500

jacksonkr_ gravatar image

updated 2016-04-11 08:42:54 -0500

Scenario

Using ROS_MASTER_URI I'm able to see kinect topics via a networked computer. I'm able to use the remote topics with RVIZ on the networked computer but I'm not able to use the remote topics with rgbdslam on the networked computer.

Setup

Robo + Kinect remote - 192.168.0.1 - Ubuntu 14.04 ARM - ros-indigo-ros-base

  • ROS_MASTER_URI=http://192.168.0.1
  • ROS_IP=192.168.0.1
  • $ roscore
  • $ roslaunch freenect_launch freenect.launch openni.launch doesn't work over multiple devices

Laptop local - 192.168.0.2 - Ubuntu 14.04 x86_64 - ros-indigo-desktop-full

  • ROS_MASTER_URI=http://192.168.0.1
  • ROS_IP=192.168.0.2
  • $ rosrun rviz rviz

Question

rviz sees the topics just fine but rgbdslam (not run simultaneously with rviz) just sits there waiting for all the needed topics. If I move the camera to the laptop and run in then rgbdslam runs as expected. How can I get rgbdslam to work remotely?

Extras

I noticed that the topics are different when running the camera on the local vs running the camera on the remote:

topic list when running camera from robot (remote):

$ rostopic list
/camera/debayer/parameter_descriptions
/camera/debayer/parameter_updates
/camera/depth/camera_info
/camera/depth/disparity
/camera/depth/image
/camera/depth/image_raw
/camera/depth/image_rect
/camera/depth/image_rect_raw
/camera/depth/points
/camera/depth_rectify_depth/parameter_descriptions
/camera/depth_rectify_depth/parameter_updates
/camera/depth_registered/camera_info
/camera/depth_registered/disparity
/camera/depth_registered/hw_registered/image_rect
/camera/depth_registered/hw_registered/image_rect_raw
/camera/depth_registered/image
/camera/depth_registered/image_raw
/camera/depth_registered/points
/camera/depth_registered/sw_registered/camera_info
/camera/depth_registered/sw_registered/image_rect
/camera/depth_registered/sw_registered/image_rect_raw
/camera/depth_registered_rectify_depth/parameter_descriptions
/camera/depth_registered_rectify_depth/parameter_updates
/camera/driver/parameter_descriptions
/camera/driver/parameter_updates
/camera/ir/camera_info
/camera/ir/image_raw
/camera/ir/image_rect_ir
/camera/projector/camera_info
/camera/rectify_color/parameter_descriptions
/camera/rectify_color/parameter_updates
/camera/rectify_ir/parameter_descriptions
/camera/rectify_ir/parameter_updates
/camera/rectify_mono/parameter_descriptions
/camera/rectify_mono/parameter_updates
/camera/rgb/camera_info
/camera/rgb/image_color
/camera/rgb/image_mono
/camera/rgb/image_raw
/camera/rgb/image_rect_color
/camera/rgb/image_rect_mono
/rosout
/rosout_agg
/tf
/tf_static

Topic list when running camera from laptop (localhost):

$ rostopic list
/camera/debayer/parameter_descriptions
/camera/debayer/parameter_updates
/camera/depth/camera_info
/camera/depth/disparity
/camera/depth/image
/camera/depth/image/compressed
/camera/depth/image/compressed/parameter_descriptions
/camera/depth/image/compressed/parameter_updates
/camera/depth/image/compressedDepth
/camera/depth/image/compressedDepth/parameter_descriptions
/camera/depth/image/compressedDepth/parameter_updates
/camera/depth/image/theora
/camera/depth/image/theora/parameter_descriptions
/camera/depth/image/theora/parameter_updates
/camera/depth/image_raw
/camera/depth/image_raw/compressed
/camera/depth/image_raw/compressed/parameter_descriptions
/camera/depth/image_raw/compressed/parameter_updates
/camera/depth/image_raw/compressedDepth
/camera/depth/image_raw/compressedDepth/parameter_descriptions
/camera/depth/image_raw/compressedDepth/parameter_updates
/camera/depth/image_raw/theora
/camera/depth/image_raw/theora/parameter_descriptions
/camera/depth/image_raw/theora/parameter_updates
/camera/depth/image_rect
/camera/depth/image_rect/compressed
/camera/depth/image_rect/compressed/parameter_descriptions
/camera/depth/image_rect/compressed/parameter_updates
/camera/depth/image_rect/compressedDepth
/camera/depth/image_rect/compressedDepth/parameter_descriptions
/camera/depth/image_rect/compressedDepth/parameter_updates
/camera/depth/image_rect/theora
/camera/depth/image_rect/theora/parameter_descriptions
/camera/depth/image_rect/theora/parameter_updates
/camera/depth/image_rect_raw
/camera/depth/image_rect_raw/compressed
/camera/depth/image_rect_raw/compressed/parameter_descriptions
/camera/depth/image_rect_raw/compressed/parameter_updates
/camera/depth/image_rect_raw/compressedDepth
/camera/depth/image_rect_raw/compressedDepth ...
(more)
edit retag flag offensive close merge delete

Comments

Can you post the launch file that you are using for rgbdslam ?

al-dev gravatar image al-dev  ( 2016-04-09 22:21:33 -0500 )edit

@al-dev I added rgbdslam.launch to the bottom of my question. There's an easier-to-read version of rgbdslam.launch on github as well.

jacksonkr_ gravatar image jacksonkr_  ( 2016-04-10 07:51:04 -0500 )edit

In the 'remote' case that is not working, can you check that something is published on the topics you specified in the rgbdslam launch file for the color/depth streams, i.e /camera/rgb/image_color and /camera/depth_registered/sw_registered/image_rect_raw? You can use rostopic echo /mytopic

al-dev gravatar image al-dev  ( 2016-04-10 16:58:22 -0500 )edit

Both topics spit out HUGE arrays of data eg [0, 23, 123, 93, ... 1, 0, 23, 34]. So big that it would crash the terminal eventually.

jacksonkr_ gravatar image jacksonkr_  ( 2016-04-10 20:40:49 -0500 )edit

Ok, good sign. Try running both rviz and rgbdslam on the laptop, they should not conflict. If you still have something only on rviz, can you post the output of your console when you run roslaunch rgbdslam rgbdslam.launch ? You can also check roswtf and rqt_graph

al-dev gravatar image al-dev  ( 2016-04-11 01:22:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-04-11 08:27:21 -0500

rgbdslam subscribes to sync'ed color and depth images with a message filter. When transmitting via slow networks (includes WLAN) images may be dropped and the filter may be unable to find image pairs with approx. equal timestamps.

You wouldn't see this in rviz, because rviz doesn't do this synchronization.

Solutions:

  • Lower the network load

    • reduce the frame rate of the openni driver
    • reduce the image resolution of the openni drive to qvga and use appropriate settings for rgbdslam (see the qvga launchfile). This will impede the map quality though.
  • Or write a node that runs on the robot, subscribes to synchronized depth and color and relays only every nth pair

edit flag offensive delete link more

Comments

Thanks! I'm having trouble compiling rgbdslam for ARM so qvga-kinect+rgbdslam.launch will have to wait; I ran qvgalaunch in reverse master/robot and rviz picked up frames faster so I think it will work. I need to research the other two options more as I'm still now to all of this.

jacksonkr_ gravatar image jacksonkr_  ( 2016-04-11 10:24:14 -0500 )edit
1

Split the qvga-....launch into the part that starts the openni driver and sets it to qvga (lines 4-8) and copy it to a launch file on the robot. Use the rest of the original launch file to start rgbdslam on your laptop. If available provide your own halved calibration parameters ("depth_camera_*")

Felix Endres gravatar image Felix Endres  ( 2016-04-11 10:33:07 -0500 )edit

As you are using freenect not openni_launch, you need to figure out how to set it to qvga, instead of using the mentioned lines from rgbdslam's launchfile.

Felix Endres gravatar image Felix Endres  ( 2016-04-11 10:34:23 -0500 )edit

After wrestling with this problem today, I'd like to add that the depth, color, and camera_info need to have synced timestamps, not just depth and color as the "NoCloudPolicy" message filter operates using all three topics.

icecreambaby gravatar image icecreambaby  ( 2018-04-03 00:25:35 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-04-09 18:27:31 -0500

Seen: 697 times

Last updated: Apr 11 '16