Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial will show you how to use two Nao’s for puppeteering. This allows you to control the movement of one robot by moving the other robot.

Follow Getting started and Getting started with a the Nao robot. You should now have the following set up at the end:

  1. Redis is running on your laptop and you have SIC installed locally

  2. SIC is running on the Nao’s

Approach

This tutorial will show you how to do puppeteering with two Nao’s. Since we will be using several joints of the robots which require some setup, this tutorial is split into two parts:

  1. Connecting separately with both Nao’s and setting up their default behavior

  2. Connecting the Nao’s to each other using the NaoqiMotionStreamerService

Connecting to two Nao’s

First, let’s create a Python file demo_puppeteering.yp that contains our SIC program.

...

Code Block
languagepy
# Set fixed joints to high stiffness such that the robots don't fall
puppet_master.stiffness.request(Stiffness(0.7, joints=FIXED_JOINTS))
puppet.stiffness.request(Stiffness(0.7, joints=FIXED_JOINTS))

# Start both robots in rest pose
puppet.autonomous.request(NaoRestRequest())
puppet_master.autonomous.request(NaoRestRequest())

Puppeteering

Now that we have both Nao’s setup and in Rest position we can connect the puppet Nao to listen to the output of the puppet_master’s Motion Streaming component. This is a simple one-liner:

...

Code Block
languagepy
puppet.autonomous.request(NaoRestRequest())
puppet_master.autonomous.request(NaoRestRequest())

That was it! You should have been able to If you run the demo_puppeteering.py file you should be able to, for example, move the puppet_master Nao’s arms for example and see the puppet Nao mirror this movement.

...