ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There's a gentleman over at the Raspberry Pi forums who has broken down the example code and figured out the MMAL API that is being used. The thread with all of his info is here: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=44982&p=356842.

I am attempting to make a node for the Raspberry Pi camera as well so I've been working on this for a little while.

There's a gentleman over at the Raspberry Pi forums who has broken down the example code and figured out the MMAL API that is being used. The thread with all of his info is here: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=44982&p=356842.

I am attempting to make a node for the Raspberry Pi camera as well so I've been working on this for a little while.

EDIT: I found a solution that works pretty well using existing software! Here are the steps that are required:

  1. Get the Raspberry Pi UV4L camera driver from www.linux-projects.org.
  2. Download gencam_cu from http://prairiedog.googlecode.com/svn/trunk/gencam_cu/ (this is still a dry package so you'll have to create a separate rosbuild workspace, overlay it on your catkin workspace using the instructions at http://wiki.ros.org/catkin/Tutorials/using_rosbuild_with_catkin and build it using rosmake [BUT DON'T BUILD YET]).
  3. Modify gencam_cu to include a link to the uv4l driver at build-time by modifying ~/rosbuild_ws/gencam_cu/src/CMakeLists.txt. Add the line link_directories(/usr/lib/uv4l/uv4lext/armv6l/) at the top and the line target_link_libraries(gencam_cu uv4lext) at the end.
  4. Now you can rosmake gencam_cu.
  5. Launch the uv4l driver using uv4l --driver raspicam --auto-video_nr --width 640 --height 480 --nopreview which will create an MJPEG-based camera at /dev/videoX (where X is auto-incremented starting at 0).
  6. Launch roscore, then rosrun gencam_cu gencam_cu.

I get about 16-18 fps at 640x480 and you get compressed image streams!