Trajectory generators

The trajectory generators change the value of a given variable from an initial value to a target value. They can be open-loop, i.e., the intermediate values depend only on the initial and/or target value of the variable; or closed-loop, i.e., the intermediate values also depend on the current value value of the variable.

Open-loop trajectories are insensitive to changes made elsewhere to the variable. Closed-loop trajectories are sensitive to changes made elsewhere to the variable — for instance when the human physically changes the position of a robot’s motor.

urbi traj

// The Smooth trajectory implements a sigmoid. It changes the variable from its current value to the target value smoothly in a given amount of time (smooth attribute).
var y = 0;
{
    sleep(0.5s);
   y = 100 smooth:3s,
},
// The Sin trajectory implements a sine around the target value, given an amplitude (ampli attribute) and period (sin attribute).
var y = 0;
y = 0 sin:2s ampli:10,
// The Time trajectory changes the value of the variable from its current value to the target value within a given duration (the time attribute).
var y = 0;
assign: y = 20 time:3s,
{
   sleep(2s);
   y = 30;
},

More examples you can find in the URBI documentation LINK.

 

 

EMYS and FLASH are Open Source and distributed according to the GPL v2.0 © Rev. 0.9.1, 15.05.2017

FLASH Documentation