The above examples set the value of the device as fast as the hardware of the robot allows it. Of course, you might want to do more complicated things like reaching a value in a given time (in milliseconds):
headPan = 30 time:3000;
Which will reach the value 30 (degrees) in 3000ms. Whenever you need to express a time value in URBI, you can explicitly use units like this:
headPan = 30 time:3s; headPan = 30 time:3000ms; headPan = 30 time:3m; headPan = 30 time:3h26m15s;
You can assemble days (d), hours (h), minutes (m), seconds (s) and milliseconds (ms), with decimal values. By default the unit is milliseconds if no unit is specified or when a variable expression is used.
Alternatively, you can also set the speed used to reach the value, expressed in unit/s:
headPan = 30 speed:1.4;
Or the acceleration (expressed in unit/s²):
headPan = 30 accel:0.4;
One very useful way of assigning a variable with a dynamic profile is to use a sinusoidal oscillation:
headPan = 30 sin:2s ampli:20,
This will make the headPan device oscillate around 30 degrees with an amplitude of 20 degrees and a period of 2s. Note that the command ends with a comma and not a semicolon. We will explain why later, but the reason is that the sinusoidal assignment never terminates and the comma sort of "puts it in background" to allow other commands coming after it to be executed. Otherwise, with a semicolon, nothing coming after this sinusoidal assignment could be executed since the command never ends. This is a common mistake by beginners using URBI.
time, speed or sin are called modifiers. Many other modifiers are available like phase, getphase or smooth. Check the URBI Language Specification for a comprehensive description of modifiers, or just play with them to see what they do.
One particularly powerful modifier is function which assigns an arbitrarily complex function of time as the variable trajectory. This is described in the URBI Language Specification and will only be available in servers with kernel 2.0 or above.