Raspberry Pi 3+ros Kinetic version
Remote PC +ros Indigo version
First turn on the Raspberry Pi camera function
sudo raspi-config
Start Camera function
and restart the Raspberry Pi.
Open the Raspberry Pi Official drive node on GitHub
Https://github.com/UbiquityRobotics/raspicam_node
Do the following steps
Enter the source directory of the workspace
$CD ~/CATKIN_WS/SRC
Copy the driver package
$git Clone Https://github.com/UbiquityRobotics/raspicam_node.git
Create a dependent file must be the following path name is also the same
/etc/ros/rosdep/sources.list.d/30-ubiquity.list
And then copy the following sentence in
Yaml Https://raw.githubusercontent.com/UbiquityRobotics/rosdep/master/raspberry-pi.yaml
Run
$ROSDEP Update
CD ~/catkin_ws
rosdep install--from-paths src--ignore-src--rosdistro=kinetic-y
At last
Catkin_make
Dual-Machine communication
Write in the. bashrc file of the Raspberry Pi
Export ROS_HOSTNAME=RASPBERRYPI_IP
Export ros_master_uri=http://raspberrypi_ip:11311
Write in the. bashrc file on the remote computer
Export ROS_HOSTNAME=LAPTOP_IP
Export ros_master_uri=http://raspberrypi_ip:11311
Start Roscore on both the Raspberry Pi and the computer.
On the Raspberry Pi.
Once You has 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
Running on a computer
$RQT _image_view
Finally, as shown