ArmarX User CLI

ArmarX provides a python tool for conveniently performing everyday situations with ArmarX like starting the Ice runtime environment or deploying to a remote host.

The ArmarX python tools are located in the Core build directory and in the python-armarx deb package. To retrieve the list of all commands with short explanations start the tools with the -h parameter or to retrieve all the parameters for a command type armarx $command -h

Location of the user cli tool:
${ArmarXHome}/ArmarXCore/build/bin/armarx

gui command

Use the following command to start an ArmarXGui from anywhere:

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

memory command

Use the following command to start/stop the MongoDB database from anywhere:

${ArmarXHome}/ArmarXCore/build/bin/armarx memory start
${ArmarXHome}/ArmarXCore/build/bin/armarx memory stop

start command

Use the following command to start Ice locally:

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

stop command

Use the following command to stop Ice:

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

reset command

Use the following command to stop Ice, clean the Ice database, start Ice locally:

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

killIce command

Use the following command to kill a non-responsive IceGrid started via 'armarx start' :

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

scenario command

ArmarX scenarios are an easy way to start many applications, with specific configurations, together. Each ArmarX package has a scenario folder, where scenarios are located. The scenario configuration files have an .scx ending.

The ArmarX CLI has the functionality to start/stop/kill these scenarios. Changing of specific Application parameter should be done with the ScenarioManager GUI Tool.

The CLI tool can be used by only specifying Scenario names, but the package the scenario resides in must be defined in ~/.armarx/default.cfg in the ArmarX.DefaultPackages parameter. If this is not the case, you should use a specific path to the scx file or the folder it is located in.

List all Scenarios

Lists all known Scenarios out of Packages that are defined in the ~/.armarx/default.cfg

\code
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario list
\endcode

Get the Status of an Scenario

Get the Status of a Scenario with a known Scenario name or with a path to the Scenario scx file

\code
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario status $scenarioName
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario status $pathToScx
\endcode

Deploy an Scenario via Ice

Deploying a Scenario with an known Scenario name or with a path to the Scenario scx file

\code
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario deploy $scenarioName
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario deploy $pathToScx
\endcode

If you want to deploy the Scenario remotely append –remote Make sure you had a look at the Ice Deployment Tutorial before using the remote option

Start an Scenario

Starting a Scenario with an known Scenario name or with a path to the Scenario scx file

\code
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario start $scenarioName
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario start $pathToScx
\endcode

Stop an Scenario

Stopping a Scenario with an known Scenario name or with a path to the Scenario scx file. Stopping only tries to stop the Scenario. If an Applications blocks it might still be running.

Use Kill an Scenario to be sure that the Applications stop.

\code
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario stop $scenarioName
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario stop $pathToScx
\endcode

Kill an Scenario

Kills a Scenario with a known Scenario name or with a path to the Scenario scx file.

\code
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario kill $scenarioName
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario kill $pathToScx
\endcode

Remove an deployed Scenario via Ice

Removing a Scenario with an known Scenario name or with a path to the Scenario scx file

\code
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario remove $scenarioName
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario remove $pathToScx
\endcode

Restart an Scenario

Restarts a Scenario with a known Scenario name or with a path to the Scenario scx file. The named Scenario by default gets killed and startet. If you want to make sure your Application has enough time for his cleanup you should call stop and start yourself.

\code
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario restart $scenarioName
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario restart $pathToScx
\endcode

Generate Deprecated Ice Deployment files

Warning
This is only for utilty. It is strongly adviced to use the deploy/remove commands of this CLI or the ScenarioManagerGUI

Generate the old *.icegrid.xml files for deployment with a known Scenario name or with a path to the Scenario scx file.

\code
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario generate $scenarioName
    ${ArmarXHome}/ArmarXCore/build/bin/armarx scenario generate $pathToScx
\endcode

ArmarX CLI Profiles

ArmarX provides a mechanism to support interaction with multiple independent IceGrid/ArmarX configurations. The profile mechanism is integrated into the armarx CLI tool located in the build binary directory of the ArmarXCore (e.g. ${ArmarXHome}/ArmarXCore/build/bin/armarx).

What files does a profile consist of?

An ArmarX profile consists of the following files

  • default.cfg [Properties read by all ArmarX applications]
  • icegrid-sync-variables.icegrid.xml [Contains properties required for syncing and deploying ArmarX applications on a remote IceGrid]
  • optional: armarx-sync.ini [contains commandline flags which are automatically used by the armarx sync cli command]

These files are located in $HOME/.armarx/profiles/$PROFILE_NAME/ and symlinked to $HOME/.armarx/ during profile switching.

The name of the currenlty active profile is stored in the file $HOME/.armarx/armarx.ini

Show current configuration files

Listing the contents of the currently active configuration files and all available configurations

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

Listing Profiles

Listing all available configurations (2 possibilities)

 ${ArmarXHome}/ArmarXCore/build/bin/armarx profile
 ${ArmarXHome}/ArmarXCore/build/bin/armarx switch

Switching Profiles

Switching to a different profile (non-existing profiles get created on the fly):

 ${ArmarXHome}/ArmarXCore/build/bin/armarx switch $profilename