rpg_svo
rpg_svo copied to clipboard
SVO loses track after initialization
I am using a Logitech webcam, with about 90 deg Field of View (FOV), so less than the 110 deg suggested in https://github.com/uzh-rpg/rpg_svo/wiki/Obtaining-Best-Performance, to test SVO.
I have calibrated the camera using the Pinhole Camera Model (http://wiki.ros.org/camera_calibration) as I was not able to get the Atan model (https://github.com/ethz-asl/ethzasl_ptam) from the PTAM framework working on ROS Hydro (the camera calibrator node starts, but there is no GUI appearing and nothing else seems to happen).
I am pointing the camera at the floor with lots of surfaces (to prevent degenerate solutions: I keep boxes at various angles as shown in the video from the demo bag file) and with lots of texture.
I have verified that SVO is getting the video stream correctly as I can see the video stream and the tracked points in RViz.
I try and move the camera so that there is mainly translation parallel to the floor and no pure rotations.
When the program starts, I get "KLT tracked x features" (130-150 features tracked), and then triangulation of an initial map, but then as soon as I start moving the camera a bit, it loses track ("Lost x features") and then it can't localize again ("Not enough matched features").
Even if I return the camera to a point of view / perspective that as close as the initial view as possible, it doesn't seem to be able to relocalize.
What am I doing wrong? -Camera with too narrow a FOV? -Pinhole camera calibration not adequate : really need to get Atan going? -something else?
I found that point it at my keyboard for initialization helps, but yeah the default setting seems to lose track quite often.
I'm using a pseye calibrated with ATAN model. Will try to get the reprojection error down below 0.1 as suggested.
I had the same problem when using PTAM cameracalibrator.launch to calibrated my Logitech webcam. I solve this by running image_proc node and remap "image" to "camera/image_mono" instead of "camera/imager_raw" in cameracalibrator.launch.
But even with the Atan model, I met the same problem, can't localize again("Not enough matched features").
I also wonder how to deal with this.
Ok, the problem turns out to be the field of view (FOV). I tried using video footage from my mobile phone camera, which has a wider FOV than the webcam, and it works. And I used the normal, pinhole camera calibration (http://wiki.ros.org/camera_calibration) for it. You need to have a wide FOV to see the features, I guess, but now that I have it running, I will dive deeper into the software to see if I can get it running, maybe at reduced accuracy with smaller FOV cameras.
Also, be sure to set your exposure/shutter and focus settings accordingly, otherwise your features will look different from one frame to the next. I use the v4l (Video4Linux) package with a Logitech HD Webcam C615 to set these parameters but I think you can do it through OpenCV as well if your camera is compatible. The set up worked for me once I used the "accurate" variant and was able to track more features.
I'm using C920... So, should I also change a lens for a try ???
Regards Pei
Hi @jaychak @y22ma @y22ma , I tried calibrating my logitech webcam using the guide in this link (http://wiki.ros.org/camera_calibration) but the problem states:
it couldn't find svo/cam_model. There's a picture attached.
Would you mind to shed some lights? Thanks!

they should have the pinhole example param file that's the one to use for ros_calibration package output. looks smth like this: cam_model: Pinhole cam_width: 1280 cam_height: 1024 cam_fx: 648.971450 cam_fy: 651.126819 cam_cx: 659.146907 cam_cy: 513.853356 cam_d0: -0.175666 cam_d1: 0.038264 cam_d2: 0.000516 cam_d3: -0.000798
Hi @munkarkin96 , did you get help? I have the same problem and I do not know how to solve
Hi @munkarkin96 @dunfrey !
You have to explicitly use the structure that @Asylbeck pointed to, i.e you have to explicitly type cam_model: Pinhole in your .yaml file.