|
ArmarX provides a python tool for ArmarX developer to conventiently build a package and all its depedencies. It provides further utility commands for fixing errors like locating a package and finding a c++ symbol.
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.
${ArmarXHome}/ArmarXCore/build/bin/armarx-dev
To run ArmarX programs it is necessary to compile several packages and their dependencies in the correct order. Although the normal C++ compiling procedure by calling cmake and make in the build directory works in ArmarX as well, it can be tedious.
Therefore ArmarX provides a tool, which can be used to build ArmarX packages including all its dependencies. The build tool is integrated into the armarx CLI tool located in the build binary directory of the ArmarXCore (e.g. ${ArmarXHome}/ArmarXCore/build/bin/armarx).
The following features are available at the moment:
To pull and compile for example the RobotAPI, enter the following line (for this to work ArmarXCore needs to be cmaked before):
${ArmarXHome}/ArmarXCore/build/bin/armarx-dev build RobotAPI --pull
Running the script without parameters shows the usage information with all available parameters. The location from which the script is executed, does not matter.
It is also possible to automatically build external dependencies, if the following criteria are met:
You specify the dependency in ~/.armarx/armarx.ini:
[Misc] dependencies = project_name1:dependency1,dependency2;project_name2:dependency3
For example:
[Misc] dependencies = RobotAPI:Simox
Now, Simox will be always be build before RobotAPI is build. These dependency will also be included in the exec
command.
With the exec
command it is possible to execute shell commands in a given package and all its dependencies. The dependencies can be skipped with the parameter --nd
. If the command contains spaces quotes must be used.
ArmarX provides a mechanism to synchronize an ArmarX package and all of its dependencies to remote PCs. Afterwards, ArmarX scenarios can be started remotely via IceGrid deployments (armarx deploy).
This command will install all mentioned ArmarX packages and all dependendent ArmarX packages into a local temporary directory and synchronize the contents of this directory to one or more remote hosts. Use the following command for synchronization:
${ArmarXHome}/ArmarXCore/build/bin/armarx-dev sync [parameters] package [package ...]
The most important parameters are:
Additional paramters are:
Commandline parameters can be stored in the file $HOME/.armarx/profiles/$PROFILE_NAME/armarx-sync.ini. Each commandline parameter is specified on a separate line in this file
--deployHosts=pc1,pc2 --no-delete
Use the following command to locate and ArmarX package and print some of its properties:
${ArmarXHome}/ArmarXCore/build/bin/armarx-dev locatePackage packagename
The result for RobotAPI might look like this:
$ armarx-dev locatePackage RobotAPI ArmarX Package <RobotAPI> PACKAGE_CONFIG_DIR : ['/home/waechter/armarx/RobotAPI/build'] PACKAGE_VERSION : ['0.9.1'] PROJECT_BASE_DIR : ['/home/waechter/armarx/RobotAPI'] BUILD_DIR : ['/home/waechter/armarx/RobotAPI/build'] INCLUDE_DIRS : ['/home/waechter/armarx/RobotAPI/source', '/home/waechter/armarx/RobotAPI/build/source'] LIBRARY_DIRS : ['/home/waechter/armarx/RobotAPI/build/lib'] LIBRARIES : ['RobotAPIInterfaces RobotAPICore RobotAPIWidgets RobotAPIUnits RobotAPIUnitListenerRelays DebugDrawer RobotAPIRobotStateComponent EarlyVisionGraph ViewSelection WeissHapticSensor XsensIMU LibIMU RobotAPIOperations WeissHapticGroup StatechartProfilesTestGroup KinematicUnitGuiPlugin HandUnitGuiPlugin PlatformUnitGuiPlugin SensorActorWidgetsGuiPlugin HapticUnitGuiPlugin RobotViewerGuiPlugin DebugDrawerViewerGuiPlugin ViewSelectionGuiPlugin'] CMAKE_DIR : ['/home/waechter/armarx/RobotAPI/etc/cmake'] BINARY_DIR : ['/home/waechter/armarx/RobotAPI/build/bin'] SCENARIOS_DIR : ['/home/waechter/armarx/RobotAPI/scenarios'] DATA_DIR : ['/home/waechter/armarx/RobotAPI/data'] EXECUTABLE : ['ForceTorqueObserverRun HeadIKUnitRun TCPControlUnitRun WeissHapticUnitAppRun HapticObserverAppRun RobotControlRun RobotControlUIRun KinematicUnitObserverRun KinematicUnitSimulationRun PlatformUnitSimulationRun PlatformUnitObserverRun RobotStateComponentRun HandUnitSimulationRun ForceTorqueUnitSimulationRun XsensIMUAppRun InertialMeasurementUnitObserverAppRun ViewSelectionAppRun'] INTERFACE_DIRS : ['/home/waechter/armarx/RobotAPI/source'] DEPENDENCIES : ['ArmarXCore', 'ArmarXGui'] SOURCE_PACKAGE_DEPENDENCIES : ['ArmarXCore', 'ArmarXGui'] PACKAGE_DEPENDENCY_PATHS : ['ArmarXCore:/home/waechter/armarx/ArmarXCore/build', 'ArmarXGui:/home/waechter/armarx/ArmarXGui/build']
Use the following command to find a symbol in any of the ArmarX packages by specifying the top level package. ArmarX dependency will automatically searched as well. This command is useful if you are facing undefined reference. Just pass the undefined reference to this command (or a part of it) and all package libs will be searched for it.
${ArmarXHome}/ArmarXCore/build/bin/armarx-dev findSymbol -p packagename -s symbolname
For example:
armarx findSymbol -p VisionX -s "memoryx::ObjectInstance::ObjectInstance("
The result output might look like this:
Ice Config: /home/waechter/.armarx/default.cfg Profile: default Searching for memoryx::ObjectInstance::ObjectInstance( Searching in the following projects: ['ArmarXCore', 'ArmarXGui', 'RobotAPI', 'MemoryX', 'VisionX'] Found 4 matching symbol(s) in package MemoryX in file /home/waechter/armarx/MemoryX/build/lib/libMemoryXMemoryTypes.so.0.6.0 #1: memoryx::ObjectInstance::ObjectInstance(memoryx::ObjectInstance const&) #2: memoryx::ObjectInstance::ObjectInstance(std::string const&, std::string const&) #3: memoryx::ObjectInstance::ObjectInstance(memoryx::ObjectInstance const&) #4: memoryx::ObjectInstance::ObjectInstance(std::string const&, std::string const&)