How to use lsd_slam on ROS?

2.3k views Asked by At

I use ubuntu 12.04. I install ROS from wiki page. Then I install lsd_slam code form here. There is a readme named under lsd_slam folder. View of these folder is below :

enter image description here

The readme file says that

  1. Quickstart / Minimal Setup First, install LSD-SLAM following 2.1 or 2.2, depending on your Ubuntu / ROS version. You don't need openFabMap for now.

    Download the [Room Example Sequence](http://vmcremers8.informatik.tu- muenchen.de/lsd/LSD_room.bag.zip) and extract it.

    Launch the lsd_slam viewer:

    rosrun lsd_slam_viewer viewer

Launch the lsd_slam main ros node:

  rosrun lsd_slam_core live_slam image:=/image_raw

camera_info:=/camera_info

Play the sequence:

  rosbag play ~/LSD_room.bag

You should see one window showing the current keyframe with color-coded depth (from live_slam), and one window showing the 3D map (from viewer). If for some reason the initialization fails (i.e., after ~5s the depth map still looks wrong), focus the depth map and hit 'r' to re-initialize.

Firstly, I run roscore. Then,

~/fuerte_workspace$ rosrun lsd_slam_viewer viewer
~/fuerte_workspace$ rosrun lsd_slam_core live_slam /image:=/image_raw _calib:=/~/fuerte_workspace/lsd_slam/lsd_slam_core/calib/pinhole_example_calib.cfg 

First command open a viewer window :

enter image description here

Result of last command is here :

found ATAN camera model, building rectifier.
Input resolution: 752 480
In: 0.527334 0.827306 0.473568 0.499436 0.000000
NO RECTIFICATION
Output resolution: 752 480
Prepped Warp matrices
Started  constraint search thread!
Started mapping thread!
Started optimization thread 

The terminal waits this steps. I don't sure that /image:=/image_raw is true. I don't have any image_raw file or folder. Is this usage is true? If yes, why I can't see any change on viewer?

1

There are 1 answers

0
luator On

/image_raw does not denote a file or folder, but the name of a ROS topic. I guess you have to publish the images of your camera to this topic (which is done using another ROS node which depends on your camera).

Once you have some node to publish the images form the camera, you have to find out, on which topic this node is publishing (depending on the node, it may be named /image_raw but something like /camera/rgb/image_raw is also possible). You can find the correct name by starting the camera node and then running rostopic list.

One remark on your commands: there is a difference between image:=/image_raw and /image:=/image_raw. The first maps the topic name to the relative name image (i.e. it is actually something like /live_slam/image), the second one the the absolute name /image. If the readme uses the relative variant, you should also stick to it.