How to use LSD Slam with a USB Webcam
How do you use LSD Slam with a generic USB webcam accessible to /dev/video1?
The README's quickstart guide works flawlessly for me with Indigo. However, their instructions for using live_slam with a video source is:
rosrun lsd_slam_core live_slam /image:=<yourstreamtopic> /camera_info:=<yourcamera_infotopic>
but they don't explain what the values for <yourstreamtopic> and <yourcamera_infotopic> should be. How do I fill these in appropriately? I'm assuming one involves referencing the camera device, but there's no further documentation.
Also, how would I launch the lsd_slam_* nodes with roslaunch? I tried creating mypackage/launch/webcam_lsd_slam.launch
<launch>
<node name="webcam" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/video1" />
<param name="image_width" value="640" />
<param name="image_height" value="480" />
<param name="pixel_format" value="mjpeg" />
<param name="camera_frame_id" value="usb_cam" />
<param name="io_method" value="mmap"/>
</node>
<node name="mapper" pkg="lsd_slam_core" type="live_slam" respawn="false" output="screen">
<remap from="image" to="/usb_cam/image_raw" />
</node>
<node name="viewer" pkg="lsd_slam_viewer" type="viewer" respawn="false" output="screen" />
</launch>
but I get the error:
ERROR: cannot launch node of type [usb_cam/usb_cam_node]: usb_cam
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/user/rosbuild_ws/mypackage
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks
ERROR: cannot launch node of type [lsd_slam_core/live_slam]: lsd_slam_core
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/user/rosbuild_ws/mypackage
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks
ERROR: cannot launch node of type [lsd_slam_viewer/viewer]: lsd_slam_viewer
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/user/rosbuild_ws/mypackage
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks
Presumably because the build didn't create true ROS packages for lsd_slam_core or lsd_slam_viewer. Predictably, rospack find lsd_slam_core
finds nothing. How do I fix that?
Per the build instructions, the lsd_slam_core and lsd_slam_viewer folders were located in /home/user/rosbuild_ws/mypackage/lsd_slam, so I tried relocating them to /home/user/rosbuild_ws/mypackage, but that did nothing.
good starting point: http://answers.ros.org/question/9089/...
Hi Cerin, I want to do the same things with you.I add a launch file which is the same with you.But when I ran it, there have some error. And I put it in the answers 4, plz give me some advise. Thank you in advance!