|
Deploying an ArmarX scenario means that IceGrid takes care of starting/stopping/restarting ArmarX executables.
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).
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:
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>
Use the following command to deploy an ArmarX scenario to remote IceGrid instances:
${ArmarXHome}/ArmarXCore/build/bin/armarx deploy path-to-scenario.icegrid.xml
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
Use the following command to list all scenarios running on an IceGrid instance:
${ArmarXHome}/ArmarXCore/build/bin/armarx list
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.
Use the following command to kill a deployed ArmarX application:
${ArmarXHome}/ArmarXCore/build/bin/armarx kill $applicationname