Low Orbit Flux Logo 2 D

Freenove Robot Dog Kit for Raspberry Pi

The Robot Dog Kit from Freenove is probably one of the more interesting things you will come accross all day. It is powered by the Raspberry Pi. You can find it on Amazon HERE (affiliate link). It has some really interesting features including:

This is the overview video from Freenove:

Keep reading for:

Also, learn more about Freenove here:

Our Setup Instructions

This is a document that I put together while assembling the Freenove Robot Dog Kit for Raspberry Pi. I basically followed the official instructions and put the information together in a format that is easy for me. You should probably use or at least look over the official documentation from Freenove as it includes some extra details that I haven’t included.

You can download the official instructions from Freenove here

Required parts that are not included:

gpio readall

Raspberry Pi Setup

sudo  apt-get install xrdb

Launch remote desktop from Windows

SSH to your Raspberry Pi. You can use either the IP or raspberrypi.local.

ssh pi@raspberrypi.local

The default password is: raspberry

Needed to enable booting into X windows and rebooted after that.

Launch the configuration utility:

sudo raspi-config

I used the official version from RealVNC:
HERE

I’ve tried other clients but had trouble because they don’t support the newer security options that were enabled on the server.

Launch the configuration utility:

sudo raspi-config

Select these Options

Fix scaling on VNC viewer:

Charging

– buttons and LEDs on the robot board – – image here —

To charge:

Note:

Setup Python Libraries

WARNING - Use VNC or there could be errors during installation ( according to the manual ).

Clone the Freenove Robot Dog GitHub Repo:

git clone https://github.com/Freenove/Freenove_Robot_Dog_Kit_for_Raspberry_Pi

Check Python version, set it to 3 if it isn’t already:

python
cd /usr/bin
sudo rm python
sudo ln -s python3 python
python

Enable the camera using the GUI based config tool:

Set I2C Baud Rate

Edit this config file:

sudo nano /boot/config.txt

Change this:

dtparam=i2c_arm=on, 

To this:

dtparam=i2c_arm=on, i2c_arm_baudrate=400000

Run Setup

Run the setup program:

cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code
sudo python setup.py

Reboot after setup has completed sucessfully:

sudo reboot

Assemble Robot ( part 1 )

Robot Shield board It requires two 18650 3.7v batteries. It has charger function.
S1(LOAD) Switch It mainly controls the power supply of servos, buzzer, ultrasonic module and LED module. The D1 indicator will light up when S1 is pressed.
S2(CTRL) Switch It mainly controls the power of chips such as PCF9685, ADS7830 and Raspberry Pi. The D2 indicator will light up when S2 is pressed.
Type-C port It is used to connect cable for charging. It only works when S1 and S2 are turned off.
LED port It is used to connect LED module which is controlled by Raspberry Pi.
MPU6050 port It is used to connect MPU6050 which is controlled by Raspberry Pi.
Battery level indicator It consists of four LEDs. When the battery power decreases gradually, the LEDs will get dimmer gradually until it’s turned off.
IO port It is used to connect shield with Raspberry Pi conveniently.
Servo port There are 16 servo ports with control accuracy of 0.09 degrees.
Sonic module port The interface of HC-SR04 Ultrasound Module is provided.
Buzzer It is directly controlled by raspberry pi, which is turned on at high level and off at low level.

freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi

WARNING - Make sure you use the correct screws and other parts as labeled in the diagrams. For example, don’t just assume that you should use the screws from the same pack as the servo motors to connect the plates to the arms. I did this and broke a couple of screws because I didn’t verify that they were the correct type.

freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi

Run Servo Program

freenove-robot-dog-kit-for-raspberry-pi

cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
sudo python Servo.py

Assemble legs to body.

WARNING - Don’t disconnect servos or power.

freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi

Assemble Head and Connect to Body

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi

freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi

Calibration Support and Module Test

freenove-robot-dog-kit-for-raspberry-pi

Check i2c address with this command:

i2cdetect -y 1

freenove-robot-dog-kit-for-raspberry-pi

Addresses you will see and components that they correspond to:

0x40 PCA9685 chip
0X48 ADS7830 chip
0X68 MPU6050 module

Test the servos:

cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
sudo python test.py Servo

The robot will slowly switch to these positions(A,B,C,D):

freenove-robot-dog-kit-for-raspberry-pi

ADC Module Test:

cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
sudo python test.py ADC

This will show the voltage of the batteries.

To stop the test:

[ctrl] + c

Ultrasonic module test:

cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
sudo python test.py Ultrasonic

This will show the distance of objects from the ultrasonic sensor.

To stop the test:

[ctrl] + c

LED test:

cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
sudo python test.py Led

LED module will cycle through these in order: red, green, blue, white, and off.

‘If the LED color display order is not correct, open the “Led.py” file in the current directory and modify the value of the “self.ORDER” variable on line 16.’

To stop the test:

[ctrl] + c

Buzzer test:

cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
sudo python test.py Buzzer

The buzzer will sound for 3 seconds.

Camera Test:

The camera will need to be connected and enabled.

WARNING - Don’t connect or disconnect the camera while the Pi is on. Damage can occur if the camera is connected while the Pi is on.

Check that the device exists:

ls /dev/video0

Test taking an image:

cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
raspistill -o image.jpg

You should see an image file created called image.jpg

Operations

You will need to start up a server process on the Robot’s Raspberry Pi. You will also need to run a cient program to control the robot from another system. The client can run on Windows, Mac OSX, or Linux on another Raspberry Pi. It will probably also work fine on a Linux based PC.

Start the server:

cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
sudo python main.py

A GUI will start up.

freenove-robot-dog-kit-for-raspberry-pi

Running the Client

We are going to cover setting up the client on each type of system and then we will cover actually using the client and calibrating the system.

The client GUI looks like this:

freenove-robot-dog-kit-for-raspberry-pi

Windows Client using the Exe File

Windows Client Using Python

Assuming you’ve placed it on your D drive you could use these commands to launch the setup script:

[win] + r

cmd
D:
cd D:\Freenove_Robot_Dog_Kit_for_Raspberry_Pi\Code
Python setup_windows.py

Run the client:

[win] + r
cmd

Once you have a terminal open run this:

D:
D:
cd D:\Freenove_Robot_Dog_Kit_for_Raspberry_Pi\Code\Client
Python Main.py

You can run this to explicitly use Python 3 in case Python 2 is default:

Python3 Main.py

Mac OSX

cd Downloads
cd Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/
python3 setup_macos.py

Open a terminal and run the client:

cd Client/
python3 Main.py

Run the client from a Raspberry Pi ( Linux )

Install these packages:

sudo apt-get install -y libopencv-dev python3-opencv
sudo pip3 install opencv-contrib-python==3.4.6.27
sudo apt-get install -y libatlas-base-dev libjasper-dev

Run the setup program:

cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Client
sudo python Main.py

Run the Client From Ubuntu Linux 20.04

I was able to get the client working on Ubuntu Linux 20.04 with some slight modifications. The package libjasper-dev was apparently removed from newer versions of Ubuntu so I needed to add an older repo and pull the package from there. I also needed to make sure to run Python 3 instead of Python 2. I installed “opencv-contrib-python” without specifying the version like this “opencv-contrib-python==3.4.6.27”. The specific version 3.4.6.27 wasn’t available but newer versions were available.

python
python3

sudo apt update
sudo apt install -y libopencv-dev python3-opencv
sudo apt install python3-pip
sudo pip3 install opencv-contrib-python

sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt update
sudo apt-get install -y libatlas-base-dev libjasper-dev
 
 
git clone https://github.com/Freenove/Freenove_Robot_Dog_Kit_for_Raspberry_Pi
 cd Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Client
sudo python3 Main.py

Android / IOS

There is an Android app available. You can find it here:

There is an IOS client app available. You can find it by searching freenove in the app store.

The Android / iOS app interface looks like this:

freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi

Connect and Calibrate

Once you have the client setup and running you can connect and start calibration like this:

You need to calibrate before use.

Calibration

freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi freenove-robot-dog-kit-for-raspberry-pi

NOTE - You might need to recalibrate again later if your bot’s seteps get out of sync.

Movement

You can use the coordinate system to change the angle of the body ( drag the cursor ).

You can also use the keyboard to move:

Button on Client Key Action
ForWard W Move
BackWard S Back off
Turn Left A Turn left
Turn Right D Turn right
Step Left Q Step Left
Step Right E Step Right
Connect/ Disconnect C On/Off Connection
Open Video/ Close Video V On/Off Video
Calibration M Open calibration interface
Buzzer/Noise Space On/Off Buzzer
Relax R Relax station
LED L Open LED control interface
Sonic U Measure and display distance from obstacle
Balance B Open/Close balance mode
Face/Ball/Close F Face recognition and ball tracking
Face ID   Input images of human faces

Relax Mode:

Relax mode looks like this:

freenove-robot-dog-kit-for-raspberry-pi

Facial Recognition

You can use the “Face ID” button to take pictures and train the robot to recognize a face. You can assign names to faces.

You can use the “Face” button to identify faces.

SliderBar Function
Head Adjust head angle.
Height Control body height.
Horizon Make body move forward or back.
Yaw Adjust Yaw angle of body
Pitch Adjust Pitch angle of body
Roll Adjust Roll angle of body

Unboxing Video

This is our unboxing video. The assembly instructions and demo will be in separate videos. This one just shows you what comes in the box.

Amazon affiliate disclosure statement We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.