All Projects → UbiquityRobotics → Raspicam_node

UbiquityRobotics / Raspicam_node

Licence: bsd-3-clause
ROS node for camera module of Raspberry Pi

Projects that are alternatives of or similar to Raspicam node

Picroscopy
A Python web-application to turn a Raspberry Pi and PiCam into a microscopy solution
Stars: ✭ 54 (-75.23%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Auto car
基于深度学习的自动避障智能小车
Stars: ✭ 74 (-66.06%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Raztot
A simple DIY, browser controlled, RPi + WebRTC video streaming rover
Stars: ✭ 67 (-69.27%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
True artificial intelligence
真AI人工智能
Stars: ✭ 38 (-82.57%)
Mutual labels:  ros, raspberry-pi
Balena Cam
Network Camera with Raspberry Pi and WebRTC. Tutorial:
Stars: ✭ 120 (-44.95%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Pi Camera In A Box
Stream your Raspberry Pi Camera Module directly to your web browser
Stars: ✭ 49 (-77.52%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Raspberry Pi Diy Projects
Collection of Do-It-Yourself Projects on Raspberry Pi 2 / 3 & Zero W with diverse HATs and pHATs.
Stars: ✭ 70 (-67.89%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Pistreaming
A little demo of streaming the Pi's camera to web browsers
Stars: ✭ 655 (+200.46%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Arm Vo
Efficient monocular visual odometry for ground vehicles on ARM processors
Stars: ✭ 115 (-47.25%)
Mutual labels:  ros, raspberry-pi
Picamera
A pure Python interface to the Raspberry Pi camera module
Stars: ✭ 1,339 (+514.22%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Pendulum
ROS, ROS2, real-time, control, pendulum
Stars: ✭ 37 (-83.03%)
Mutual labels:  ros, raspberry-pi
Mmalsharp
C# wrapper to Broadcom's MMAL with an API to the Raspberry Pi camera.
Stars: ✭ 152 (-30.28%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Raspberryrobot
基于树莓派的智能机器人
Stars: ✭ 11 (-94.95%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Jarvis Ai
It is an AI assistant which will automate your task like it can send emails also it can control lights using raspberry pi it can inform about weather and many more features
Stars: ✭ 52 (-76.15%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Fotobox
Python based photo-booth script for Raspberry Pi and RPi Camera
Stars: ✭ 22 (-89.91%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Homekitcam
A project to make a Raspberry Pi driven, HomeKit Enabled camera.
Stars: ✭ 69 (-68.35%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Pi Timolo
Raspberry PI-TIMOLO ( PI-TImelapse, MOtion, LOwLight ) uses RPI picamera and OpenCV for Remote Headless Security Monitoring using Motion Tracking, Rclone Auto Sync files with remote storage services. Auto Twilight Transitions and Low Light Camera Settings. Panoramic images using PanTiltHat and More. This project is featured on GitHub Awesome software.
Stars: ✭ 441 (+102.29%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Raspberryio
The Raspberry Pi's IO Functionality in an easy-to-use API for Mono/.NET/C#
Stars: ✭ 593 (+172.02%)
Mutual labels:  raspberry-pi, raspberry-pi-camera
Ev3dev Lang Java
A project to learn Java and create software for Mindstorms Robots using hardware supported by EV3Dev & the LeJOS way.
Stars: ✭ 79 (-63.76%)
Mutual labels:  ros, raspberry-pi
Raspilive
📷 Stream video from the Raspberry Pi Camera Module to the web
Stars: ✭ 120 (-44.95%)
Mutual labels:  raspberry-pi, raspberry-pi-camera

raspicam_node

ROS node for the Raspberry Pi Camera Module. Works with both the V1.x and V2.x versions of the module. We recommend using the v2.x cameras as they have better auto gain, and the general image quality is better.

Installation

A binary can be found at https://packages.ubiquityrobotics.com/ follow the instructions there to add the repository.

Then run sudo apt install ros-kinetic-raspicam-node

Build Intructions

If you want to build from source instead of using the binary follow this section.

This node is primarily supported on ROS Kinetic, and Ubuntu 16.04, and that is what these instuctions presume.

Go to your catkin_ws cd ~/catkin_ws/src.

Download the source for this node by running

git clone https://github.com/UbiquityRobotics/raspicam_node.git

There are some dependencies that are not recognized by ros, so you need to create the file /etc/ros/rosdep/sources.list.d/30-ubiquity.list and add this to it.

yaml https://raw.githubusercontent.com/UbiquityRobotics/rosdep/master/raspberry-pi.yaml

Then run rosdep update.

Install the ros dependencies,

cd ~/catkin_ws
rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y

Compile the code with catkin_make.

Running the Node

Once you have the node built, you can run it using a launch file.

For a V2.x camera, run roslaunch raspicam_node camerav2_1280x960.launch

For a V1.x camera, run roslaunch raspicam_node camerav1_1280x720.launch

Use rqt_image_view on a connected computer to view the published image.

Configuring the node with dynamic reconfigure

The raspicam_node supports dynamically reconfiguring the camera parameters.

Run the dynamic reconfigure node on a connected computer:

rosrun rqt_reconfigure rqt_reconfigure

It should bring up a user interface like the one below. Paramaters can be dynamically adjusted via this interface.

rqt_reconfigure

Troubleshooting

  1. Make sure that your user is in the video group by running groups|grep video.

  2. If you get an error saying: Failed to create camera component, make sure that the camera cable is properly seated on both ends, and that the cable is not missing any pins.

  3. If the publish rate of the image over the network is lower than expected, consider using a lower resolution to reduce the amount of bandwidth required.

Node Information

Topics:

  • ~/image/compressed: Publishes sensor_msgs/CompressedImage with jpeg from the camera module.

  • ~/image: Publishes sensor_msgs/Image from the camera module (if parameter enable_raw is set).

  • ~/motion_vectors: Publishes raspicam_node/MotionVectors from the camera module (if parameter enable_imv is set).

  • ~/camera_info: Publishes sensor_msgs/CameraInfo camera info for each frame.

Services:

  • ~/set_camera_info: Used to update calibration info for the camera.

Parameters:

  • ~private_topics (bool): By default the topics are private, meaning the node name will be added in front of every topic name. If you don't want the topics to be private, you can set this parameter to "true". This parameter is mainly present in order to keep backward compatibility.

  • ~camera_frame_id (tf frame): The frame identifier to associate the camera.

  • ~camera_info_url: The URL of the camera calibration .yaml file.

  • ~camera_name (string): The name of the camera, should match with name in camera_info file.

  • ~framerate (fps): Framerate to capture at. Maximum 90fps

  • ~height (pixels): Height to capture images at.

  • ~width (pixels): Width to capture images at.

  • ~quality (0-100): Quality of the captured images.

  • ~enable_raw (bool): Publish a raw image (takes more CPU and memory)

  • ~enable_imv (bool): Publish inline motion vectors computed by the GPU

  • ~camera_id (int): The camera id (only supported on Compute Module)

Calibration

The raspicam_node package contains a calibration file for the raspberry PI camera versions 1 and 2.

A tutorial Monocular Camera Calibration tutorial shows how to calibrate a single camera.

The 8x6 checkerboard and the 7x6 checkerboard are rather large and require specialized printers to print out at full scale. They can be printed on more common printer sizes with auto scaling turned on. Be sure to carefully measure the square size in millimeters and convert to meters by dividing by 1000.

Running calibration requires raw publishing enabled. Add enable_raw:=true to the camera roslaunch command.

If you are not sure which launch file to use camerav2_1280x960_10fps.launch is probably what you are looking for.

On the Pi

roslaunch raspicam_node camerav2_1280x960_10fps.launch enable_raw:=true

On your workstation:

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.074 image:=/raspicam_node/image camera:=/raspicam_node

Motion vectors

The raspicam_node is able to output motion vectors calculated by the Raspberry Pi's hardware video encoder. These motion vectors can be used for various applications such as motion detection.

On the Pi, add enable_imv:=true to the camera roslaunch command:

roslaunch raspicam_node camerav2_410x308_30fps.launch enable_imv:=true

On your workstation, build raspicam_node so that the MotionVectors ROS message is recognized by Python:

cd ~/catkin_ws
catkin_make
source ~/catkin_ws/devel/setup.bash

Finally, run script imv_view.py to visualize the motion vectors:

rosrun raspicam_node imv_view.py
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].