Ask Your Question
0

error compiling usb_cam on a mac?

asked 2011-05-03 16:46:59 -0600

jrieffel gravatar image

updated 2012-03-18 14:57:31 -0600

Kevin gravatar image

After applying the patch to deal with boost on the mac got be past the pluginlib portion of the usb_cam compile. However now I'm getting these following errors when making usb_cam on a mac. Any advice?

[ rosmake ] Last 40 linesb_cam: 4.4 sec ] [ 1 Active 33/34 Complete ] {------------------------------------------------------------------------------- /Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:603: error: aggregate 'v4l2_buffer buf' has incomplete type and cannot be defined /Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:611: error: 'VIDIOC_QUERYBUF' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp: In function 'void init_userp(unsigned int)': 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:624: error: aggregate 'v4l2_requestbuffers req' has incomplete type and cannot be defined 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:633: error: 'V4L2_BUF_TYPE_VIDEO_CAPTURE' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:634: error: 'V4L2_MEMORY_USERPTR' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:636: error: 'VIDIOC_REQBUFS' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:655: error: 'memalign' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp: In function 'void init_device(int, int)': 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:666: error: aggregate 'v4l2_capability cap' has incomplete type and cannot be defined 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:667: error: aggregate 'v4l2_cropcap cropcap' has incomplete type and cannot be defined 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:668: error: aggregate 'v4l2_crop crop' has incomplete type and cannot be defined /Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:669: error: aggregate 'v4l2_format fmt' has incomplete type and cannot be defined /Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:672: error: 'VIDIOC_QUERYCAP' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:681: error: 'V4L2_CAP_VIDEO_CAPTURE' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:688: error: 'V4L2_CAP_READWRITE' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:697: error: 'V4L2_CAP_STREAMING' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:709: error: 'V4L2_BUF_TYPE_VIDEO_CAPTURE' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:711: error: 'VIDIOC_CROPCAP' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:715: error: 'VIDIOC_S_CROP' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:741: error: 'V4L2_FIELD_INTERLACED' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:744: error: 'VIDIOC_S_FMT' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp: In function 'usb_cam_camera_image_t* usb_cam_camera_start(const char, usb_cam_io_method, usb_cam_pixel_format, int, int)': 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:814: error: 'V4L2_PIX_FMT_YUYV' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:816: error: 'V4L2_PIX_FMT_UYVY' was not declared in this scope 
/Users/rieffelj/ros/usb_cam/src/libusb_cam/usb_cam.cpp:818: error: 'V4L2_PIX_FMT_MJPEG' was not ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-06-17 11:03:22 -0600

Mac gravatar image

This Just Won't Work. Note that V4L2 lines? That's "video for linux", and doesn't exist on the Mac, not even a little bit.

One could imagine tying into QuickTime and all of Apple's stuff (some of which is pretty nice), but that's not going to happen in usb_cam.

edit flag offensive delete link more
3

answered 2012-02-20 11:37:35 -0600

Kevin gravatar image

Try the new UVC, it is still experimental but it works for me on Lion.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-05-03 16:46:59 -0600

Seen: 697 times

Last updated: Feb 20 '12