Replicate Earthrover Robot Software on your Raspberry Pi
This automated mechanism installs and configures robot software on your Raspberry Pi and turn it into a well equipped Robot Laboratory. The automated configuration is achieved through a bash script which installs all the necessary libraries / packages & source codes. Once the script is done executing, your Raspberry Pi will be loaded with Webserver, Machine Learning Models, Tensorflow lite interpreter, Coral USB Accelerator support and many more goodies along with the working source codes for performing variety of robotic experiments. Have a glimpse of various capabilities of this robot's software and an overview of the hardware connections here.
Step 1: Prepare a micro SD card with latest Raspberry Pi OS.
Download the Raspberry Pi OS (Buster) with desktop from here and flash it to a micro sd card.
Step 2: Download the bash script that installs everything for you.
Connect your Raspberry Pi to internet using wifi. Download the bash scrip using following terminal commands:-
wget https://helloworld.co.in/earthrover/auto_install.sh.zip
Unzip and extract the file
unzip auto_install.sh.zip
OR
Download the file using this button. Unzip and place the file in location '/home/pi/' of Raspberry Pi.
The file 'auto_install.sh' should be visible in the location as shown in picture below.
Step 3: Run the bash script
Now you are all set to run the bash script. Use the following command to do that.
sudo sh auto_install.sh
The script will begin its work and when its done installing, you should see following message:-
Step 4: Enable Camera interface
You can use the Preferences option under main menu to enable the Camera. Otherwise, you can use the terminal command 'sudo raspi-config' to do the same.
Step 5: Access the Control Panel
Now you can access the Web Control Panel on any Laptop / Mobile connected to same network. Just open up a browser (prefrably Chrome) and type the URL as prompted by your terminal window.
The control panel will look like this:-
The various functions of Web Control Panel and Hardware connections are elaborated in a readme web page accessible by clicking the robot's image at top right corner.
The Bash Script
The script perfoms following actions on your Raspberry Pi:-
- Update & upgrade Raspberry Pi OS
- Install Apache Webserver and PHP
- Allowing execution of system commands from PHP
- Install SSL Certificates (required for 'https' connections)
- Install espeak (Text to Speech engine)
- Install Tensorflow Lite and Google Coral Coral USB Accelerator Libraries
- Install OpenCV
- Download Earthrover Software from Github
- Move the code to desired location and set permissions
All you need is a Raspberry Pi and a Picamera to get started. Other hardware can be added subsequently.
While building this robot, i realised that it is not enough to just share the source code. The important part is the environment in which this source code runs. Setting up the required environment can be a challenging task if you are just starting. So, i created this bash script, which sequentially installs everything that is required to run the software of Earthrover on your Raspberry Pi. Follow the above steps as described and you can replicate my work on your device.
All the best.
Comments
Hello Sir,
Can i get the github code link for the above GUI and ML part,please.
I need to tweek it a little for my project which is similar
Thank you
https://github.com/jiteshsaini/robotics-level-4
Thank you
Amazing project. Thank you for the detailed writeup and excellent explanations of things. I'm getting a ssl error. Any insight how to fix the certificate issue?
Hello Sir
How do I replicate this project, but with my pretrained model from google teachable machine?
Hello Sir,
I want to replicate only the human following logic of the earthrover. Could you please tell me the steps to implementing the code and customizing it onto the raspberry pi. Can i use usb camera instead of the picamera. Please tell me the necessary changes.
Just download and run the bash script as described in this article. Yes you can use the USB Camera, no changes required. The camera is accessed through OpenCV.. cap = cv2.VideoCapture(0).. just try 1 or 0 in this line.. it should work with USB camera out of the box
Any chance on you making video on how is this done or lil written gude
How can I customize the modelnet ssd model ...i want to detect unique tag and the follow it so how can i include tht tag in the model
Hi Ajit, there is a technique called transfer learning to achieve what you want. Check out this video also https://youtu.be/-ZyFYniGUsw
Hello sir i was able to replicate the project but the frames per second is too slow...so Is it possible to get the coral usb accelerator in india(goa) an how much will be its cost. In tht human following code how can we also detecte the colour (HSV) so tht it follows only person with tht particular colour
I got the coral shipped from US.. You can check the options on coral.ai website. Detection of color can be done through image processing techniques. I hope OpenCV should have a method for that. Let me know if you succeed
hi this is a useful tutorial, but i wasnt able to use the bash script because im running VERSION="11 (bullseye)" ,aarch64, i already have open cv and tensorflow lite libraries when i tried to use the command sudo sh auto_install.sh the folowing desplayed
Raspbian Version: 11 This OS not supported. Earthrover's software works with Raspberry Pi OS(Legacy), also known as 'Buster' and earlier versions. Prepare a micro sd card with 'Buster' and try again.
is there a way i can use this os and use your bash script without running Raspberry Pi OS(Legacy
i would be very greatful if u could help me sort this problem.
Hello, i enjoyed the project and i am trying to learn from it as much as possible. is there a way to run the program without running the bash script everytime ?
Bash script is used only to install the software once. You don't have to run it again unless you want to prepare a new sd card. You can access the web control panel by typing the ip address of your pi..
very nice work, appreciable project!😊
You are the best! Thank you very much for all your work, and thank you for sharing!
Thanks Julio 😊