Skip to content

Groovy ROS node for camera module of Raspberry Pi

Notifications You must be signed in to change notification settings

chrisspen/raspicam_node

 
 

Repository files navigation

raspicam_node

ROS node for streaming data from the Raspberry Pi camera module.

Now works at 90 fps thanks to the new firmware provided by the Raspberry Pi foundation

Requirements

- working ROS core and network

- a Raspberry Pi

- a camera module 

Get Raspbian http://elinux.org/RPi_Easy_SD_Card_Setup

Enable Camera and expand FS http://www.raspberrypi.org/archives/3890

sudo apt-get update

sudo apt-get upgrade

Get ROS from http://www.ros.org/wiki/groovy/Installation/Raspbian. These instructions are for Groovy, but this has been tested with Kinetic. Change the release name to match your ROS version.

sudo apt-get install ros-kinetic-image-transport ros-kinetic-image-transport-plugins ros-kinetic-image-transport-plugins ros-kinetic-camera-info-manager ros-kinetic-compressed-image-transport ros-kinetic-roscpp

git clone https://github.com/raspberrypi/userland.git /home/pi/userland

cd /home/pi

mkdir catkin_ws

source /opt/ros/kinetic/setup.bash

export ROS_WORKSPACE=/home/pi/catkin_ws

cd /home/pi/catkin_ws

mkdir src

cd src

git clone https://github.com/fpasteau/raspicam_node.git raspicam

cd ..

catkin_make

source devel/setup.bash

then you can run the node using:

rosrun raspicam raspicam_node

Topic:

/camera/image/compressed (for raspicam_node):

publish sensor_msgs/CompressedImage

jpeg from the camera module

/camera/image (for raspicam_raw_node):

publish sensor_msgs/Image

image in bgra8 from the camera module

camera/camera_info :

publish  sensor_msgs/CameraInfo

camera info for each frame

Services :

/camera/start_capture :

start video capture and publication

/camera/stop_capture :

stop video capture and publication (buggy at the moment)

/set_camera_info :

set camera information (used for calibration)

saved in package://raspicam/calibrations/camera.yaml

Parameters :

width :

width of the captured images (0 < width <= 1920)

height :

height of the captured images (0 < width <= 1080)

framerate :

framerate of the captured images (0 < framerate <= 90)

quality :

quality of the captured images (0 < quality <= 100)

tf_prefix :

prefix for frame_id

For parameter changes to be applied, the capture need to be restarted using /stop_capture and /start_capture services.

Example :

rosrun raspicam raspicam_node

rosservice call /camera/start_capture

rosrun image_view image_view image:=/camera/image _image_transport:=compressed

If you want to try 90 fps mode, you'll have to decrease the quality factor.

To try the 90 fps mode :

rosrun raspicam raspicam_node _framerate:=90 _quality:=10

rosservice call /camera/start_capture

rosrun image_view image_view image:=/camera/image _image_transport:=compressed

TO DO List :

- remove warnings from raspicamcontrol

- reenable vc_gencmd

- check raspicam_raw_node for bugs

About

Groovy ROS node for camera module of Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 87.3%
  • C 8.6%
  • CMake 4.0%
  • Shell 0.1%