BoBPoserSource_0.zip (2381321Bytes)
BoBette.zip (789295Bytes)
Introduction
This tutorial show a way to teach your BoB to walk and turn in an interactive process. For using the Poser software you will need a real BoB biped. This is not a simulator for the Biped robot, it is a remote control using a serial connection between robot and PC.
Credits:
BoB is a 4 servo biped using 3D printed parts. The original BoB is created by LMR user K120189.
The Poser GUI is originally written for the famous FOBO robot by Jonathan Dowdall. It has been adopted to work with the 4 servo BOB instead of the 8 servo FOBO.
What is needed?
- BoB Biped (of cause)
- Windows PC with .NET 3.5 or higher
- the BoBPoser software
- an FTDI cable when using an Arduino Mini
- an external Power supply
If you want to build/change the BobPoser software by yourself:
- Visual Studio C# 2010 (Express will work fine)
- The BoBPoser source code
Prerequesites
If you use an Arduino Mini, you need to establish a serial connection to the robot with an FTDI cable and to power the servos separately. It will not work to power the servos from the FTDI cable. The Arduino has no automatic power source selector. I ran into this problem when doing first tests with FrankenBoB.
To solve this problem you can connect the FTDI cable with wire jumpers without connecting the VCC pin. Or solder a jumper on the carrier board to split the servo power from the Arduino power.
You will neeed to load the Arduino Sketch 'Remote_control' into your BoB. If you use a different servo setup you will need to adjust the Pin definitions to your needs. This is my pin definition:
#define RAservoPin 6 // right ankle servo pin
#define RHservoPin 7 // right hip servo pin
#define LAservoPin 8 // left ankle servo pin
#define LHservoPin 9 // left hip servo pin
Calibration
Start the BoBPoser GUI, select the COM port of your robot and klick the 'Press to connect to BoB' button.
The Button text should change into 'Connecte to BoB'. Otherwise you will get an error message. Maybe choosen the wrong port, BoB is not connected or wrong Program Sketch loaded.
When you run the BoBPoser Software for the first time, you will need to calibrate your biped. This means to adjust the servo settings until your Biped both legs are in parallel and both feet standing on the ground. When you find the correct calibration,
- create a new action. Press the 'Add Action' button
- create a new frame. Press the 'Add Frame' button
- save the action under the name 'calibrations.actions'. Press the 'Save Actions' button and save the file.
- create an Arduino sketch named 'calibrations.pde'. Press the 'Export Action to Arduino' button and save the file.
Whenever you start the BoBPoser GUI again, you will need to load the calibration file by pressing the 'Set Calibration file' button and selecting the previously save 'calibrations.action' file. You can check the valid calibration by pressing the 'Move Servos to Home Position' button. Your BoB should stand now with both feet on the ground, legs standing parallel.
Frames & Actions
Now it's time to create the first moves for your BoB. The 'Remote_Control' Sketch must be loaded into the robot.
Remember to load the calibration file by pressing the 'Set Calibration file' button first.
Create a new Action by clicking on 'Add Action'.
Example for walking:
You can use the existing turn and walk actions or start by yourself from the beginning.
- It is a good idea to start with the Servo center position and use this as start frame. Save the frame.
- Start with the Right hip. Move the 'Right hip' slider to the right until BoB's left foot is up into the air. Save the frame.
- Next, adjust the Right ankle to the left to move the left foot forward. Adjust the Left Ankle to keep the foots in parallel. Save the frame.
- Next adjust the right hip to stand with both foot on the floor again. Save the frame
- repeat step 1..4 for for moving the right foot. The last frame should be the center servo position.
- Test your action by click on 'Stat action'
- Save your Actions by click on 'Save Actions' and save the file.
I have created 2 actions 'left' and right' for each foot. This is not necessary. It is better to put all walk movements into one action. You can now play with the actiuons you have created. Klick on 'Start Action' to play the sequence. If you like the movement save the action and create an Arduino Sketch by clicking the 'Export Action to Arduino' button. If you need to correct the movement. Just move to the frames by clicking on 'Move to Selected Frame' or 'Move to Next Frame'. Make the corrections on the actual frame and press 'Update selected Frame' to takeover the changes.
Repeat the process for the 'Turn' actions.
For a first test you can directly load the saved Arduinop sketches onto the robot. Remember you will need to adjust the Pin defintions for your servos.
Autonomous Navigation
When you have finished with your the Walk and Turn actions, its time to look at the result onto the Robot for autonomous navigation.
- In the the Navigation Sketch the Pin defintions must be adjusted for your servos.
- Choose the correct Ultrasonic sensor (Ping or HC-SR04) by uncomment
- Then copy the Walk, Turn and Calibration actions from the saved Arduino sketches into the Navigation Sketch
int walkFrames[8][4] =
{
{ 6000, 6000, 6000, 6000 },
{ 9400, 6000, 9800, 6000 },
{ 9500, 3500, 9800, 3600 },
{ 6274, 3704, 6362, 3679 },
{ 6274, 3704, 6362, 3679 },
{ 3400, 3700, 3700, 3600 },
{ 3000, 6300, 3700, 6900 },
{ 6000, 6000, 6000, 6000 }
};
int turnFrames[8][4] = {
{ 6000, 6000, 6000, 6000 },
{ 8800, 9000, 8000, 8000 },
{ 6900, 10600, 6800, 9800 },
{ 4553, 10577, 5491, 9355 },
{ 5200, 9000, 2700, 7700 },
{ 5298, 6558, 5325, 5579 },
{ 6000, 6000, 6000, 6000 },
{ 6000, 6000, 6000, 6000 }
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Calibration
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int calibration[4] = {-748, -972, -299, -199 };
Action turn(7, 100, 25, turnFrames); //the turn right action
Action walk(8, 100, 25, walkFrames); //the walk forward action
One important thing:
You will need to add one more frame to the turnFrames array than needed (8 turn frames, but only 7 frames will be executed). It's a bug in the software. Don't know why, but this tricks helps you.
Further development
- currently testing a cheap Bluetooth module for wireless remote control.
- A combined version of the Remote_Control and Navigation Sketch is under development
- Save/Load the poses and calibration values in the Arduino EEPROM.
- Put Arduino pin definition in a separate config header file.
- Optionally export only the array of poses instead of a complete Arduino sketch.
- Expanding the Poser GUI to support different Biped models
That it. Have fun, keep your BoB moving.