Nao Robot Copying Movements Through Xbox Kinect Camera

Introduction: Nao Robot Copying Movements Through Xbox Kinect Camera

As a project in our Computer Science class in high school (Porter Gaud), myself (Legare Walpole) and another student (Martin Lautenschlager) set out to get a Nao humanoid robot to mimic our movements through an Xbox kinetic camera. For months no progress was being made, until we found VincentVanbecelaere, a fellow Inscrutable member. As we were trying to follow his directions step by step, there were several crucial steps omitted and required further research to move forward. This Inscrutable's purpose is to, hopefully, smooth out his instructions and address the minutia required to make this project work. By the end of this document you should be able to replicate this project exactly.

Step 1: Prerequisites

You will need a few materials before you begin. The versions listed below is what worked for us. We cannot guarantee cooperation with other versions of any software or hardware not listed.

1. Nao Humanoid Robot V5

2. A windows computer with Microsoft Visual Studios Community 2015 with XNA version 4.0 installed

Download page (Visual Studio): https://www.visualstudio.com/vs/older-downloads/

Download Page (XNA): https://www.microsoft.com/en-us/download/details.a...

3. A Linux computer with Ubuntu 14.04 LTS 64-bit operating system. (Can work with 32 bit)

4. Python Version 2.7 (not Python 3. Important) on Linux computer

5. An MQTT broker on Linux computer

*Will download in later steps

6. SSH unblocked on all devices and network.

Step 2: Download MQTT Broker and Verify Connectivity

First step in connecting everything together is installing the MQTT broker.

To install the MQTT Broker, type these commands into the Ubuntu terminal:

$sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa

$sudo apt-get update

$sudo apt-get install libmosquitto-dev

$sudo apt-get install mosquitto-clients

These commands should fully install MQTT. To test its installation type in this command:

$mosquitto

The terminal should look like the picture above if it worked. If not, there are many different guides on how to install it.

Step 3: Configure Python 2.7

You will first need to install python 2.7.x on your linux computer. (We are using python 2.7.6)

Here is a link to the download page: https://www.python.org/downloads/

Once you have python installed you will need to download and install the NAOqi provided by Aldebaran. You will need to create an account to access the download. Don't worry. It's free and takes little time.

Link: https://community.ald.softbankrobotics.com/en/reso...

Download the linux x64 version. It is under the Header "3 - Python NAOqi SDK"

Once you have the file downloaded, unzip it and put it anywhere. It doesn't matter but make sure you know where it is located.

Then type

$ export PYTHONPATH=$PYTHONPATH:/home/yourUserName/locationOfNaoLibrary

Once you have set the python path, type in this command to edit your .bashrc file

$ editor ~/.bashrc

Once you are editing that file, type in this at the bottom of the file:

export PYTHONPATH=$PYTHONPATH:/home/yourUserName/locationOfNaoLibrary

Test to see if this works by typing in "python" into the linux terminal and then typing in "import naoqi".

This should now work.

Step 4: Download Code and Have Fun!

Download the Visual Studios (kinect.zip) file to the Windows computer and the Python file (robot.py) to the linux computer. Open both of these on their respective computers.

Put these computers on the same wifi network and put in the linux computer's IP, which you can find by typing in:

$ ifconfig

The IP after "inet addr:" (under wlan for wireless, under eth0 for wired) will be the correct IP to type into the Visual Studios program when started.

Start up the MQTT broker on linux by typing in

$ mosquitto

Then start the python code on linux by typing in

$ cd location of robot.py

$python ./robot.py

This will start the python code. The code will require information that you can easily supply, such as the robot IP, port (standard 9559), MQTT ip (which in this case will be localhost), and MQTT subject (which we set as "nao").

This should connect the robot, MQTT broker, and Visual Studio allowing you to control the robot, all you have to do now, is stand in front of the Kinetic camera and move!

We hope this guide has made the process clear and easy to replicate. Once again the original creator of this project is Vincent Vanbecelaere. The code we used is from him, and he was the main reason this project did not fall through in the first three months. We hope you found this post instructive and, finally, have fun meddling with this concept.

We would finally like to especially thank Vincent Vanbecelaere. Without his post, we would have never been able to complete this project. He deserves most all the credit for getting this project on its feet. What follows is a link to his project page if you would like to reference it for any reason.

https://www.instructables.com/id/Nao-Robot-Mimicki...

Share

    Recommendations

    • Tiny Home Contest

      Tiny Home Contest
    • Fix It! Contest

      Fix It! Contest
    • Metalworking Contest

      Metalworking Contest

    Discussions

    Great information! Thanks for sharing!