tum-vision / lsd_slam

LSD-SLAM
GNU General Public License v3.0
2.62k stars 1.23k forks source link

lsd_slam using mobile phone #197

Closed johnny871227 closed 8 years ago

johnny871227 commented 8 years ago

On https://www.youtube.com/watch?v=GnuQzP3gty4, lsd_slam is running on a mobile phone (from 22sec). Now I'm trying to use Samsung Galaxy S6 as a webcam (lsd_slam is still on a PC). I use the DroidCam app on Ubuntu 14.04, and its works fine for capturing video on cheese and guvcview viewer. However I cannot use it as a livecam for lsd_slam. When running rosrun uvc_camera uvc_camera_node device:=/dev/video0 I got errors shown below:

 [ INFO] [1463023869.895450013]: camera calibration URL: file:///home/xudi/rosbuild/package_dir/camera_umd/uvc_camera/example.yaml
opening /dev/video0
pixfmt 0 = 'YU12' desc = 'Planar YUV 4:2:0'
  discrete: 640x480:   1/30 
terminate called after throwing an instance of 'std::runtime_error'
  what():  couldn't set format
[1]+  Killed                  guvcview -d /dev/video0
Aborted (core dumped)

Anyone has a clue? I guess it's kinda related to #46 , but here I'm using a mobile phone to replace the webcam.

johnny871227 commented 8 years ago

I just commented the line throw std::runtime_error("couldn't set format"); in uvc_cam.cpp and problem solved.

caap95 commented 7 years ago

@johnny871227 , I can't find that file, uvc_cam.cpp. Can you tell me where it is