Bioloid Control

Scripting language

The scripting language offers complete control of the robot. For example, you can read sensor data and execute point-to-point motions (in cartesian and joint space).

The following example demonstrates how the custom-built hexapod can swing multiple (max) times from left to right and right to left (ldx millimeters):

script("scripts/hex_stand.s"); lx = 130; ry = 150; rz = 80; ldy = 0; ldz = 55; rdy = 0; rdz = 55; v = -10; t = 1000; t2 = 1200; max = 3; ldx = -60; rdx = -60; while (max > 0) do max = max - 1; ldx = -ldx; rdx = -rdx; sync moveto(1, lx+ldx, ly+ldy, lz+ldz+v, t); moveto(2, lx+ldx, 0+ldy, lz+ldz, t); moveto(3, lx+ldx, -ly+ldy, lz+ldz, t); moveto(4, rx+rdx, ly+rdy, rz+rdz+v, t); moveto(5, rx+rdx, 0+rdy, rz+rdz, t); moveto(6, rx+rdx, -ly+rdy, rz+rdz, t); endsync; sleep(t2); endwhile; script("scripts/hex_stand.s");

Command List

The following commands are supported:

Add new Commands

The parser for the scripting language is created with lexx and bison (yacc).

The lexx syntax file is /parser/parser.l.
The yacc syntax file is /parser/parser.y.

You need a version of lexx and bison to compile the parser. Since Win32 version of these program are hard to find they are included in the repository.

Compilation of the parser: