ROS node for mipi camera module of the Raspberry Pi.
First of all, you will need to connect the Camera Module to the Raspberry Pi's camera port and enable it.
https://www.raspberrypi.org/documentation/usage/camera/
This node is primarily supported ROS Kinetic. If you do not have already installed ROS in your Rapsberry Pi, we recommend you to install the ROS Indigo or Kinetic version.
http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Kinetic%20on%20the%20Raspberry%20Pi
The existing user is should be in the video group in other to access to command interface between the running Linux kernel and peripherals (camera, audio subsystems etc) of the VideoCore.
-
Make sure that by execute below:
groups | grep video
If it's not existing then use the following commands for adding an user into video group:
sudo -s usermod -a -G video `your user`
-
And also need to make a rule for /dev/vchiq is accessible to users in video group:
echo 'SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"' > /etc/udev/rules.d/10-vchiq-permissions.rules reboot
Go to your workspace cd ~/catkin_ws/src
.
-
Clone the repository:
git clone https://github.com/dganbold/raspicam_node.git
-
Build
cd ~/catkin_ws/ catkin_make --pkg raspicam_node
Once camera node building is successfully done, you can run it using a launch file.
source devel/setup.bash
roslaunch raspicam_node camera_module_v2_640x480_30fps.launch
Start captune and image publish
rosservice call /raspicam_node/start_capture
If you want to change or tuning the parameters of camera, you can use the following tools.
rosrun rqt_reconfigure rqt_reconfigure
rosrun dynamic_reconfigure dynparam <load or dump> /raspicam_node <your parameter file>.yaml
You can easily check that published image from camera node by using image_viewer.
rosrun image_view image_view image:=/raspicam_node/image_raw
raspicam_node is released with a BSD license.