BlazingForests / realsense_camera

use realsense camera in ROS
Other
36 stars 26 forks source link

No images are published #14

Open eliacarrara opened 8 years ago

eliacarrara commented 8 years ago

Hi, when I run this... roslaunch realsense_camera realsense_rviz.launch

...I repeatedly get this error message until I kill the process:

VIDIOC_DQBUF NONE error 19, No such device
VIDIOC_DQBUF NONE error 19, No such device
stream state error  depth = 1, rgb = 1

I tried using a different USB 3 Port, without success

My Setup:
Spec Value
Laptop Lenovo T540p
CPU i7-4700MQ @ 2.40GHz x 8 64bit
Memory 8GB
OS Ubuntu 14.04.1 with Linux Kernel 3.16.0.30-generic
ROS indigo

How shall I proceed in getting the camera to work? Any advice, tips or tricks?

Thanks in advance!

Terminal Output:
===================
realsense_camera_type = Intel(R) RealSense(TM) 3D Camer
rgb_frame_id = camera_rgb_optical_frame
depth_frame_id = camera_depth_optical_frame
depth_unit = 33.099998
depth_scale = 0.001000
depth_fxinv = 0.002156
depth_fyinv = 0.002156
depth_cx = 320.000000
depth_cy = 240.000000
depth_uv_enable_min = 0
depth_uv_enable_max = 800
topic_depth_points_id = camera/depth/points
topic_depth_registered_points_id = camera/depth_registered/points
topic_image_rgb_raw_id = camera/rgb/image_raw
topic_image_depth_raw_id = camera/depth/image_raw
topic_image_infrared_raw_id = camera/ir/image_raw
debug_depth_unit = 0
rgb_camera_info_url = 
ir_camera_info_url = 
=======================

depthWithIRStream - YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEES

===========================================
Intel(R) RealSense(TM) 3D Camera lists

PCI: usb-0000:00:14.0-2.1
Serial: 047140069201
    /dev/video1
    /dev/video2
===========================================

use camera 047140069201
Directory /home/anakin/sandbox/sbl/realsense/src/realsense_camera/data/uvmap/047140069201 does not exist!!!!
video rgb name is /dev/video1
video depth name is /dev/video2

============== VIDIOC_QUERYCAP
/dev/video1 
   driver = uvcvideo
   card = Intel(R) RealSense(TM) 3D Camer
   bus_info = usb-0000:00:14.0-2.1
   version = 0x00031007
   capabilities = 0x85000001
   device_caps = 0x05000001
   reserved[3] = [0x00000000, 0x00000000, 0x00000000]

======================== get
/dev/video1 
v4l2_pix_format
   width = 1280
   height = 720
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 2560
   sizeimage = 1843200
   colorspace = 0
   priv = 0

======================== set
/dev/video1 
v4l2_pix_format
   width = 1280
   height = 720
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 2560
   sizeimage = 1843200
   colorspace = 0
   priv = 0

============ VIDIOC_S_PARM
/dev/video1 
v4l2_streamparm
   timeperframe.numerator = 1
   timeperframe.denominator = 30

video rgb w,h - 1280, 720

============== VIDIOC_QUERYCAP
/dev/video2 
   driver = uvcvideo
   card = Intel(R) RealSense(TM) 3D Camer
   bus_info = usb-0000:00:14.0-2.1
   version = 0x00031007
   capabilities = 0x85000001
   device_caps = 0x05000001
   reserved[3] = [0x00000000, 0x00000000, 0x00000000]

======================== get
/dev/video2 
v4l2_pix_format
   width = 640
   height = 480
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 1280
   sizeimage = 614400
   colorspace = 0
   priv = 0

======================== set
/dev/video2 
v4l2_pix_format
   width = 640
   height = 480
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 1280
   sizeimage = 614400
   colorspace = 0
   priv = 0

============ VIDIOC_S_PARM
/dev/video2 
v4l2_streamparm
   timeperframe.numerator = 1
   timeperframe.denominator = 30

video depth w,h - 640, 480
RealSense Camera is running!
Control 134217728 is not supported
Could not set Laser Power to 16
Control 134217729 is not supported
Could not set Accuracy to 2
Control 134217730 is not supported
Could not set Motion Range Trade Off to 0
Control 134217731 is not supported
Could not set Filter Option to 5
Control 134217732 is not supported
Could not set Confidence Threshold to 6

VIDIOC_DQBUF NONE error 19, No such device
VIDIOC_DQBUF NONE error 19, No such device
stream state error  depth = 1, rgb = 1
...
BlazingForests commented 8 years ago

hi @johnylachanta

Sorry for the late reply.

I am very care about your Terminal Output

depthWithIRStream - YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEES

If you don't hack the code, It means you had did the ir kernel patch. And it should be work ok.

======================== get
/dev/video2 
v4l2_pix_format
   width = 640
   height = 480
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 1280
   sizeimage = 614400
   colorspace = 0
   priv = 0

But!!! the depth&ir video stream's format is not V4L2_PIX_FMT_INZI

There is the point.

And the right sizeimage should be 640 * 480 * 3

So, i think maybe the ir kernel patch was not perfect.

thx DD

ghost commented 8 years ago

Got through the setup for the infrared channel without problems,

but when i build the realsense pkg I get this error (Without the patch there is no error while making):

[100%] Built target realsense_camera_config_node
In file included from /home/torben/catkin_ws/src/pa_torben/realsense_camera/src/capturer_mmap.h:13:0,
                 from /home/torben/catkin_ws/src/pa_torben/realsense_camera/src/realsense_camera.cpp:25:
/usr/include/linux/videodev2.h:62:28: fatal error: linux/compiler.h: No such file or directory
 #include <linux/compiler.h>
                            ^
compilation terminated.
make[2]: *** [pa_torben/realsense_camera/CMakeFiles/realsense_camera_node.dir/src/realsense_camera.cpp.o] Error 1
make[1]: *** [pa_torben/realsense_camera/CMakeFiles/realsense_camera_node.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
BlazingForests commented 8 years ago

Hi @LUHbots

This issue is your current using kernel image is not match you downloaded kernel image source code.

I don't know why(i'm a newbie of linux kernel) , since ubuntu 14.04.2 (i'm not sure), the kernel image change to "lowlatency" ..., then the ir patch will not works.

But you can change kernel image to "generic" , it will be works.

Thx DD

ghost commented 8 years ago

Hi,

I manually added: http://lxr.free-electrons.com/source/include/linux/compiler.h?v=3.13

to usr/include/linux

and it works now. Thx for the help

BlazingForests commented 8 years ago

Hi, @LUHbots

I got it, thx.

DD

eliacarrara commented 8 years ago

Hi DD

What Ubuntu Version and Linux Kernel Version are you running?

I tried to do the kernel patch and failed.

Error with Linux 3.16.0.30-generic:
make: Entering directory `/usr/src/linux-headers-3.16.0-30-generic'
  CC [M]  /home/anakin/Desktop/linux-lts-utopic-3.16.0/drivers/media/usb/uvc/uvc_entity.o
In file included from /home/anakin/Desktop/linux-lts-utopic-3.16.0/drivers/media/usb/uvc/uvc_entity.c:16:0:
include/linux/videodev2.h:669:18: error: field ‘timestamp’ has incomplete type
  struct timeval  timestamp;
                  ^
include/linux/videodev2.h:1829:20: error: field ‘timestamp’ has incomplete type

  struct timespec   timestamp;
                    ^
make[1]: *** [/home/anakin/Desktop/linux-lts-utopic-3.16.0/drivers/media/usb/uvc/uvc_entity.o] Error 1
make: *** [_module_/home/anakin/Desktop/linux-lts-utopic-3.16.0/drivers/media/usb/uvc] Error 2
make: Leaving directory `/usr/src/linux-headers-3.16.0-30-generic'
Error with Linux 3.13.0.68-generic:

With this kernel I can compile without any errors, but when I do...

sudo insmod /lib/modules/3.13.0-68-generic/extra/uvcvideo.ko

... I get the following error message:

insmod: ERROR: could not insert module /lib/modules/3.13.0-68-generic/extra/uvcvideo.ko: Unknown symbol in module

Further investigation with dmesg gives me the following output:

[  381.178979] uvcvideo: Unknown symbol vb2_queue_init (err 0)
[  381.178987] uvcvideo: Unknown symbol v4l2_fh_exit (err 0)
[  381.178999] uvcvideo: Unknown symbol vb2_streamoff (err 0)
[  381.179005] uvcvideo: Unknown symbol vb2_queue_release (err 0)
[  381.179011] uvcvideo: Unknown symbol vb2_poll (err 0)
[  381.179017] uvcvideo: Unknown symbol v4l2_prio_max (err 0)
[  381.179020] uvcvideo: Unknown symbol v4l2_fh_del (err 0)
[  381.179023] uvcvideo: Unknown symbol v4l2_fh_add (err 0)
[  381.179029] uvcvideo: Unknown symbol v4l2_prio_change (err 0)
[  381.179039] uvcvideo: Unknown symbol vb2_dqbuf (err 0)
[  381.179049] uvcvideo: Unknown symbol vb2_reqbufs (err 0)
[  381.179059] uvcvideo: Unknown symbol video_devdata (err 0)
[  381.179063] uvcvideo: Unknown symbol vb2_streamon (err 0)
[  381.179066] uvcvideo: Unknown symbol v4l2_ctrl_replace (err 0)
[  381.179072] uvcvideo: Unknown symbol v4l2_prio_check (err 0)
[  381.179075] uvcvideo: Unknown symbol v4l_printk_ioctl (err 0)
[  381.179077] uvcvideo: Unknown symbol vb2_querybuf (err 0)
[  381.179081] uvcvideo: Unknown symbol vb2_qbuf (err 0)
[  381.179090] uvcvideo: Unknown symbol vb2_buffer_done (err 0)
[  381.179093] uvcvideo: Unknown symbol vb2_plane_vaddr (err 0)
[  381.179096] uvcvideo: Unknown symbol v4l2_fh_init (err 0)
[  381.179100] uvcvideo: Unknown symbol video_unregister_device (err 0)
[  381.179104] uvcvideo: Unknown symbol v4l2_prio_init (err 0)
[  381.179109] uvcvideo: Unknown symbol v4l2_event_subscribe (err 0)
[  381.179115] uvcvideo: Unknown symbol video_device_alloc (err 0)
[  381.179118] uvcvideo: Unknown symbol vb2_vmalloc_memops (err 0)
[  381.179125] uvcvideo: Unknown symbol v4l2_device_register (err 0)
[  381.179131] uvcvideo: Unknown symbol v4l2_ctrl_merge (err 0)
[  381.179140] uvcvideo: Unknown symbol __video_register_device (err 0)
[  381.179146] uvcvideo: Unknown symbol v4l2_event_dequeue (err 0)
[  381.179149] uvcvideo: Unknown symbol v4l2_device_unregister (err 0)
[  381.179153] uvcvideo: Unknown symbol video_usercopy (err 0)
[  381.179156] uvcvideo: Unknown symbol video_device_release (err 0)
[  381.179160] uvcvideo: Unknown symbol vb2_mmap (err 0)
[  381.179164] uvcvideo: Unknown symbol v4l2_event_queue_fh (err 0)
[  381.179172] uvcvideo: Unknown symbol v4l2_event_unsubscribe (err 0)

Any Tips?

Thanks

teknotus commented 8 years ago

@johnylachanta

I have two different kernel packages for 14.04 on my Ubuntu PPA. sudo apt-add-repository ppa:teknotus/rs-kernel-ppa https://launchpad.net/~teknotus/+archive/ubuntu/rs-kernel-ppa You'll have to force it though as I haven't updated it in a while and thus it's slightly downgrading the kernel version. I don't have a package for 15.10 yet. The official Ubuntu tools have a step where the script downloads some things that weren't available from the archives, and thus failed to finish the build the last few times I tried. It's an hours long process so that was extremely discouraging for me.

The ROS module intel released for the R200 has a script that is probably closer to the right way to patch than my original instructions. https://github.com/PercATI/RealSense_ROS/blob/master/r200_install/ds_uvcdriver/scripts/patch_ubuntu_uvc.sh

Oushesh commented 8 years ago

Hi guys,

Does anyone know how to get the IR Stream working??

I saw somone on top of this page having a YESSSSSS for the Depth IR Stream.

The git https://github.com/teknotus/depthview/tree/kernelpatchfmt is just for F200. Anyone tried to get the Depth IR Stream for the R200 Camera??

@johnylachanta how did you working man?? Any clues or help would be appreciated.

This is what I get when I run roslaunch realsense_r200_camera.launch :

PARAMETERS

NODES / camera_base_link (tf/static_transform_publisher) camera_base_link1 (tf/static_transform_publisher) camera_base_link2 (tf/static_transform_publisher) camera_base_link3 (tf/static_transform_publisher) realsense_node (realsense_camera/realsense_camera_node)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found process[realsense_node-1]: started with pid [11808] process[camera_base_link-2]: started with pid [11809] process[camera_base_link1-3]: started with pid [11810] process[camera_base_link2-4]: started with pid [11816] process[camera_base_link3-5]: started with pid [11828]

realsense_camera_type = Intel RealSense 3D Camera R200 rgb_frame_id = camera_rgb_optical_frame depth_frame_id = camera_depth_optical_frame depth_unit = 33.099998 depth_scale = 0.001000 depth_fxinv = 0.002156 depth_fyinv = 0.002156 depth_cx = 320.000000 depth_cy = 240.000000 depth_uv_enable_min = 0 depth_uv_enable_max = 800 topic_depth_points_id = camera/depth/points topic_depth_registered_points_id = camera/depth_registered/points topic_image_rgb_raw_id = camera/rgb/image_raw topic_image_depth_raw_id = camera/depth/image_raw topic_image_infrared_raw_id = camera/ir/image_raw debug_depth_unit = 0 rgb_camera_info_url =

ir_camera_info_url =

depthWithIRStream - NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO if you want IR stream, please visit http://solsticlipse.com/2015/03/31/intel-real-sense-3d-on-linux-macos.html https://github.com/teknotus/depthview/tree/kernelpatchfmt

Intel(R) RealSense(TM) 3D Camera lists

PCI: usb-0000:00:14.0-2 Serial: SN_2481011924 /dev/video1 /dev/video2

/dev/video3

use camera SN_2481011924 Directory /home/oushesh/catkin_ws_r200/src/realsense_camera/data/uvmap/SN_2481011924 does not exist!!!! video rgb name is /dev/video1 video depth name is /dev/video2

============== VIDIOC_QUERYCAP /dev/video1 driver = uvcvideo card = Intel RealSense 3D Camera R200 bus_info = usb-0000:00:14.0-2 version = 0x00040208 capabilities = 0x85200001 device_caps = 0x05200001 reserved[3] = [0x00000000, 0x00000000, 0x00000000]

======================== get /dev/video1 v4l2_pix_format width = 320 height = 962 pixelformat_value = 0x56595559 pixelformat = YUYV field = 1 bytesperline = 640 sizeimage = 615680 colorspace = 0 priv = -17970434

======================== set /dev/video1 v4l2_pix_format width = 320 height = 962 pixelformat_value = 0x56595559 pixelformat = YUYV field = 1 bytesperline = 640 sizeimage = 615680 colorspace = 0 priv = -17970434

============ VIDIOC_S_PARM /dev/video1 v4l2_streamparm timeperframe.numerator = 1 timeperframe.denominator = 60

video rgb w,h - 320, 962

============== VIDIOC_QUERYCAP /dev/video2 driver = uvcvideo card = Intel RealSense 3D Camera R200 bus_info = usb-0000:00:14.0-2 version = 0x00040208 capabilities = 0x85200001 device_caps = 0x05200001 reserved[3] = [0x00000000, 0x00000000, 0x00000000]

======================== get /dev/video2 v4l2_pix_format width = 314 height = 938 pixelformat_value = 0x56595559 pixelformat = YUYV field = 1 bytesperline = 628 sizeimage = 589064 colorspace = 0 priv = -17970434

======================== set /dev/video2 v4l2_pix_format width = 314 height = 938 pixelformat_value = 0x56595559 pixelformat = YUYV field = 1 bytesperline = 628 sizeimage = 589064 colorspace = 0 priv = -17970434

============ VIDIOC_S_PARM /dev/video2 v4l2_streamparm timeperframe.numerator = 1 timeperframe.denominator = 60

video depth w,h - 314, 938 RealSense Camera is running! Control 134217728 is not supported Could not set Laser Power to 16 Control 134217729 is not supported Could not set Accuracy to 2 Control 134217730 is not supported Could not set Motion Range Trade Off to 0 Control 134217731 is not supported Could not set Filter Option to 5 Control 134217732 is not supported Could not set Confidence Threshold to 6

Thanks guys

teknotus commented 8 years ago

The git https://github.com/teknotus/depthview/tree/kernelpatchfmt is just for F200. Anyone tried to get the Depth IR Stream for the R200 Camera??

Intel made a similar kernel patch for getting video formats from R200. Having good R200 support is a lot harder though as the USB control interface is very different and much more complicated.

I think it will be a while before this ROS module supports R200 since no one has indicated they are actively working on it. In the meantime Intel released their own. I had trouble getting it's launch examples working though so I cannot comment much on it.

https://github.com/intel-ros/realsense