I have a Raspberry Pi 3 running ROS Kinetic and I use it to control an autonomous robot. The plan is to improve my robot by adding computer vision capabilities. The Raspberry Pi has resources to build intelligent robots and the community helps me more in fixing a lot of problems. These are the reasons for this moment not to change it with another single board computer with advanced hardware resources. The bad thing is that Pi 3 has limited capabilities for graphics applications such as rviz or running computer vision applications.
My idea (I hope is a good one and will work) is to use Pi 3 and a Linux computer in the same network to exchange data from one to another while I run rviz and the Gazebo simulator on the PC.
The first step in implementing my idea is to setup ROS Kinetic to communicate between Pi 3 and the remote Linux computer. Below are the steps that I did to make both computers communicate with each other.
- Step 1: I checked that everything was okay with ROS Kinetic on my Linux PC. I installed it some time ago using the steps described here.
- Step 2: I re-installed a Linux image and ROS Kinetic on the Raspberry Pi 3 board. It took some time since I chose to install ROS on the Raspbian Stretch Lite. This operating system is what I need for my robot: it doesn’t have desktop applications or a GUI of any kind.
- Step 3: At this step, I pay some attention at the IP address for the ROS master node (Pi) and the IP address for other ROS node (the Linux PC).
- 3.1 on Raspberry Pi 3 type the following command:
C++
1sudo nano .bashrcNavigate to the end of the file and add these two lines:
C++
12#The IP address for the Master node = the IP address of Raspberry Piexport ROS_MASTER_URI=http://192.168.0.1:11311C++
12#The IP address for the Master node= the IP address of Raspberry Piexport ROS_HOSTNAME=192.168.0.1 - 3.2 on the Linux PC, type the following command:
C++
1sudo nano .bashrcNavigate to the end of the file and add these lines:
C++
12#The IP address for the Master node = the IP address of Raspberry Piexport ROS_MASTER_URI=http://192.168.0.1:11311C++
12#The IP address for your Linux PCexport ROS_HOSTNAME=192.168.1.101
These are all the steps to make two Linux computers communicate and share nodes, topics, and services.