After you finished the assembly of Poppy, you should take care to the first start.
Step 1: Power Supply
Plug the alimentation, the led of each motor should blink one time in red. This means that the power supply of the motor is OK.
Step 2: Communication
Open a ipython console and check if each motor is detected.
import pypot.dynamixel
dxl_io_upper = pypot.dynamixel.DxlIO('PORT_UPPER_BODY')
dxl_io_lower = pypot.dynamixel.DxlIO('PORT_LOWER_BODY')
print dxl_io_upper.scan(range(60))
print dxl_io_lower.scan(range(30))
the result should be: [31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54]
and [11, 12, 13, 14, 15, 21, 22, 23, 24, 25]
Step 3: Generate the Poppy configuration file
Then have just to run the poppy_config_generator.py script after replacing your COM port:
poppy_config['controllers']['lower_body_controller']['port'] = "PORT_LOWER_BODY"
poppy_config['controllers']['upper_body_controller']['port'] = "PORT_UPPER_BODY"
cd path/to/poppy-software
cd poppytools/configuration
python poppy_config_generator.py
It will generate a .json file with the configuration of the whole robot.
Now you can create the poppy robot like this:
import pypot.robot
from poppytools.configuration.config import poppy_config
poppy = pypot.robot.from_config(poppy_config)
Step 4: Make it move
Now it is time to make it move. The first thing to do, is to order each motor to go to the position 0°. At this stage, you will able to know if you have correctly assembled Poppy
import time
import pypot.robot
from poppytools.configuration.config import poppy_config
poppy = pypot.robot.from_config(poppy_config)
poppy.start_sync()
for m in poppy.motors:
m.compliant = False
for m in poppy.motors:
m.goto_position(0, 5)
time.sleep(5)
The robot should slowly take this posture:
If it doesnât, this means that one or several motors were not correctly assembled/aligned.
Step 5: Your Poppy is ready
If you manage to have your Poppy correctly positioned when you each motor in 0° position, your Poppy is ready to be used