Try this first command in your telnet session :
sensor = new Sensor(100); [00000124] 0.000000
If not already done, this line create the UObject linked to your real AX-S1 dynamixel with ID 100, change this value to fit your configuration.
sensor.irC; [00000476] 0.000000
The first line asks for the value of the center IR emitter. The second is
the answer from the bioloid engine. The first integer value is a timestamp
for the answer (in miliseconds from the engine startup). It is followed
by a tag. Please refer to the
URBI
tutorial for more details. What is important here is the floating
point value ending the line. It is the value stored in the front IR
emitter. Here 0.000000 indicates nothing is in front
of the robot. With your hand right in front of the robot, you should
get a value close to 255.000000.
Please note that the next commands will be enclosed in
+end:{...};. This is to make the engine warn you when
the command comes to an end.
Try the following :
+end:{motor__1.speed = 100; sleep (2s) | motor__1.speed = 0;};
[00002622] *** end
Your robot should have the 1st motor rotating for 2 second, and then stop. Now try to make it come back to its initial position with a similar command.
Next try :
+end:{motor__1.speed = -100; sleep (2s) | motor__1.speed = 0;};
[00005095] *** end
Your motor should come back to its original position.
The last simple command will be :
sensor on; irCDetect:at (sensor.irC > 100) echo "Front obstacle : " + sensor.irC;
Now try to put your hand close to the front of your bioloid AX-S1 module. You should get a message like :
[00008215] *** Front obstacle : 230
The at keyword allows you to detect events and make
your bioloid act accordingly.
The bioloid interface is close to the one specified in the manual of the AX-12 and of the AX-S1. Type "myMotor; mySensor;" in a connection (where myMotor is an instanciated Motor, and mySensor a Sensor) to get the full list of their attributes.
You should now be able to play with the bioloid URBI engine. The next chapters will give you complete details about the engine, but what we saw here is enough to get used with the bioloid and URBI.