MARIE SVN Trunk aaplayer
From MARIEWiki
Contents |
Version
0.5
Description
The adapter establishes the communication with a Player server and gives acces to robot sensors and actuators using Player C++ client base interfaces.
See the project website for more information.

Requirements
- You must have Player 1.6.5 installed before compiling the Player Application Adapter.
See Install instructions.
Inputs/Outputs
Actually, aaplayer sends the laser, odometry, sonar, bumper, infrared, gripper, power and fiducial data, and accepts the motor and gripper commands. Each inputs or outputs can be turned on and off in the configuration file by having declared or not their corresponding port.
Output data are read from Player server and sent at a configurable frequency.
Input data are forwarded at Player server as soon as they are received.
Security Watchdog Timer
This functionality allows to automatically sends a stop motor command to Player server when no motor command have been received for a certain amount of time.
Configuration
Note : see Configuration Description Language for syntax details.
# C player
# Q server
# KV hostname
# KV portnumber
o KV frequency
o KV watchdogTimerDelay
o Q inputs
o T port (type = Default, name = motor)
o T port (type = Default, name = gripperCmd)
o Q outputs
o T port (type = Default, name = laser)
o T port (type = Default, name = odometry)
o T port (type = Default, name = sonar)
o T port (type = Default, name = bumper)
o T port (type = Default, name = ir)
o T port (type = Default, name = gripper)
o T port (type = Default, name = power)
o T port (type = Default, name = fiducial)
- hostname : Player server hostname
- portnumber : Player server portnumber
- frequency : Read from Player server and output data frequency (Hz) (default = 10 Hz)
- watchdogTimerDelay : Motor security watchdog timer delay (ms). 0 disables timer. (default = 1000 ms)
- motor input port : port receiving CommandMotor
- gripperCmd input port : port receiving CommandGripper
- laser output port : port sending DataLaser
- odometry output port : port sending DataOdometry
- sonar output port : port sending DataSonar
- bumper output port : port sending DataBumper
- ir output port : port sending DataIR
- gripper output port : port sending DataGripper
- power output port : port sending DataPower
- fiducial output port : port sending DataList of Data2DPoint correponding to the 2D position of fiducial items
See available Ports for port configuration details.
Usage
usage : aaplayer -n component_name [-t component_type] [-d director_port_number] [-c configurator_port_number]
-n #Specify component's name
-t #Specify component's control type :
# DEFAULT - use when controlled by appman Application Manager (default)
# MPI - use when controlled by ammpi Application Manager
-d #Specify director server socket port number (mandatory in DEFAULT component's control type)
-c #Specify configurator server socket port number (mandatory in DEFAULT component's control type)
The adapter will establish the communication with the Player server and read data from it at initialization. When started, the adapter will forward inputs data to Player server and send outputs data.
Executing aaplayer in project
This section shows how to use aaplayer in a Project..
In .setup file, add the following processes :
Stage, Gazebo or other Player server
A Player server must be started before using aaplayer. To have Application Manager starts the process, add the process with the expected parameters before the aaplayer process.
Here's an example of a Stage process to be launched :
# T process
# KV name = Stage
# KV type = None
# KV executableName = player
# Q args
# KV configFile
- name : Specify a reference name for the process
- type : Specify component's control type
- executableName : Specify the executable name
- configFile : Specify path to Player's .cfg configuration file
aaplayer
# T process # KV name # KV type = MARIE:MPI # KV executableName = aaplayer # KV configFile
- name : Specify a reference name for the process
- type : Specify component's control type
- executableName : Specify the executable name
- configFile : Specify path to aaplayer configuration file (see Configuration)
Executing aaplayer with appman [deprecated]
This section shows how to use aaplayer with appman Application Manager from a terminal script.
Start Player server
A Player server must be started before using aaplayer. To have appman starts the process, add the process with the expected parameters before the aaplayer process.
Here's an example of a Stage process to be launched :
player path_to_player_cfg_file (.cfg) sleep 4 # Sleep time (plateform specific)
Player server can take couple of seconds to boot, configure and initialize before being ready. Delays are required and must be adjusted depending on the running platform.
Start component
aaplayer -n component_name -t MARIE -d director_port_number -c configurator_port_number sleep 4 # Sleep time (plateform specific) appman -p configurator_port_number -c sxml:PathToConfigFile sleep 1 # Sleep time (plateform specific) appman -p director_port_number -c init sleep 1 # Sleep time (plateform specific) appman -p director_port_number -c start
Component can take couple of seconds to boot, configure and initialize before being ready to receive requests on director and configurator ports. Delays are required and must be adjusted depending on the running platform.
Stop component
appman -p director_port_number -c stop sleep 1 # Sleep time (plateform specific)
Component can take couple of seconds to stop before being ready to receive requests on director and configurator ports. Delay is required and must be adjusted depending on the running platform.
Quit component
appman -p director_port_number -c quit
Authors
- Yannick Brosseau
- Carle Cote
Contributors
- Clement Raievsky
License
MARIE - Mobile and Autonomous Robotics Integration Environment Copyright (C) 2004-2006 Yannick Brosseau, Carle Cote
This library and its documentation are free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library and documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You can contact MARIE development team at http://marie.sourceforge.net.

