Bioloid Control

Running the bioloidcontrol Physics Simulator

A simple run of the simulator (using the default configuration file in bioloidcontrol/physics/physics.conf) :

cd bioloidcontrol/physics
make && ./physics

In physics.conf, there are a number of user-settable parameters. Most of them (with the default values) are in the configuration file, but commented out just to illustrate what"s there. In addition, any of the options in physics.conf can be overridden on the ./physics command line.

Drag (while clicking) the mouse on the GUI to change viewpoint. Press "r" to respawn the robot (if it falls over, for instance).

Running the bioloidcontrol Physics Simulator with the Controller

To produce the videos on YouTube, the following set-up was used :

# STEP 1 - Terminal Session 1
cd main
../viewer/viewer -geometry 320x480+0+0 &
# STEP 2 - Terminal Session 2
make && ./physics --simulation.time_end=0 --gui.width=320 --gui.height=480 

Starting the controller part needs the physics simulation running first (since it connects to the physics electronics as a client) :

# STEP 3 - Terminal Session 1
./bioloid -config config_physics.xml 

From the simulator command-line, one can then run (as a sample) :

Running the bioloidcontrol Physics Simulator from a Perl controller

For people who are familiar with perl (great for quickly hacking something together : see C++ for something diametrically opposite):

cd bioloidcontrol/physics/misc

This chunk of code reads from the "IMU" continuously, and looks for key-presses. Try tapping some of the number keys. And then look at the code to find out what"s going on.

Running the bioloidcontrol Physics Simulator : Next Steps

The physics module is built so that its objects can be used independently. There"s no need to run the GUI. If your "robot brain" just wants to simulate the physics, then there"s no need to run the bioloid bus - just control the servos directly.

Most likely, I"ll be embedding a way of manipulating the physics objects within perl - developement is just so much quicker in a higher level langauge like perl :-)

Adapting the bioloidcontrol Physics Simulator : Robot Definition XML

Have a look at the Excel file in "bioloidcontrol/physics/xml-generation".

This file contains the source of all the parameters for the robot that"s being simulated - and defines the relationship between all the parts. Also, it collects together these relationships in the last sheet, of which the coloured background part can be copy-pasted into the "PortugeseHumanoid.txt" file. From there, the following updates the humanoid definition file :

cd bioloidcontrol/physics/xml-generation
perl > ../physics_humanoid.xml

The idea of creating the robot this way was to ensure that people could see (and understand) exactly the steps required to get to the end XML definition of the robot.

Ideally, there would be the one extra step of converting the joint definitions into the DH-parameterization used by the bioloidcontrol/main/bioloid program : which could then be made completely compatible end-to-end : all driven by one parameterization.

Taking a video of the bioloidcontrol Physics Simulator

There are a couple of useful things in the bioloidcontrol/physics/frame folder which were used to produce the YouTube videos.