Movement functions

These first functions are used to make your robot move. Odometry support has still to be improved, so, if used in proper conditions, time based functions are more precise at the moment.

Odometry based

The functions func.rotateAngleOdo (angleNeeded, velocity) and func.moveStraightOdo (distance, velocity) make the robot move based on the odometry informations sent by the robot.

The func.rotateAngleOdo function makes the robot rotate on itself of a given angle, at a given speed.

The func.moveStraightOdo function makes the robot follow a straight line at a given speed on a given distance.

If speed is not 0, the robot moves. If not, it only waits for the odometry value to be the one expected.

As said previously, these functions may not be precise depending on how you use your URBI server. A server period of 100ms seems to give not so bad results.

Time based

The following functions func.rotateAngleTime (angle, radius, velocity, go) and function func.moveStraighTime (distance, velocity, go) make the robot move based on the theoretical time needed to complete a move.

Note that in this implementation, func.rotateAngleTime allows to set the rotation radius.

The go argument activate move. If 0 is given, the function return the time to wait in ms for the movement to complete. If not 0 is given, the robot effectively moves before the time beeing returned.

This implementation has proved to be more precise than the previous one. But please note that it is so only in good conditions, meaning external interaction with the wheels will not be taken into account.