Starting with ROS on the GoPiGo3 and the Raspberry Pi
The GoPiGo3 is a robot for the Raspberry Pi 3. It has a wide range of uses: you can program the robot using Python, you can program the robot visually with Bloxter, and now you can program it in the Robotic Operating System (ROS).
The GoPiGo3 ROS Node brings together the ease and simplicity of the GoPiGo3 and the power of ROS. Combining the two lets you control sensors, add LIDAR to your robot, and use the GoPiGo3’s precise encoders for navigation and SLAM.
Installation
We assume in this article that you’ve got ROS setup on your Raspberry Pi, and we assume that you’re using the Kinetic version of ROS. In this tutorial, we’ll install the GoPiGo3 ROS Node, a ROS package for the GoPiGo3 built on the Python programming language.
Install the GoPiGo3 Python Package
First, we’re going to install the GoPiGo3 python page on the GoPiGo3.
Run the following commands in the command line to install the GoPiGo3 libraries:
cd ~
sudo curl -kL dexterindustries.com/update_gopigo3 | bash
This should create a directory ~/Dexter/GoPiGo3
Install the GoPiGo3 Node
First, we will create a new catkin workspace:
cd ~
mkdir -p gopigo3_ws/src
Next, check out the source for the node and build:
Add the GoPiGo3 environment variable to the ~/.bashrc
file and make it effective.
Test Your Installation
Test your installation. Make sure the GoPiGo3 is attached to the Raspberry Pi, and powered on. Start a new terminal window.
In the command line, let’s try the following commands:
cd ~/gopigo3_ws/devel
roslaunch gopigo3_node gopigo3.launch
After running the commands you should see the wheel encoders angle. You can gently turn the wheels and see the angle positioning move in the window.
Learn More
Want to learn more about the GoPiGo3? Click here! Want to add some LIDAR to your Raspberry Pi Robot? We’ve got directions on how to do that here.