Classes

class  XMLStateComponent
 

Detailed Description

This component is the managing component for XML statechart groups offered with XMLRemoteStateOfferer. This component is used in the application XMLRemoteStateOfferer. It loads a statechart group from a XML file (defined in property XMLStatechartGroupDefinitionFile) and offers all contained public states via the XMLRemoteStateOfferer. The XMLRemoteStateOfferer is the remote interface to all public states of a statechart group.

Configuration:

Two properties of the XMLStateComponent are essential: XMLStatechartGroupDefinitionFile and XMLStatechartProfile.
XMLStatechartGroupDefinitionFile is a required property and defines which statechart group (*.scgxml) is to be loaded. All public states will be available after start up for remote access. XMLStatechartProfile is an optional property which defines which configuration profile a statechart group should be used. This is usually a robot specific profile like Armar3Simulation. This profile contains two types of information:

Both types of information are stored in the statechart xml files and specified in the Statechart Editor.

Auto entering of states:

The property StatesToEnter specifies which public states are entered automatically on start up of the XMLComponent. These must not require any input parameters. It is also possible to specify multiple states by a comma-seperated list, which then will be run in parallel. (Though, event processing is not parallel.)

Configuration of a multi robot statechart setup:

It is easily possible to configure a statechart setup for multiple robots. You can just start multiple XMLStateComponent apps, choose a different profile for each app and a unique name for each of the XMLStateComponents (property ArmarX.XMLStateComponent.objectName).

An example could look like this:

config1.cfg:
ArmarX.XMLStateComponent.XMLStatechartGroupDefinitionFile = RobotSkillTemplates/statecharts/BringObjectGroup/BringObjectGroup.scgxml
ArmarX.XMLStateComponent.ObjectName = "XMLStateComponentBringObjectGroupArmar3a"
ArmarX.XMLStateComponent.XMLStatechartProfile=Armar3a

config2.cfg:
ArmarX.XMLStateComponent.XMLStatechartGroupDefinitionFile = RobotSkillTemplates/statecharts/BringObjectGroup/BringObjectGroup.scgxml
ArmarX.XMLStateComponent.ObjectName = "XMLStateComponentBringObjectGroupArmar3b"
ArmarX.XMLStateComponent.XMLStatechartProfile=Armar3b
Note
This does not work for usage of two robot with the same profile. Then the properties for the XMLRemoteStateOfferer need to be specified in the .cfg file as well.