-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visiond should detect/test for valid modes/resolutions #640
Comments
@cglusky Thanks for the report! Could you possibly paste the visiond output with a default config file? I'd like to see what it autodetects, and why it doesn't work. |
Defaults seems to get close but the camera I have does not support the resultion and frame rate you have set so I get a "not negotiated". I have to run it through gst launch with the -v flag to see what is happening since visiond log stops recording once you get to "Starting camera stream" BTW, here's the gstreamer pipeline I cobbled together to approximate what I think visiond is putting out. This results in the not negotiated error:
If I change the above to 800x600@20fps it works fine Here's what is recorded in visiond.log when i run with the defaults....
|
Here's what my camera supports. So I can change just the frame rate to 9 and get it to work. Actually not bad for a USB web cam over IP!
|
Thanks, useful info. I'll try and enhance the autodetection to take the actual modes available into account and choose a sensible default. |
Also if you use mjpeg as the input format and the output format visiond knows to just repackage the frames - this is the minimum work involved so much less load on the system and power demands, and also minimal latency as mjpeg is frame by frame not multi-frame analysis like h264 etc. It is (much) higher bandwidth, but has it's advantages. |
So switched to mjpeg on the format and left the h264 encode. Video shows up now in QGC. Not sure why QGC would not show the YUV video since they are both sent via h264enc. I get the first frame in Mission Planner HUD and it freezes. Seems to be a known problem with MP. Camera will not stream at all unless I perfectly match resolution and frame rate for given format. Since this camera does not appear to be uvc compliant don't think I can tweak output. All good to know. |
Just a few more notes that may save someone else some time later. Ditched the Elp USB cam and plugged in RealSense R200. Shows up as 3 video devices. The first two appear to perform magic CV/3D stuff and the last looks like our RGB target web cam. ls-l /dev/video* shows the 3 devices enumerated... Adding the -d switch to v4l2-ctl utility lets us see what each device supports, but from doing a bit of digging there may be some questions as to whether they are all really supported. IntelRealSense/librealsense#169 I did test 848x480@15 and it worked fine.
|
A new 'debug' option has been added to maverick-visiond.conf that sets the gstdebug level. |
|
OK. I will test this with #696 as well. the Elp cam I have should be a good test for this fix. Thanks! |
Tested with Elp cam. Debug info helps. Agree with the Sometime in future tag. Not critical. Feature not a bug at this point. |
I've hit similar problems with other usb cameras. Moved to goodrobots/visiond#19 |
More details on bootstraping MinnowBoard here:
#495
Two issues of note for @fnoop:
Running a MinnowBoard Turbot Dual with Ubuntu and Maverick 1.1.3 (env=flight)
Elp 2mp USB 2.0 camera plugged into USB 3 port. After several hours of messing the key was to get just what the camera would support for pixel format, size and FPS.
To help find what camera supports....
v4l2-ctl --list-formats-ext
Using the output from above was key to my success with this camera and making visiond/gstreamer happy. I chose 800x600@20fps as a starting point....
Output to visiond log
Receiving with the following on Windows10 using gst
gst-launch-1.0 -v udpsrc port=9000 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=f
The text was updated successfully, but these errors were encountered: