Authors: Sten Gruener.
movemode() = full | position | difference | distance | speed
movevalue() = {float(), float()} | {float(), float(), float()} | float()
rotationmode() = degrees | speed
| destroy/0 | Destroys the initialized robot. |
| get_pid/0 | Extracts the cached pid in order to be used in low-level functions. |
| get_position/0 | Returns the current odometrical (inner rotation sensor) position of the robot. |
| init/2 | Shortest signature localhost and default port 6665 are used. |
| init/4 | A sorter signature allowing not to specify the nickname. |
| init/5 | This is the more rich signature of the init function allowing to specify both the hostname, ip and the port of the player server as well as the robot's nickname. |
| move/2 | The basic movement function. |
| results/1 | This function gets the results of selected device, for device list please consult the documentation of the dvh module. |
| rotate/2 | The basic rotation function. |
| set_option/2 | This function sets the options of the C driver. |
| start/0 | Starts the server. |
| stop/0 | stops a moving robot. |
destroy() -> ok | {error, atom()}
Destroys the initialized robot.
get_pid() -> pid() | {errot, atom}
Extracts the cached pid in order to be used in low-level functions. Should be only used if more functions are needed, then player module can provide.
get_position() -> {X, Y, A} | {error, atom()}
Returns the current odometrical (inner rotation sensor) position of the robot. This position is local (every robot starts at (0,0,0)) and with some measurement errors due to the nature of the sensors.
Note: A is in radiants, from 0 to 2*Pi.init(Driverpid::pid(), Id::integer()) -> ok | {error, atom()}
Shortest signature localhost and default port 6665 are used.
init(Driverpid::pid(), Hostname::string(), Port::integer(), Id::integer()) -> ok | {error, atom()}
A sorter signature allowing not to specify the nickname.
init(Driverpid::pid(), Hostname::string(), Port::integer(), Id::integer(), Nickname::string()) -> ok | {error, atom()}
This is the more rich signature of the init function allowing to specify both the hostname, ip and the port of the player server as well as the robot's nickname.
move(Type::movemode(), Value::movevalue()) -> ok | {error, atom}
The basic movement function. Supports a varriaty of arguments.
Arguments:
results(Device::atom()) -> {[float()], [float()]} | {error, atom}
This function gets the results of selected device, for device list please consult the documentation of the dvh module.
rotate(Type::rotationmode(), Value::float()) -> ok | {error, atom}
The basic rotation function. Allows to rotate for a certain amount of degrees or just with a certain speed. Positive value means mathematically positive rotation - counter clockwise. Rotating for degrees will block until robot stops.
set_option(Option::atom(), Value::any()) -> ok | {error, atom}
This function sets the options of the C driver.
start() -> pid() | {error, atom()}
Starts the server. Usually the first commant to run. Returns the pid to the server to allow communication to the driver.
stop() -> ok
stops a moving robot.
Generated by EDoc, Aug 13 2009, 23:20:23.