From b7442a55d4042e0f68017e3afd7271d3d7b39ac8 Mon Sep 17 00:00:00 2001 From: Cedric Seehausen <usdnr@student.kit.edu> Date: Tue, 17 May 2016 10:43:55 +0200 Subject: [PATCH] improved XmlScenarioParserTest + iceparser fixxes + Rewrote AppInstance to use boost instead of Qt --- .../cfgs/DebugObserver.untouched.cfg | 84 ++++ ...ProviderDynamicSimulationApp.untouched.cfg | 286 ++++++++++++ .../cfgs/HeadIKUnit.untouched.cfg | 91 ++++ .../xmlCache/ArmarXCore.DebugObserver.xml | 200 ++++++++ ...DepthImageProviderDynamicSimulationApp.xml | 439 ++++++++++++++++++ .../xmlCache/RobotAPI.HeadIKUnit.xml | 261 +++++++++++ .../data_structure/ApplicationInstance.cpp | 13 +- .../data_structure/ApplicationInstance.h | 5 + .../ScenarioManager/executor/LinuxStarter.cpp | 2 +- .../gui/detailedapplicationview.cpp | 2 +- .../ScenarioManager/parser/PackageBuilder.cpp | 2 +- .../ScenarioManager/parser/iceparser.cpp | 49 +- .../test/XMLScenarioParserTest.cpp | 243 ++++++++-- 13 files changed, 1589 insertions(+), 88 deletions(-) create mode 100644 data/ArmarXGui/ScenarioManagerTestData/cfgs/DebugObserver.untouched.cfg create mode 100644 data/ArmarXGui/ScenarioManagerTestData/cfgs/DepthImageProviderDynamicSimulationApp.untouched.cfg create mode 100644 data/ArmarXGui/ScenarioManagerTestData/cfgs/HeadIKUnit.untouched.cfg create mode 100644 data/ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXCore.DebugObserver.xml create mode 100644 data/ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXSimulation.DepthImageProviderDynamicSimulationApp.xml create mode 100644 data/ArmarXGui/ScenarioManagerTestData/xmlCache/RobotAPI.HeadIKUnit.xml diff --git a/data/ArmarXGui/ScenarioManagerTestData/cfgs/DebugObserver.untouched.cfg b/data/ArmarXGui/ScenarioManagerTestData/cfgs/DebugObserver.untouched.cfg new file mode 100644 index 00000000..1806791a --- /dev/null +++ b/data/ArmarXGui/ScenarioManagerTestData/cfgs/DebugObserver.untouched.cfg @@ -0,0 +1,84 @@ +# ================================================================== +# ArmarX properties +# ================================================================== + +# ArmarX.CachePath: Path for cache files +# Attributes: +# - Default: ${HOME}/.armarx/mongo/.cache +# - Case sensitivity: no +# - Required: no +# ArmarX.CachePath = ${HOME}/.armarx/mongo/.cache + + +# ArmarX.DataPath: Semicolon-separated search list for data files +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.DataPath = "" + + +# ArmarX.Verbosity: Global logging level for whole application +# Attributes: +# - Default: Verbose +# - Case sensitivity: no +# - Required: no +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.Verbosity = Verbose + + +# ArmarX.DisableLogging: Turn logging off in whole application +# Attributes: +# - Default: 0 +# - Case sensitivity: no +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.DisableLogging = 0 + + +# ArmarX.ApplicationName: Application name +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.ApplicationName = "" + + +# ArmarX.DatapathConfig: Path to the (usually generated) config file containing all data paths of all dependent projects. This property usually does not need to be edited. +# Attributes: +# - Default: ./config/datapath.cfg +# - Case sensitivity: no +# - Required: no +# ArmarX.DatapathConfig = ./config/datapath.cfg + + +# ArmarX.Config: Comma-separated list of configuration files +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.Config = "" + + +# ================================================================== +# ArmarX.DebugObserver properties +# ================================================================== + +# ArmarX.DebugObserver.MinimumLoggingLevel: Local logging level only for this component +# Attributes: +# - Default: Undefined +# - Case sensitivity: no +# - Required: no +# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} +# ArmarX.DebugObserver.MinimumLoggingLevel = Undefined + + +# ArmarX.DebugObserver.ObjectName: Name of IceGrid well-known object +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.DebugObserver.ObjectName = "" + + + diff --git a/data/ArmarXGui/ScenarioManagerTestData/cfgs/DepthImageProviderDynamicSimulationApp.untouched.cfg b/data/ArmarXGui/ScenarioManagerTestData/cfgs/DepthImageProviderDynamicSimulationApp.untouched.cfg new file mode 100644 index 00000000..a81b702b --- /dev/null +++ b/data/ArmarXGui/ScenarioManagerTestData/cfgs/DepthImageProviderDynamicSimulationApp.untouched.cfg @@ -0,0 +1,286 @@ +# ================================================================== +# ArmarX properties +# ================================================================== + +# ArmarX.EnableProfiling: Enable profiling of CPU load produced by this application +# Attributes: +# - Default: 0 +# - Case sensitivity: no +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.EnableProfiling = 0 + + +# ArmarX.DataPath: Semicolon-separated search list for data files +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.DataPath = "" + + +# ArmarX.Verbosity: Global logging level for whole application +# Attributes: +# - Default: Verbose +# - Case sensitivity: no +# - Required: no +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.Verbosity = Verbose + + +# ArmarX.DisableLogging: Turn logging off in whole application +# Attributes: +# - Default: 0 +# - Case sensitivity: no +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.DisableLogging = 0 + + +# ArmarX.CachePath: Path for cache files +# Attributes: +# - Default: ${HOME}/.armarx/mongo/.cache +# - Case sensitivity: no +# - Required: no +# ArmarX.CachePath = ${HOME}/.armarx/mongo/.cache + + +# ArmarX.ApplicationName: Application name +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.ApplicationName = "" + + +# ArmarX.DefaultPackages: List of ArmarX packages which are accessible by default +# Attributes: +# - Default: ArmarXCore, ArmarXGui, MemoryX, RobotAPI, RobotComponents, RobotSkillTemplates, ArmarXSimulation, VisionX, SpeechX, Armar3, Armar4 +# - Case sensitivity: no +# - Required: no +# ArmarX.DefaultPackages = ArmarXCore, ArmarXGui, MemoryX, RobotAPI, RobotComponents, RobotSkillTemplates, ArmarXSimulation, VisionX, SpeechX, Armar3, Armar4 + + +# ArmarX.DependenciesConfig: Path to the (usually generated) config file containing all data paths of all dependent projects. This property usually does not need to be edited. +# Attributes: +# - Default: ./config/dependencies.cfg +# - Case sensitivity: no +# - Required: no +# ArmarX.DependenciesConfig = ./config/dependencies.cfg + + +# ArmarX.RedirectStdout: Redirect std::cout and std::cerr to ArmarXLog +# Attributes: +# - Default: 1 +# - Case sensitivity: no +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.RedirectStdout = 1 + + +# ArmarX.Config: Comma-separated list of configuration files +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.Config = "" + + +# ================================================================== +# ArmarX.DynamicSimulationDepthImageProvider properties +# ================================================================== + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipZLo: Skip points with z lower than this limit. +# Attributes: +# - Default: -25000 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipZLo = -25000 + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipYLo: Skip points with y lower than this limit. +# Attributes: +# - Default: -25000 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipYLo = -25000 + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipZHi: Skip points with z higher than this limit. +# Attributes: +# - Default: 25000 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipZHi = 25000 + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipPoints: Whether to clip the point cloud drawn to the given DebugDrawerTopic +# Attributes: +# - Default: 1 +# - Case sensitivity: no +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipPoints = 1 + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_PointSize: The size of a point. +# Attributes: +# - Default: 4 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_PointSize = 4 + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_DrawDelay: The time between updates of the drawn point cloud (in ms) +# Attributes: +# - Default: 1000 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_DrawDelay = 1000 + + +# ArmarX.DynamicSimulationDepthImageProvider.RobotName: The robot +# Attributes: +# - Default: Armar3 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.RobotName = Armar3 + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipXHi: Skip points with x higher than this limit. +# Attributes: +# - Default: 25000 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipXHi = 25000 + + +# ArmarX.DynamicSimulationDepthImageProvider.FOV: Vertical FOV in rad. +# Attributes: +# - Default: 0.785398185 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.FOV = 0.785398185 + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_PointSkip: Only draw every n'th point in x and y direction (n=DrawPointCloud_PointSkip). Increase this whenever the ice buffer size is to small to transmitt the cloud size. (>0) +# Attributes: +# - Default: 3 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_PointSkip = 3 + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipXLo: Skip points with x lower than this limit. +# Attributes: +# - Default: -25000 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipXLo = -25000 + + +# ArmarX.DynamicSimulationDepthImageProvider.RobotNodeCamera: The coordinate system of the used camera +# Attributes: +# - Default: DepthCameraSim +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.RobotNodeCamera = DepthCameraSim + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud: Whether the point cloud is drawn to the given DebugDrawerTopic +# Attributes: +# - Default: 0 +# - Case sensitivity: no +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud = 0 + + +# ArmarX.DynamicSimulationDepthImageProvider.DistanceZNear: Distance of the near clipping plain. (If set to small the agent's model's inside may be visible +# Attributes: +# - Default: 20 +# - Min: 1e-08 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DistanceZNear = 20 + + +# ArmarX.DynamicSimulationDepthImageProvider.ImageSize: Target resolution of the images. Captured images will be converted to this size. +# Attributes: +# - Default: 640x480 +# - Case sensitivity: no +# - Required: no +# - Possible values: {1024x768, 1280x960, 1600x1200, 320x240, 640x480, 768x576, 800x600, none} +# ArmarX.DynamicSimulationDepthImageProvider.ImageSize = 640x480 + + +# ArmarX.DynamicSimulationDepthImageProvider.EnableProfiling: enable profiler which is used for logging performance events +# Attributes: +# - Default: 0 +# - Case sensitivity: no +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.DynamicSimulationDepthImageProvider.EnableProfiling = 0 + + +# ArmarX.DynamicSimulationDepthImageProvider.MinimumLoggingLevel: Local logging level only for this component +# Attributes: +# - Default: Undefined +# - Case sensitivity: no +# - Required: no +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.DynamicSimulationDepthImageProvider.MinimumLoggingLevel = Undefined + + +# ArmarX.DynamicSimulationDepthImageProvider.FrameRate: Frames per second +# Attributes: +# - Default: 30 +# - Bounds: [0; 60] +# - Case sensitivity: no +# - Required: no +# - Format: \d+(.\d*)? +# ArmarX.DynamicSimulationDepthImageProvider.FrameRate = 30 + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipYHi: Skip points with y higher than this limit. +# Attributes: +# - Default: 25000 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipYHi = 25000 + + +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_DebugDrawerTopic: Name of the DebugDrawerTopic +# Attributes: +# - Default: DebugDrawerUpdates +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_DebugDrawerTopic = DebugDrawerUpdates + + +# ArmarX.DynamicSimulationDepthImageProvider.ObjectName: Name of IceGrid well-known object +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.ObjectName = "" + + +# ArmarX.DynamicSimulationDepthImageProvider.DistanceZFar: Distance of the far clipping plain. (DistanceZFar-DistanceZNear should be minimal, DistanceZFar > DistanceZNear) +# Attributes: +# - Default: 5000 +# - Min: 1e-08 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.DistanceZFar = 5000 + + +# ArmarX.DynamicSimulationDepthImageProvider.BaseLine: The value returned from getBaseline(). It has no other effect. +# Attributes: +# - Default: 0.075000003 +# - Case sensitivity: no +# - Required: no +# ArmarX.DynamicSimulationDepthImageProvider.BaseLine = 0.075000003 + + + diff --git a/data/ArmarXGui/ScenarioManagerTestData/cfgs/HeadIKUnit.untouched.cfg b/data/ArmarXGui/ScenarioManagerTestData/cfgs/HeadIKUnit.untouched.cfg new file mode 100644 index 00000000..8123d930 --- /dev/null +++ b/data/ArmarXGui/ScenarioManagerTestData/cfgs/HeadIKUnit.untouched.cfg @@ -0,0 +1,91 @@ +# ================================================================== +# ArmarX properties +# ================================================================== + +# ArmarX.CachePath: Path for cache files +# Attributes: +# - Default: ${HOME}/.armarx/mongo/.cache +# - Case sensitivity: no +# - Required: no +# ArmarX.CachePath = ${HOME}/.armarx/mongo/.cache + + +# ArmarX.DataPath: Semicolon-separated search list for data files +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.DataPath = "" + + +# ArmarX.Verbosity: Global logging level for whole application +# Attributes: +# - Default: Verbose +# - Case sensitivity: no +# - Required: no +# - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning} +# ArmarX.Verbosity = Verbose + + +# ArmarX.DisableLogging: Turn logging off in whole application +# Attributes: +# - Default: 0 +# - Case sensitivity: no +# - Required: no +# - Possible values: {0, 1, false, no, true, yes} +# ArmarX.DisableLogging = 0 + + +# ArmarX.ApplicationName: Application name +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.ApplicationName = "" + + +# ArmarX.Config: Comma-separated list of configuration files +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.Config = "" + + +# ================================================================== +# ArmarX.HeadIKUnit properties +# ================================================================== + +# ArmarX.HeadIKUnit.CycleTime: Cycle time of the tcp control in ms +# Attributes: +# - Default: 30 +# - Case sensitivity: no +# - Required: no +# ArmarX.HeadIKUnit.CycleTime = 30 + + +# ArmarX.HeadIKUnit.MinimumLoggingLevel: Local logging level only for this component +# Attributes: +# - Default: Undefined +# - Case sensitivity: no +# - Required: no +# - Possible values: {Error, Fatal, Info, Undefined, Verbose, Warning} +# ArmarX.HeadIKUnit.MinimumLoggingLevel = Undefined + + +# ArmarX.HeadIKUnit.KinematicUnitName: Name of the KinematicUnit Proxy +# Attributes: +# - Case sensitivity: no +# - Required: yes +ArmarX.HeadIKUnit.KinematicUnitName = "Armar3KinematicUnit" + + +# ArmarX.HeadIKUnit.ObjectName: Name of IceGrid well-known object +# Attributes: +# - Default: "" +# - Case sensitivity: no +# - Required: no +# ArmarX.HeadIKUnit.ObjectName = "" + + + diff --git a/data/ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXCore.DebugObserver.xml b/data/ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXCore.DebugObserver.xml new file mode 100644 index 00000000..c51e4a09 --- /dev/null +++ b/data/ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXCore.DebugObserver.xml @@ -0,0 +1,200 @@ +<!-- ArmarX properties --> + +<property name="ArmarX.ApplicationName"> + <description>Application name</description> + <attributes> + <attribute name="ArmarX.Default">""</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.CachePath"> + <description>Path for cache files</description> + <attributes> + <attribute name="ArmarX.Default">${HOME}/.armarx/mongo/.cache</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.Config"> + <description>Comma-separated list of configuration files </description> + <attributes> + <attribute name="ArmarX.Default">""</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DataPath"> + <description>Semicolon-separated search list for data files</description> + <attributes> + <attribute name="ArmarX.Default">""</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DefaultPackages"> + <description>List of ArmarX packages which are accessible by default</description> + <attributes> + <attribute name="ArmarX.Default">ArmarXCore, ArmarXGui, MemoryX, RobotAPI, RobotComponents, RobotSkillTemplates, ArmarXSimulation, VisionX, SpeechX, Armar3, Armar4</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DependenciesConfig"> + <description>Path to the (usually generated) config file containing all data paths of all dependent projects. This property usually does not need to be edited.</description> + <attributes> + <attribute name="ArmarX.Default">./config/dependencies.cfg</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DisableLogging"> + <description>Turn logging off in whole application</description> + <attributes> + <attribute name="ArmarX.Default">0</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.EnableProfiling"> + <description>Enable profiling of CPU load produced by this application</description> + <attributes> + <attribute name="ArmarX.Default">0</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.RedirectStdout"> + <description>Redirect std::cout and std::cerr to ArmarXLog</description> + <attributes> + <attribute name="ArmarX.Default">1</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.RemoteHandlesDeletionTimeout"> + <description>The timeout (in ms) before a remote handle deletes the managed object after the use count reached 0. This time can be used by a client to increment the count again (may be required when transmitting remote handles)</description> + <attributes> + <attribute name="ArmarX.Default">3000</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.UseTimeServer"> + <description>Enable using a global Timeserver (e.g. from ArmarXSimulator)</description> + <attributes> + <attribute name="ArmarX.Default">0</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.Verbosity"> + <description>Global logging level for whole application</description> + <attributes> + <attribute name="ArmarX.Default">Verbose</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>Debug</value> + <value>Error</value> + <value>Fatal</value> + <value>Important</value> + <value>Info</value> + <value>Undefined</value> + <value>Verbose</value> + <value>Warning</value> + </values> + </attributes> +</property> + +<!-- ArmarX.DebugObserver properties --> + +<property name="ArmarX.DebugObserver.EnableProfiling"> + <description>enable profiler which is used for logging performance events</description> + <attributes> + <attribute name="ArmarX.DebugObserver.Default">0</attribute> + <attribute name="ArmarX.DebugObserver.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DebugObserver.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.DebugObserver.MinimumLoggingLevel"> + <description>Local logging level only for this component</description> + <attributes> + <attribute name="ArmarX.DebugObserver.Default">Undefined</attribute> + <attribute name="ArmarX.DebugObserver.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DebugObserver.Required">no</attribute> + <values> + <value>Debug</value> + <value>Error</value> + <value>Fatal</value> + <value>Important</value> + <value>Info</value> + <value>Undefined</value> + <value>Verbose</value> + <value>Warning</value> + </values> + </attributes> +</property> + +<property name="ArmarX.DebugObserver.ObjectName"> + <description>Name of IceGrid well-known object</description> + <attributes> + <attribute name="ArmarX.DebugObserver.Default">""</attribute> + <attribute name="ArmarX.DebugObserver.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DebugObserver.Required">no</attribute> + </attributes> +</property> + + diff --git a/data/ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXSimulation.DepthImageProviderDynamicSimulationApp.xml b/data/ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXSimulation.DepthImageProviderDynamicSimulationApp.xml new file mode 100644 index 00000000..ecb58b9f --- /dev/null +++ b/data/ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXSimulation.DepthImageProviderDynamicSimulationApp.xml @@ -0,0 +1,439 @@ +<!-- ArmarX properties --> + +<property name="ArmarX.ApplicationName"> + <description>Application name</description> + <attributes> + <attribute name="ArmarX.Default">""</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.CachePath"> + <description>Path for cache files</description> + <attributes> + <attribute name="ArmarX.Default">${HOME}/.armarx/mongo/.cache</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.Config"> + <description>Comma-separated list of configuration files </description> + <attributes> + <attribute name="ArmarX.Default">""</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DataPath"> + <description>Semicolon-separated search list for data files</description> + <attributes> + <attribute name="ArmarX.Default">""</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DefaultPackages"> + <description>List of ArmarX packages which are accessible by default</description> + <attributes> + <attribute name="ArmarX.Default">ArmarXCore, ArmarXGui, MemoryX, RobotAPI, RobotComponents, RobotSkillTemplates, ArmarXSimulation, VisionX, SpeechX, Armar3, Armar4</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DependenciesConfig"> + <description>Path to the (usually generated) config file containing all data paths of all dependent projects. This property usually does not need to be edited.</description> + <attributes> + <attribute name="ArmarX.Default">./config/dependencies.cfg</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DisableLogging"> + <description>Turn logging off in whole application</description> + <attributes> + <attribute name="ArmarX.Default">0</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.EnableProfiling"> + <description>Enable profiling of CPU load produced by this application</description> + <attributes> + <attribute name="ArmarX.Default">0</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.RedirectStdout"> + <description>Redirect std::cout and std::cerr to ArmarXLog</description> + <attributes> + <attribute name="ArmarX.Default">1</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.RemoteHandlesDeletionTimeout"> + <description>The timeout (in ms) before a remote handle deletes the managed object after the use count reached 0. This time can be used by a client to increment the count again (may be required when transmitting remote handles)</description> + <attributes> + <attribute name="ArmarX.Default">3000</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.UseTimeServer"> + <description>Enable using a global Timeserver (e.g. from ArmarXSimulator)</description> + <attributes> + <attribute name="ArmarX.Default">0</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.Verbosity"> + <description>Global logging level for whole application</description> + <attributes> + <attribute name="ArmarX.Default">Verbose</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>Debug</value> + <value>Error</value> + <value>Fatal</value> + <value>Important</value> + <value>Info</value> + <value>Undefined</value> + <value>Verbose</value> + <value>Warning</value> + </values> + </attributes> +</property> + +<!-- ArmarX.DynamicSimulationDepthImageProvider properties --> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.BaseLine"> + <description>The value returned from getBaseline(). It has no other effect.</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">0.075000003</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DistanceZFar"> + <description>Distance of the far clipping plain. (DistanceZFar-DistanceZNear should be minimal, DistanceZFar > DistanceZNear)</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">5000</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.min">1e-08</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DistanceZNear"> + <description>Distance of the near clipping plain. (If set to small the agent's model's inside may be visible</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">20</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.min">1e-08</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud"> + <description>Whether the point cloud is drawn to the given DebugDrawerTopic</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">0</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipPoints"> + <description>Whether to clip the point cloud drawn to the given DebugDrawerTopic</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">1</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipXHi"> + <description>Skip points with x higher than this limit.</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">25000</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipXLo"> + <description>Skip points with x lower than this limit.</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">-25000</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipYHi"> + <description>Skip points with y higher than this limit.</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">25000</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipYLo"> + <description>Skip points with y lower than this limit.</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">-25000</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipZHi"> + <description>Skip points with z higher than this limit.</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">25000</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_ClipZLo"> + <description>Skip points with z lower than this limit.</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">-25000</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_DebugDrawerTopic"> + <description>Name of the DebugDrawerTopic</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">DebugDrawerUpdates</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_DrawDelay"> + <description>The time between updates of the drawn point cloud (in ms)</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">1000</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_PointSize"> + <description>The size of a point.</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">4</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.DrawPointCloud_PointSkip"> + <description>Only draw every n'th point in x and y direction (n=DrawPointCloud_PointSkip). Increase this whenever the ice buffer size is to small to transmitt the cloud size. (>0)</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">3</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.EnableProfiling"> + <description>enable profiler which is used for logging performance events</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">0</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.FOV"> + <description>Vertical FOV in rad.</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">0.785398185</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.FrameRate"> + <description>Frames per second</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">30</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.min">0</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.max">60</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Format">\d+(.\d*)?</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.ImageSize"> + <description>Target resolution of the images. Captured images will be converted to this size.</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">640x480</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + <values> + <value>1024x768</value> + <value>1280x960</value> + <value>1600x1200</value> + <value>320x240</value> + <value>640x480</value> + <value>768x576</value> + <value>800x600</value> + <value>none</value> + </values> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.MinimumLoggingLevel"> + <description>Local logging level only for this component</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">Undefined</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + <values> + <value>Debug</value> + <value>Error</value> + <value>Fatal</value> + <value>Important</value> + <value>Info</value> + <value>Undefined</value> + <value>Verbose</value> + <value>Warning</value> + </values> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.ObjectName"> + <description>Name of IceGrid well-known object</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">""</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.RobotName"> + <description>The robot</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">Armar3</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.RobotNodeCamera"> + <description>The coordinate system of the used camera</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">DepthCameraSim</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.framerate"> + <description>framerate for the point clouds</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">30</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.min">0</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.max">60</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DynamicSimulationDepthImageProvider.isEnabled"> + <description>enable the capturing process immediately</description> + <attributes> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Default">1</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.CaseSensitivity">no</attribute> + <attribute name="ArmarX.DynamicSimulationDepthImageProvider.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + + diff --git a/data/ArmarXGui/ScenarioManagerTestData/xmlCache/RobotAPI.HeadIKUnit.xml b/data/ArmarXGui/ScenarioManagerTestData/xmlCache/RobotAPI.HeadIKUnit.xml new file mode 100644 index 00000000..c239f5eb --- /dev/null +++ b/data/ArmarXGui/ScenarioManagerTestData/xmlCache/RobotAPI.HeadIKUnit.xml @@ -0,0 +1,261 @@ +<!-- ArmarX properties --> + +<property name="ArmarX.ApplicationName"> + <description>Application name</description> + <attributes> + <attribute name="ArmarX.Default">""</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.CachePath"> + <description>Path for cache files</description> + <attributes> + <attribute name="ArmarX.Default">${HOME}/.armarx/mongo/.cache</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.Config"> + <description>Comma-separated list of configuration files </description> + <attributes> + <attribute name="ArmarX.Default">""</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DataPath"> + <description>Semicolon-separated search list for data files</description> + <attributes> + <attribute name="ArmarX.Default">""</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DefaultPackages"> + <description>List of ArmarX packages which are accessible by default</description> + <attributes> + <attribute name="ArmarX.Default">ArmarXCore, ArmarXGui, MemoryX, RobotAPI, RobotComponents, RobotSkillTemplates, ArmarXSimulation, VisionX, SpeechX, Armar3, Armar4</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DependenciesConfig"> + <description>Path to the (usually generated) config file containing all data paths of all dependent projects. This property usually does not need to be edited.</description> + <attributes> + <attribute name="ArmarX.Default">./config/dependencies.cfg</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.DisableLogging"> + <description>Turn logging off in whole application</description> + <attributes> + <attribute name="ArmarX.Default">0</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.EnableProfiling"> + <description>Enable profiling of CPU load produced by this application</description> + <attributes> + <attribute name="ArmarX.Default">0</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.RedirectStdout"> + <description>Redirect std::cout and std::cerr to ArmarXLog</description> + <attributes> + <attribute name="ArmarX.Default">1</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.RemoteHandlesDeletionTimeout"> + <description>The timeout (in ms) before a remote handle deletes the managed object after the use count reached 0. This time can be used by a client to increment the count again (may be required when transmitting remote handles)</description> + <attributes> + <attribute name="ArmarX.Default">3000</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.UseTimeServer"> + <description>Enable using a global Timeserver (e.g. from ArmarXSimulator)</description> + <attributes> + <attribute name="ArmarX.Default">0</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.Verbosity"> + <description>Global logging level for whole application</description> + <attributes> + <attribute name="ArmarX.Default">Verbose</attribute> + <attribute name="ArmarX.CaseSensitivity">no</attribute> + <attribute name="ArmarX.Required">no</attribute> + <values> + <value>Debug</value> + <value>Error</value> + <value>Fatal</value> + <value>Important</value> + <value>Info</value> + <value>Undefined</value> + <value>Verbose</value> + <value>Warning</value> + </values> + </attributes> +</property> + +<!-- ArmarX.HeadIKUnit properties --> + +<property name="ArmarX.HeadIKUnit.CycleTime"> + <description>Cycle time of the tcp control in ms</description> + <attributes> + <attribute name="ArmarX.HeadIKUnit.Default">30</attribute> + <attribute name="ArmarX.HeadIKUnit.CaseSensitivity">no</attribute> + <attribute name="ArmarX.HeadIKUnit.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.HeadIKUnit.EnableProfiling"> + <description>enable profiler which is used for logging performance events</description> + <attributes> + <attribute name="ArmarX.HeadIKUnit.Default">0</attribute> + <attribute name="ArmarX.HeadIKUnit.CaseSensitivity">no</attribute> + <attribute name="ArmarX.HeadIKUnit.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + +<property name="ArmarX.HeadIKUnit.HeadIKUnitTopicName"> + <description>Name of the HeadIKUnit Topic</description> + <attributes> + <attribute name="ArmarX.HeadIKUnit.Default">HeadIKUnitTopic</attribute> + <attribute name="ArmarX.HeadIKUnit.CaseSensitivity">no</attribute> + <attribute name="ArmarX.HeadIKUnit.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.HeadIKUnit.KinematicUnitName"> + <description>Name of the KinematicUnit Proxy</description> + <attributes> + <attribute name="ArmarX.HeadIKUnit.CaseSensitivity">no</attribute> + <attribute name="ArmarX.HeadIKUnit.Required">yes</attribute> + </attributes> +</property> + +<property name="ArmarX.HeadIKUnit.MinimumLoggingLevel"> + <description>Local logging level only for this component</description> + <attributes> + <attribute name="ArmarX.HeadIKUnit.Default">Undefined</attribute> + <attribute name="ArmarX.HeadIKUnit.CaseSensitivity">no</attribute> + <attribute name="ArmarX.HeadIKUnit.Required">no</attribute> + <values> + <value>Debug</value> + <value>Error</value> + <value>Fatal</value> + <value>Important</value> + <value>Info</value> + <value>Undefined</value> + <value>Verbose</value> + <value>Warning</value> + </values> + </attributes> +</property> + +<property name="ArmarX.HeadIKUnit.ObjectName"> + <description>Name of IceGrid well-known object</description> + <attributes> + <attribute name="ArmarX.HeadIKUnit.Default">""</attribute> + <attribute name="ArmarX.HeadIKUnit.CaseSensitivity">no</attribute> + <attribute name="ArmarX.HeadIKUnit.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.HeadIKUnit.RobotStateComponentName"> + <description>Name of the RobotStateComponent that should be used</description> + <attributes> + <attribute name="ArmarX.HeadIKUnit.Default">RobotStateComponent</attribute> + <attribute name="ArmarX.HeadIKUnit.CaseSensitivity">no</attribute> + <attribute name="ArmarX.HeadIKUnit.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.HeadIKUnit.RobotStateTopicName"> + <description>Name of the RobotComponent State topic.</description> + <attributes> + <attribute name="ArmarX.HeadIKUnit.Default">RobotState</attribute> + <attribute name="ArmarX.HeadIKUnit.CaseSensitivity">no</attribute> + <attribute name="ArmarX.HeadIKUnit.Required">no</attribute> + </attributes> +</property> + +<property name="ArmarX.HeadIKUnit.VisualizeIKTarget"> + <description>Visualize the current IK target using the debug drawer</description> + <attributes> + <attribute name="ArmarX.HeadIKUnit.Default">1</attribute> + <attribute name="ArmarX.HeadIKUnit.CaseSensitivity">no</attribute> + <attribute name="ArmarX.HeadIKUnit.Required">no</attribute> + <values> + <value>0</value> + <value>1</value> + <value>false</value> + <value>no</value> + <value>true</value> + <value>yes</value> + </values> + </attributes> +</property> + + diff --git a/source/ArmarXGui/gui-plugins/ScenarioManager/data_structure/ApplicationInstance.cpp b/source/ArmarXGui/gui-plugins/ScenarioManager/data_structure/ApplicationInstance.cpp index be5aa988..34eefec9 100644 --- a/source/ArmarXGui/gui-plugins/ScenarioManager/data_structure/ApplicationInstance.cpp +++ b/source/ArmarXGui/gui-plugins/ScenarioManager/data_structure/ApplicationInstance.cpp @@ -88,20 +88,23 @@ void ApplicationInstance::setConfigPath(string configPath) void ApplicationInstance::resetConfigPath() { - QFile currentConfig(QString::fromStdString(this->configPath)); + boost::filesystem::path scenariosFolder(scenario->getPackage()->getScenarioPath()); + boost::filesystem::path scenarioFolder = scenariosFolder / boost::filesystem::path("./" + scenario->getName()); + boost::filesystem::path scenarioCfgFolder = scenarioFolder / boost::filesystem::path("./config"); - this->configPath = configPath.substr(0, configPath.find_last_of("/") + 1); + boost::filesystem::path configPath = scenarioCfgFolder; if (!this->instanceName.empty() || !this->instanceName.compare("\"\"") || !this->instanceName.compare("\" \"")) { - configPath.append(this->getName()).append(".").append(this->getInstanceName()).append(".cfg"); + configPath = configPath / boost::filesystem::path("./" + this->getName() + "." + this->getInstanceName() + ".cfg"); } else { - configPath.append(this->getName()).append(".cfg"); + configPath = configPath / boost::filesystem::path("./" + this->getName() + ".cfg");; } - currentConfig.rename(QString::fromStdString(this->configPath)); + boost::filesystem::remove(boost::filesystem::path(this->configPath)); + this->configPath = configPath.string(); } string ApplicationInstance::getStatus() diff --git a/source/ArmarXGui/gui-plugins/ScenarioManager/data_structure/ApplicationInstance.h b/source/ArmarXGui/gui-plugins/ScenarioManager/data_structure/ApplicationInstance.h index c26c288d..a3b466e5 100644 --- a/source/ArmarXGui/gui-plugins/ScenarioManager/data_structure/ApplicationInstance.h +++ b/source/ArmarXGui/gui-plugins/ScenarioManager/data_structure/ApplicationInstance.h @@ -105,6 +105,11 @@ namespace ScenarioManager * @param new config path */ void setConfigPath(std::string configPath); + + /** + * @brief resetConfigPath. should be called when the instanceName is changed/ deletes the old cfg file and resets the local config Path to where the file should be + * you should call save after this + */ void resetConfigPath(); /** diff --git a/source/ArmarXGui/gui-plugins/ScenarioManager/executor/LinuxStarter.cpp b/source/ArmarXGui/gui-plugins/ScenarioManager/executor/LinuxStarter.cpp index 927d778f..6b7cb685 100644 --- a/source/ArmarXGui/gui-plugins/ScenarioManager/executor/LinuxStarter.cpp +++ b/source/ArmarXGui/gui-plugins/ScenarioManager/executor/LinuxStarter.cpp @@ -109,7 +109,7 @@ void LinuxStarter::start(ApplicationInstancePtr app, PidManager pidManager, cons } - boost::filesystem::path dependenciesFilePath = componentFolderPath / boost::filesystem::path("./" + app->getPackageName() + ".dependendies.cfg"); + boost::filesystem::path dependenciesFilePath = componentFolderPath / boost::filesystem::path("./" + app->getPackageName() + ".dependencies.cfg"); std::string strCommand = app->getPathToExecutable().append("/").append(runName) .append(" --Ice.Config=").append(app->getScenario()->getGlobalConfigPath()) diff --git a/source/ArmarXGui/gui-plugins/ScenarioManager/gui/detailedapplicationview.cpp b/source/ArmarXGui/gui-plugins/ScenarioManager/gui/detailedapplicationview.cpp index fd33b434..04d5f069 100644 --- a/source/ArmarXGui/gui-plugins/ScenarioManager/gui/detailedapplicationview.cpp +++ b/source/ArmarXGui/gui-plugins/ScenarioManager/gui/detailedapplicationview.cpp @@ -575,7 +575,7 @@ void DetailedApplicationView::on_fileUpdate() if (lastAppInstance.get() != nullptr) { - //DANGER deletest old config + //DANGER delets old config lastAppInstance->resetConfigPath(); lastAppInstance->save(); diff --git a/source/ArmarXGui/gui-plugins/ScenarioManager/parser/PackageBuilder.cpp b/source/ArmarXGui/gui-plugins/ScenarioManager/parser/PackageBuilder.cpp index 223dd625..2baae629 100644 --- a/source/ArmarXGui/gui-plugins/ScenarioManager/parser/PackageBuilder.cpp +++ b/source/ArmarXGui/gui-plugins/ScenarioManager/parser/PackageBuilder.cpp @@ -205,7 +205,7 @@ void PackageBuilder::generateDependenciesCfg(PackagePtr package) } } - boost::filesystem::path cacheFilePath = cacheFolderPath / boost::filesystem::path("./" + package->getName() + ".dependendies.cfg"); + boost::filesystem::path cacheFilePath = cacheFolderPath / boost::filesystem::path("./" + package->getName() + ".dependencies.cfg"); ofstream out(cacheFilePath.string()); diff --git a/source/ArmarXGui/gui-plugins/ScenarioManager/parser/iceparser.cpp b/source/ArmarXGui/gui-plugins/ScenarioManager/parser/iceparser.cpp index a45da59d..17f26075 100644 --- a/source/ArmarXGui/gui-plugins/ScenarioManager/parser/iceparser.cpp +++ b/source/ArmarXGui/gui-plugins/ScenarioManager/parser/iceparser.cpp @@ -121,49 +121,35 @@ armarx::PropertyDefinitionsPtr IceParser::loadFromXml(std::string path, Applicat const string propertyName = property_node.attribute_value("name"); const string description = property_node.first_node("description").value(); RapidXmlReaderNode attributes_node = property_node.first_node("attributes"); - RapidXmlReaderNode first_attribute = attributes_node.first_node("attribute"); - RapidXmlReaderNode second_attribute = first_attribute.next_sibling(); - RapidXmlReaderNode third_attribute = second_attribute.next_sibling(); + + RapidXmlReaderNode current_attribute = attributes_node.first_node("attribute"); string defaultValue = ""; //bool caseSensitive = false; bool required = false; - //if the first value is an default value set it - //normaly the case for default properties - if (first_attribute.is_valid() && first_attribute.attribute_value("name").find("Default") != string::npos) + while (current_attribute.is_valid()) { - defaultValue = first_attribute.value(); - if (second_attribute.is_valid() && second_attribute.attribute_value("name").find("CaseSensitivity") != string::npos) + //if it is no attribute continue to the next sibling + if (current_attribute.name().compare("attribute") != 0) { - //if(second_attribute.value().compare("yes") == 0) - // caseSensitive = true; - if (third_attribute.is_valid() && third_attribute.attribute_value("name").find("Required") != string::npos) - { - if (third_attribute.value().compare("yes") == 0) - { - required = true; - } - } + } - } - else - { - //Required property case - defaultValue = "::_NOT_SET_::"; - if (first_attribute.is_valid() && first_attribute.attribute_value("name").find("CaseSensitivity") != string::npos) + else if (current_attribute.attribute_value("name").find("Default") != string::npos) + { + defaultValue = current_attribute.value(); + } + else if (current_attribute.attribute_value("name").find("CaseSensitivity") != string::npos) { - //CaseSensitivity is currently not checked/implemented - //if(second_attribute.value().compare("yes") == 0) - // caseSensitive = true; - if (second_attribute.is_valid() && second_attribute.attribute_value("name").find("Required") != string::npos) + } + else if (current_attribute.attribute_value("name").find("Required") != string::npos) + { + if (current_attribute.value().compare("yes") == 0) { - if (second_attribute.value().compare("yes") == 0) - { - required = true; - } + required = true; } } + current_attribute = current_attribute.next_sibling(); } if (required) @@ -183,7 +169,6 @@ armarx::PropertyDefinitionsPtr IceParser::loadFromXml(std::string path, Applicat app->setIsDefaultProperty(propertyName, true); app->setDefaultPropertyEnabled(propertyName, false); } - } return container; diff --git a/source/ArmarXGui/gui-plugins/ScenarioManager/test/XMLScenarioParserTest.cpp b/source/ArmarXGui/gui-plugins/ScenarioManager/test/XMLScenarioParserTest.cpp index 189feff0..af546596 100644 --- a/source/ArmarXGui/gui-plugins/ScenarioManager/test/XMLScenarioParserTest.cpp +++ b/source/ArmarXGui/gui-plugins/ScenarioManager/test/XMLScenarioParserTest.cpp @@ -19,12 +19,15 @@ #include <ArmarXCore/core/rapidxml/wrapper/RapidXmlReader.h> #include <ArmarXCore/core/rapidxml/wrapper/RapidXmlWriter.h> +#include <ArmarXCore/core/system/cmake/CMakePackageFinder.h> #include <ArmarXCore/core/application/properties/PropertyDefinitionContainer.h> #include <ArmarXCore/core/application/properties/PropertyDefinitionContainerFormatter.h> #include <ArmarXCore/core/application/properties/PropertyDefinitionFormatter.h> #include <ArmarXCore/core/application/properties/PropertyDefinitionConfigFormatter.h> +#include <algorithm> + using namespace ScenarioManager; using namespace Data_Structure; using namespace Parser; @@ -40,85 +43,229 @@ XMLScenarioParser xmlParser = XMLScenarioParser(); PackageBuilder parser = PackageBuilder(); ApplicationPtr app1; ApplicationInstancePtr api1; -//ExecutorTestEnvironmentPtr environment = ExecutorTestEnvironmentPtr(new ExecutorTestEnvironment()); -BOOST_AUTO_TEST_CASE(initialize_packages) +BOOST_AUTO_TEST_CASE(InitDataPath) { - coreP = parser.parsePackage("ArmarXCore"); - PackagePtr guiP = parser.parsePackage("ArmarXGui"); + //init dataPath + std::string packageName("ArmarXGui"); + armarx::CMakePackageFinder finder(packageName); + if (!finder.packageFound()) + { + BOOST_ERROR("Cannot find ArmarXGui Package"); + } - packages->push_back(coreP); - packages->push_back(guiP); + std::string packageDataDir = finder.getDataDir(); + ArmarXDataPath::addDataPaths(packageDataDir); } -BOOST_AUTO_TEST_CASE(create_new_scenario_in_package) + +BOOST_AUTO_TEST_CASE(IceParserLoadFromXml_DebugObserverTest) { - s = xmlParser.createNewScenario("testScenario", coreP); - if (s == NULL) + //init app for test + app1 = ApplicationPtr(new Application("DebugObserver", "not relevant", "ArmarXCore")); + api1 = ApplicationInstancePtr(new ApplicationInstance((*app1), "", "not relevant", s)); + + //find DebugObserver.xml file + std::string relativeFilename("ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXCore.DebugObserver.xml"); + std::string absoluteFilename; + if (!ArmarXDataPath::getAbsolutePath(relativeFilename, absoluteFilename)) { - BOOST_ERROR("SCENARIO IS NULL"); + BOOST_ERROR("Cannot find file ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXCore.DebugObserver.xml in ArmarXGui DataPath"); } - app1 = coreP->getApplicationByName("SystemObserverRun"); - ApplicationPtr app2 = coreP->getApplicationByName("TimeoutExampleRun"); - api1 = ApplicationInstancePtr(new ApplicationInstance((*app1), "", coreP->getScenarioPath() + "/testScenario/config", s)); - ApplicationInstancePtr api2 = ApplicationInstancePtr(new ApplicationInstance((*app2), "", s->getPath() + "/testScenario/config", s)); + //parse the file + IceParser parser; + armarx::PropertyDefinitionsPtr definitions = parser.loadFromXml(absoluteFilename, api1.get()); - s->addApplication(api1); - s->addApplication(api2); + //check properties required parsing + Ice::PropertyDict properties = definitions->getProperties()->getPropertiesForPrefix(""); - xmlParser.saveScenario(s.get()); + for (auto it : properties) + { + if (it.first.compare("Ice.Config") != 0) + { + BOOST_CHECK_EQUAL(api1->isDefaultProperty(it.first), true); + BOOST_CHECK_EQUAL(api1->isDefaultPropertyEnabled(it.first), false); + } + if (it.second.compare("::_NOT_SET_::") == 0) + { + BOOST_ERROR("Got Required property in " + absoluteFilename + " which should not contain Required Properties"); + } + } } -BOOST_AUTO_TEST_CASE(parse_scenario_file) +BOOST_AUTO_TEST_CASE(IceParserLoadFromXml_HeadIKUnitTest) { - s = xmlParser.parseScenario(s); + //init app for test + app1 = ApplicationPtr(new Application("HeadIKUnit", "not relevant", "RobotApi")); + api1 = ApplicationInstancePtr(new ApplicationInstance((*app1), "", "not relevant", s)); - if (s == NULL) + //find DebugObserver.xml file + std::string relativeFilename("ArmarXGui/ScenarioManagerTestData/xmlCache/RobotAPI.HeadIKUnit.xml"); + std::string absoluteFilename; + if (!ArmarXDataPath::getAbsolutePath(relativeFilename, absoluteFilename)) { - BOOST_ERROR("NO SCENARIO CREATED"); + BOOST_ERROR("Cannot find file ArmarXGui/ScenarioManagerTestData/xmlCache/RobotAPI.HeadIKUnit.xml in ArmarXGui DataPath"); } - BOOST_CHECK_EQUAL(s->getName(), "testScenario"); + //parse the file + IceParser parser; + armarx::PropertyDefinitionsPtr definitions = parser.loadFromXml(absoluteFilename, api1.get()); + + //check properties required parsing + Ice::PropertyDict properties = definitions->getProperties()->getPropertiesForPrefix(""); + int reqCount = 0; + for (auto it : properties) + { + if (it.first.compare("Ice.Config") != 0) + { + BOOST_CHECK_EQUAL(api1->isDefaultProperty(it.first), true); + BOOST_CHECK_EQUAL(api1->isDefaultPropertyEnabled(it.first), false); + } + if (it.second.compare("::_NOT_SET_::") == 0) + { + reqCount ++; + } + } + if (reqCount != 1) + { + BOOST_ERROR("Got " + std::to_string(reqCount) + " Required properties in " + absoluteFilename + " which should only contain one Required Property"); + } } -BOOST_AUTO_TEST_CASE(application_data) + +BOOST_AUTO_TEST_CASE(IceParserLoadFromXml_DepthImageProviderDynamicSimulationAppTest) { - if (s == NULL) + //init app for test + app1 = ApplicationPtr(new Application("DepthImageProviderDynamicSimulationApp", "not relevant", "ArmarXSimulation")); + api1 = ApplicationInstancePtr(new ApplicationInstance((*app1), "", "not relevant", s)); + + //find DebugObserver.xml file + std::string relativeFilename("ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXSimulation.DepthImageProviderDynamicSimulationApp.xml"); + std::string absoluteFilename; + if (!ArmarXDataPath::getAbsolutePath(relativeFilename, absoluteFilename)) { - BOOST_ERROR("SCENARIO IS NULL"); + BOOST_ERROR("Cannot find file ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXSimulation.DepthImageProviderDynamicSimulationApp.xml in ArmarXGui DataPath"); } - ApplicationInstanceVectorPtr apps = s->getApplications(); + //parse the file + IceParser parser; + armarx::PropertyDefinitionsPtr definitions = parser.loadFromXml(absoluteFilename, api1.get()); - BOOST_CHECK_EQUAL((*apps).size(), 2); - - BOOST_CHECK_EQUAL((*apps)[0]->getName(), "SystemObserverRun"); - BOOST_CHECK_EQUAL((*apps)[1]->getName(), "TimeoutExampleRun"); + //check properties required parsing + Ice::PropertyDict properties = definitions->getProperties()->getPropertiesForPrefix(""); + for (auto it : properties) + { + if (it.first.compare("Ice.Config") != 0) + { + BOOST_CHECK_EQUAL(api1->isDefaultProperty(it.first), true); + BOOST_CHECK_EQUAL(api1->isDefaultPropertyEnabled(it.first), false); + } + if (it.second.compare("::_NOT_SET_::") == 0) + { + BOOST_ERROR("Got Required property in " + absoluteFilename + " which should not contain Required Properties"); + } + } } -BOOST_AUTO_TEST_CASE(get_package) -{ - PackagePtr p = xmlParser.getScenarioPackage(s, packages); - BOOST_CHECK_EQUAL(p, coreP); -} +//BOOST_AUTO_TEST_CASE(IceParserParseCfg_DebugObserverTest) +//{ +// //init app for test +// app1 = ApplicationPtr(new Application("DebugObserver", "not relevant", "ArmarXCore")); +// api1 = ApplicationInstancePtr(new ApplicationInstance((*app1), "", "not relevant", s)); -//This is hard to test, since the closed-scenario-paths value always changes, so we only test if no exceptions occur. -BOOST_AUTO_TEST_CASE(closed_scenario_paths) -{ - QStringList scenariopaths = parser.getAllClosedScenarios(); -} +// //find DebugObserver.xml file +// std::string relativeFilename("ArmarXGui/ScenarioManagerTestData/cfgs/DebugObserver.untouched.cfg"); +// std::string absoluteFilename; +// api1->setConfigPath(absoluteFilename); +// if (!ArmarXDataPath::getAbsolutePath(relativeFilename, absoluteFilename)) +// { +// BOOST_ERROR("Cannot find file ArmarXGui/ScenarioManagerTestData/xmlCache/ArmarXCore.DebugObserver.xml in ArmarXGui DataPath"); +// } + +// //parse the file +// IceParser parser; +// armarx::PropertyDefinitionsPtr definitions = parser.mergeXmlAndCfg(api1.get()); + +// //TODO +// // //check properties +// // Ice::PropertyDict properties = definitions->getProperties()->getPropertiesForPrefix(""); -//BOOST_AUTO_TEST_CASE(IceParserLoadFromXml) +// // for (auto it : properties) +// // { +// // if (it.first.compare("Ice.Config") != 0) +// // { +// // BOOST_CHECK_EQUAL(api1->isDefaultProperty(it.first), true); +// // BOOST_CHECK_EQUAL(api1->isDefaultPropertyEnabled(it.first), false); +// // } +// // } +//} + + +//ExecutorTestEnvironmentPtr environment = ExecutorTestEnvironmentPtr(new ExecutorTestEnvironment()); +//BOOST_AUTO_TEST_CASE(initialize_packages) //{ -// std::string cachePath = ArmarXDataPath::GetCachePath(); -// boost::filesystem::path xmlPath = boost::filesystem::path(cachePath) / boost::filesystem::path("ComponentFiles/" + app1->getPackageName() + "." + app1->getName() + ".xml"); +// coreP = parser.parsePackage("ArmarXCore"); +// PackagePtr guiP = parser.parsePackage("ArmarXGui"); +// packages->push_back(coreP); +// packages->push_back(guiP); +//} -// //Load an Xml file -// Executor executor(stopStrategyFactory.getStopStrategy(StopperFactory::getFactory()->getPidStopper()), StarterFactory::getFactory()->getStarter()); -// executor.loadAndSetCachedProperties(app1, IceParser::getCacheDir(), false, false); +//BOOST_AUTO_TEST_CASE(create_new_scenario_in_package) +//{ +// s = xmlParser.createNewScenario("testScenario", coreP); +// if (s == NULL) +// { +// BOOST_ERROR("SCENARIO IS NULL"); +// } -// IceParser parser; -// armarx::PropertyDefinitionsPtr definitions = parser.loadFromXml(xmlPath, app1); +// app1 = coreP->getApplicationByName("SystemObserverRun"); +// ApplicationPtr app2 = coreP->getApplicationByName("TimeoutExampleRun"); +// api1 = ApplicationInstancePtr(new ApplicationInstance((*app1), "", coreP->getScenarioPath() + "/testScenario/config", s)); +// ApplicationInstancePtr api2 = ApplicationInstancePtr(new ApplicationInstance((*app2), "", s->getPath() + "/testScenario/config", s)); + +// s->addApplication(api1); +// s->addApplication(api2); + +// xmlParser.saveScenario(s.get()); +//} + +//BOOST_AUTO_TEST_CASE(parse_scenario_file) +//{ +// s = xmlParser.parseScenario(s); + +// if (s == NULL) +// { +// BOOST_ERROR("NO SCENARIO CREATED"); +// } + +// BOOST_CHECK_EQUAL(s->getName(), "testScenario"); +//} + +//BOOST_AUTO_TEST_CASE(application_data) +//{ +// if (s == NULL) +// { +// BOOST_ERROR("SCENARIO IS NULL"); +// } + +// ApplicationInstanceVectorPtr apps = s->getApplications(); + +// BOOST_CHECK_EQUAL((*apps).size(), 2); + +// BOOST_CHECK_EQUAL((*apps)[0]->getName(), "SystemObserverRun"); +// BOOST_CHECK_EQUAL((*apps)[1]->getName(), "TimeoutExampleRun"); +//} + +//BOOST_AUTO_TEST_CASE(get_package) +//{ +// PackagePtr p = xmlParser.getScenarioPackage(s, packages); +// BOOST_CHECK_EQUAL(p, coreP); +//} + +////This is hard to test, since the closed-scenario-paths value always changes, so we only test if no exceptions occur. +//BOOST_AUTO_TEST_CASE(closed_scenario_paths) +//{ +// QStringList scenariopaths = parser.getAllClosedScenarios(); //} -- GitLab