Deploying ArmarX Scenarios

Deploying an ArmarX scenario means that IceGrid takes care of starting/stopping/restarting ArmarX executables.

Note
For deployment to work, a fully operational IceGrid setup is required.

Before ArmarX scenarios can be deployed, the related ArmarX packages must be synchronized to the remote PCs running IceGrid nodes first. Synchronization is performed with the sync command of the ArmarX developer cli and currently works only with ArmarX packages compiled from sources.

In general it is a good idea to create an ArmarX cli profile for each robot/IceGrid setup, so you can easily switch between them.

Before deploying any scenario, the base directory of the synchronized ArmarX packages on the remote hosts must be specified in the file icegrid-sync-variables.icegrid.xml (available in every ArmarX CLI profile).

Note
This means that all remote PCs must have an identical user and remote sync directory.

Scenario configuration files

Configuration files for the single ArmarX executables are generated in ${PackageName}/scenarios/${ScenarioName}/icegrid/${ExecutableName}.icegrid.xml. Additionally, two types of scenario deployment files are generated by the build process:

  • ${PackageName}/scenarios/${ScenarioName}/${ScenarioName}.remote.icegrid.xml: use this for remote deployment
  • ${PackageName}/scenarios/${ScenarioName}/${ScenarioName}.icegrid.xml: use this for deployment on an IceGrid instance running on localhost

The typical structure of these files is the following:

<icegrid>
    <application>
    <!-- some other IceGrid related tags found here -->

        <!-- include directories for component executables -->
        <node name="NodeMain">
            <include file="icegrid/ExampleUnitObserver.icegrid.xml"/>
            <include file="icegrid/ExampleUnitApp.icegrid.xml"/>
        </node>
    </application>
</icegrid>

If specific executables should be started on a different IceGrid node, a new node tag can be introduced like this (valid node names can be retrieved with armarx list):

<icegrid>
    <application>
    <!-- some other IceGrid related tags found here -->

        <!-- include directories for component executables -->
        <node name="NodeMain">
            <include file="icegrid/ExampleUnitObserver.icegrid.xml"/>
        </node>
        <node name="Node1">
            <include file="icegrid/ExampleUnitApp.icegrid.xml"/>
        </node>
    </application>
</icegrid>

deploy command

Use the following command to deploy an ArmarX scenario to remote IceGrid instances:

${ArmarXHome}/ArmarXCore/build/bin/armarx deploy path-to-scenario.icegrid.xml

remove command

Use the following command to remove a scenario from a running IceGrid instance (use the list command get a list of running applications):

${ArmarXHome}/ArmarXCore/build/bin/armarx remove @scenarioName

list command

Use the following command to list all scenarios running on an IceGrid instance:

${ArmarXHome}/ArmarXCore/build/bin/armarx list

status command

Use the following command to show the current IceGrid status:

${ArmarXHome}/ArmarXCore/build/bin/armarx status

The output will show the currently active IceGrid registry, the currently active IceGrid nodes and the executables they are managing, as well as the scenarios and all associated executables.

kill command

Use the following command to kill a deployed ArmarX application:

${ArmarXHome}/ArmarXCore/build/bin/armarx kill $applicationname
Note
With the default IceGrid config the application will be restarted instantly again.