INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
Orca Configuration Files
This page describes everything you need to know about writing and using Orca config files. Sources, Priorities, and Order of LoadingConfiguration parameters can come from 5 different sources, in any combination. The possible sources are listed here in the order of decreasing generality and increasing priority (i.e. the later more specific sources overwrite the earlier more general ones). At runtime, the properties are loaded in reverse order so that the property values from more specific sources (e.g. from the command line) can specify the address of the more general sources (e.g. the location of the global config file). Despite the reverse loading order, the priorities are of course preserved.
File FormatOrca uses Ice utilities to parse configuration files. Therefore, we use the same format as the Ice configuration files. Config files are text files which list properties as key/value pairs. Each key/value pair is placed on a new line. Keys and values are strings which are separated by an equal sign ('='). The key strings are optionally devided into subfields with periods (aka dots, '.'). The value strings can represent strings, integers, or floats. Boolean variables are by convention stored as {0,1}. Comments are marked with '#'. For example: Parameter=1 Parameter.Subfield="orca" # This line is ignored Parameter.Subfield.Whatever=123.4 For more information on Ice properties and configuration files, see chapter "Ice Properties and Configuration" of the Ice manual. Writing Configuration FilesThe configuration files are viewed slightly differently by the component user and the component developer. From the User's PerspectiveTypically, an Orca component has a definition file (file extention To use a $ mkdir -p ~/sys/mysystem; cd ~/sys/mysystem $ cp [ORCA-INSTALL-DIR]/cfg/somecomponent.cfg . $ vi somecomponent.cfg $ somecomponent somecomponent.cfg From the Developer's PerspectiveOrca configuration files (file extention The configuration file
The hand-written UsageConfiguration files have two uses: Connecting ComponentsFirst, we look at a component with provided interfaces (acting as a server). COMP_TAG.Platform=p1 COMP_TAG.Component=c1 COMP_TAG.Endpoints=e1 # Provided interfaces COMP_TAG.Provides.IFACE_TAG1.Name=i1 COMP_TAG.Provides.IFACE_TAG2.Name=i2 ... The fragment above contains two kinds of tags: COMP_TAG (string)
IFACE_TAG (string)
Now we go through the keys of the fragment (the text on the left of the "=" sign): COMP_TAG.Platform (string)
COMP_TAG.Component (string)
COMP_TAG.Endpoints (string)
COMP_TAG.Provides.IFACE_TAG.Name (string)
Orca defines the following naming rules: fully-qualified component name
fully-qualified interface name
fully-qualified interface address
Now lets look at configuring the second component which will connect to the first. COMP_TAG.Platform=p2 COMP_TAG.Component=c2 # Required interfaces # Direct binding by specifying the address (endpoint) COMP_TAG.Requires.IFACE_TAG1.Proxy=i1:e1 # Indirect binding by looking up the address through the Registry COMP_TAG.Requires.IFACE_TAG2.Proxy=i2@p1/c1 ... As you can see, there are two options for connecting interfaces:
Of course, the same component may have provided and required interfaces. The order of declaring interfaces is not important. Here's a complete example for a component which has provided and required interfaces. LocalNav.Platform=local LocalNav.Component=localnav # Provided Interfaces LocalNav.Provides.PathFollower2d.Name=pathfollower2d # Required Interfaces LocalNav.Requires.Localisation.Proxy=localise2d@local/faithlocaliser LocalNav.Requires.Odometry2d.Proxy=odometry2d@local/robot2d With COMP_TAG=LocalNav and component endpoints set to default. Provided interfaces: IFACE_TAG=PathFollower2d. Required interfaces: IFACE_TAG1=Localisation, IFACE_TAG2=Odometry2d. Specifying Component's Internal Configuration ParametersComponents' internal behaviour usually needs to be configured at run time by setting certain parameters. The following syntax is used: COMP_TAG.Config.SET_TAG1.PARAM_TAG1=0.1 COMP_TAG.Config.SET_TAG1.PARAM_TAG2=1 ... COMP_TAG.Config.SET_TAG2.PARAM_TAG3=left ... The code looks up the value of the parameter by its full key, e.g. COMP_TAG.Config.SET_TAG1.PARAM_TAG1. Repeated keys are allowed, the later values replacing earlier ones. String used for set and parameter tags are arbitrary. Parameter sets and the depth of the hierarchy are completely optional. The code can contain hard-coded default values in case the config file omits them or leaves the value empty. The auto-generated config files should contain all parameters listed with the corresponding default values. The defaults should also be specified in component's documentation. Example: LocalNav.Config.TestMode=0 LocalNav.Config.Test.BatchMode=0 LocalNav.Config.Test.NumWaypoints=10 LocalNav.Config.Vfh.AbsoluteMaxTurnrate=60 LocalNav.Config.Vfh.CellSize=0.1 For More Information.Follow the steps of Quick-Start Guide. After you get the two components to communicate, you can examine the configuration files to see how connections are specified. |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)