usb_cam pkg gives garbled green screen
I have a ROS kinetic on my virtualbox. I tried to use "usb_cam" pkg but it doesn't work. My web cam is connected directly to my PC and I can see the video through "cheese" or "camorama" but when I run usb_cam pkg, I get garbled green screen both on "image_view" or directly on "rviz" for image_raw. I tried both yuyv and jpeg for pixel format but it doesn't work. Any suggestions ?
Is your camera connected as multiple devices? When I plug in my webcam and run
guvcview
, I get two devices named the same thing, but one produces a garbled green picture while the other is normal. In Ubuntu (if that's what you're using), you can get a list of video devices with:ls -ltrh /dev/video*
With only the webcam connected, I get:
Furthermore, I can stream one (the normal one) directly into ROS using the
video_stream_opencv
package, but the garbled one throws an error. Can you confirm that you're using the correct device?Exactly the same, I can get stream using video_stream_opencv but not usb_cam pkg. As you mentioned, I changed the video devices in the usb_cam launch file. I'm getting garbled green screen for /dev/video0 and "No image" for /dev/video1 when I'm looking at image_raw through rviz.
Does
usb_cam
throw any errors when trying to connect to the "normal" stream? Can you see output on the topic usingrostopic echo
?There is no error, the output of rostopic echo is normal(big matrix). It is weird that rviz can't display the image
Wait a second, it sounds like the output of rostopic echo doesn't change even if I cover the camera. It looks like it's the garbled green screen pixels
Have you used
rqt_graph
to make sure the topics are connected?Did you solve that issue, I'm in the same problem, and don't know how to fix it
If someone was able to solve this then please let me know, facing this smae issue.