ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

Raspberry Pi Camera Node

Dear ROS community,

Many of you are running Raspberry Pi’s for your robots. Pi’s are great on their own, but they are even better with the camera module, so we are proud to announce our ROS node for the Raspberry Pi camera module here:

We have tested this node on both the 4.1 and 4.4 kernels from the Raspberry Pi Foundation, using an Ubuntu Image, but it should work with ROS on Raspbian as well. We have used both the original (5MP) and the newer (8MP) cameras with this node.

Some features of raspicam_node:

  • Dynamic reconfigure support for camera parameters
  • Fixed shutter_speed support for doing short or long exposures
  • Premade calibration files for Camera V1 and V2
  • Publishing compressed images using hardware encoder

Currently binary releases are not available, but we are investigating how we could provide these. Binary Release of raspicam_node

Contributions and Bug Reports through Github Pull Requests and Issues are encouraged.



Binary builds are now available!
You can install the debs from

They are built for Ubuntu 16.04 running on the Pi 3 (haven’t tested on Pi 2).

To install add our apt repository with the instructions in the link above, then run sudo apt install ros-kinetic-raspicam-node.


Hey Rohan, How about an easy way to sample the data, for example a 300 by 200 10 fps raw image? Can we:

rosrun raspicam raspicam_node _width:=300 _height=200 _framerate:=10

Rohan, useful packkage! could you please comment on its use, or possible future release of a RasPi Ubuntu-Mate Kinetic Turtlebot 3 version, source or binary?

@anfederman you can edit the launch file to sample down to the level you need. Example:

@Red24dog If you are running Ubuntu Mate 16.04 with kinetic, both the source from the repo and binary builds from here should work.

If they don’t please open an issue on the github repo.

Great node! Any quick way to publish raw images instead of compressed?


We are using the hardware JPEG compression available in the Pi, so getting both compressed and uncompressed images is tricky. Because of this, we only publish the compressed image so that we can continue to take advantage of the hardware.

If you need raw images, for now you will have to run a separate decompression node like so
rosrun image_transport republish compressed in:=/raspicam_node/image raw out:=/raspicam_node/image in order to get raw images. Of course these raw images will have the same compression artifacts as the raw image.

If that is not enough for you, please open an issue on you github repo above, and we will try to support your use case.


Rohan, red245dog . Got around to installing on my Turtlebot3 Raspberry pi3/ubuntu -mate 16.04 (Xenial). Following the catkin source installation instructions got this error message
Unable to locate package libraspberrypi-dev
ERROR: the following rosdeps failed to install
apt: command [sudo -H apt-get install -y libraspberrypi-dev] failed.

Also I couldn’t locate the dep ros-kinetic-raspicam-node using apt install or synaptic
Could you assist me?

Hi again—good news. I took another go at following the source catkin installation to my Raspberry Pi/Ubuntu-Mate/ROS Kinetic from the UbiquityRobotics/raspicam_node All installed smoothly and the V2 camera works, publishes from /raspicam_node and displays an image on the Remote PC. Not sure what my trouble was though I did do a "apt-get update and ungrade a few times in the meantime. I was not able to install the debs binary as it could not find “ros-kinetic-raspicam-node” package. Thanks for the great work and now display a colored image along with the SLAM map on the TB3 Burger.

Hey @Red24Dog,

Great to see that you got it working for you.

As for why apt-get install ros-kinetic-raspicam-node wasn’t working for you: raspicam_node is not released into the ROS buildfarm because of some non-standard dependencies (the raspberry pi libs). To get the binaries, you need to follow the instructions here to add the Ubiquity Robotics apt repo to your system. Then sudo apt-get install ros-kinetic-raspicam-node should work.


Hi, thanks a lot for contributing raspicam_node. Just out of curiosity what kind of publishing rates do you experience with this node running on a Raspberry Pi 3 Module. I currently have it running with a frequency of ~3.8 hz. Was wondering if this was the expected publishing rate.


Interesting, that rate seems low.

Can you please open an issue here And I can try to assist you with your performance issue.

I want to avoid doing support over the general list.



Rohan, May I ask a further question now that my TB3 is running great using a Wii Teleop & Raspicam vision? While the Teleop function on a connected Android Teleop app works, I am now trying to view the Raspicam Publication “/raspicam_node/image/compressed” (as shown with a “rosnode info /raspicam_node” command) but with no image is displayed. Inquiring “rosnode info /android/camera_view” the Android app appears to use a Subscription to “/compressed_image [unknown type]” The rqt_graph display similarly shows no connection between the raspicam_node and android /android camera_view node. Is there a simple work around or necessary to advise administrator, or post the issue somewhere? Thanks Ross

@Red24dog A workaround is probably to republish the image in raw form. rosrun image_transport republish compressed in:=/raspicam_node/image raw out:=/raspicam_node/image

Please note that this thread is in the general category, so everyone on the Discourse gets emails when you post on it. As such, please refrain from requesting support on this thread. If you have questions, concerns or problems of a technical nature, please open an issue here and we will be better able to address you.


@rohbotics do you know if this node will work with ROS indigo? If not do you know where I can find a raspberry pi cam node for a camera v2 and pi 2?


It may work with indigo, but we haven’t been testing on indigo for a while.

This node works on a CameraV2 and a Pi2 as long as you are running kinetic.


I followed you great tutorial
working with Ubuntu 16.04 and ROS kinetic
camera module V2.
could you please help me with my problem.

in fiducials rviz
when I choose image topic as /fiducial_images (in order to detect the fiducial markers, the image field says (no image received)

if I change the image topic to /raspicam_node/image
it will work but the is no detection.

please help.

This is rather off topic for this thread.

Please ask on the Ubiquity Robotics forum here

1 Like

I tried this node running Kinetic on a raspberry pi 3 with ubuntu 16. i want to know, if this will work on ubuntu 18 and ros Melodic. I am trying, but gives me errors.

thank you.