Master Thesis (2007)
Title: Humanoid robot: Development of a simulation environment of an entertainment humanoid robot

Abstract: This dissertation was developed in collaboration with Robosavvy Ltd and boosted the creation of the Humanoid Robotics Laboratory of IDMEC-Center of Intelligent Systems, at Instituto Superior Técnico. The developments presented include: i) the software development for interfacing the Matlab Real TimeWorkshop Toolbox with the Bioloid humanoid robot servos; ii) the identification of the internal and external dynamic parameter of the humanoid servos and structure, respectively; iii) the dynamics modeling and simulation of the humanoid robot using the SimMechanics and Virtual Reality Toolbox; iv) the deduction of the equations of motion for an underactuated n-link inverted pendulum. The main objective of the Humanoid Robotics Laboratory, for the time being, is to develop a humanoid robot able to make complex motions like walking, running and jumping through real-time feedback control techniques. This dissertation presents a LQR controller for the simulation and control of the humanoid robot doing the handstand on a high bar, by considering it as an underactuated 3-link inverted pendulum.


CM5-Servo Communication Protocol

Servos are wiling to receive/send package information from/to the CM5 (Main Controller). Therefore, data instructions are sent to the servos and status packets are received from them.


Instruction packet
In order to give to a specific servo a specific command, an instruction packet is transmitted to the servo with the following structure:



  1. The first two bytes (0xFF 0xFF) means that a new instruction is going to be sent.
  2. The third byte says which servo will receive the instruction. When the ID of the servo is set to 0xFE, then the instruction is sent to all servos.
  3. The fourth byte represents the length of the instruction packet, i.e. the number of bytes of the packet length without counting the first three bytes.
  4. The fifth byte represents the instruction that the servo should execute. These can be: 0x01 Ping: Used for obtaining a status packet.
    0x02 Read Data: Used to read values of one servo, such as its current position.
    0x03 Write Data: Similar to Read Date, but used to write instead (e.g. send a new goal position).
    0x04 Reg Write: Similar to Write Data, but stays in standby mode until the Action instruction is given.
    0x05 Action: Triggers the action registered by the Reg Write instruction.
    0x06 Reset: Reset all the parameters of the servos to its original values.
    0x83 Sync Action: Used for control servos at the same time.
  5. The sixth byte stands for values to be sent along with the instruction (e.g. the value of the goal position).
  6. The last byte gives the checksum of the packet.

Status packet

After sending an instruction packet a status packet is sent back to the main controller (CM5)


The status packet is similar to the instruction packet, with the difference of having a byte error instead of the instruction command. When the error byte is 0x00, then the instruction packet went well, otherwise one or more errors occurred (table 2.1).


Read and write instructions
Read and write commands are defined as parameters in the instruction packet and they are different depending they are sending or requesting an information.

When writing information to a servo, the first parameter byte stands for the command that the servo should undertake (e.g., Goal Position is 0x1E, and Moving Speed is 0x20). The remained of the parameter bytes represent the value of the command.

Reading data is similar to writing, but the parameters bytes are always two, where the secon byte tells the number of bytes to be read from the first parameter byte.


Endless turn mode
Endless turn mode, e.g. the servo behaves like a continuous rotating wheel, can be set by turn CW and CCW to zero.

Goal Position
The servos have 10 bit resolution in terms of position corresponding to 300º. However exists an invalid zone that the servo can not reach. When the servo is set to endless turn mode, the sensor is not able to read the position of the invalid zone. At 150º, the servos are in its middle position.

For instance, the physical configurations of both Humanoids in the studied configurations in the next figure, have all the servos
in that position.



Moving speed
Moving speed can be set in 1024 increments.

Present position
Reads the actual position of a servo (10 bits resolution for 300º).

Present speed
Reads the actual speed of a servo (10 bits resolution). No information about the units used.

Present load
Reads the actual DC current consumed by the servo (9 bits resolution with 10th being the load direction). No information about the units used.

Present voltage
Reads the actual Voltage of the battery (8 bits resolution or 0.1 Volts resolution).

Present temperature
Reads the actual Temperature of the servo (8 bits resolution or 1º Celsius resolution).



©2008-2011 Humanoid Robot Lab