From 2ac8e4275d49c968d051284a012b3971c66f48c2 Mon Sep 17 00:00:00 2001 From: Mirko Waechter <mirko.waechter@kit.edu> Date: Fri, 11 Mar 2016 14:25:09 +0100 Subject: [PATCH] fixed statechart profile prefix --- .../config/RobotControl.cfg | 2 +- .../tests/StatechartProfilesTestArmar3a/config/RobotControl.cfg | 2 +- source/RobotAPI/statecharts/operations/RobotControl.cpp | 2 +- source/RobotAPI/statecharts/operations/RobotControl.h | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scenarios/tests/StatechartProfilesTestArmar3Simulation/config/RobotControl.cfg b/scenarios/tests/StatechartProfilesTestArmar3Simulation/config/RobotControl.cfg index 01fcafba4..6c8b174ef 100644 --- a/scenarios/tests/StatechartProfilesTestArmar3Simulation/config/RobotControl.cfg +++ b/scenarios/tests/StatechartProfilesTestArmar3Simulation/config/RobotControl.cfg @@ -112,6 +112,6 @@ ArmarX.RobotControlStateOfferer.proxyName = "StatechartProfilesTestGroupRemoteSt # - Case sensitivity: no # - Required: no # ArmarX.RobotControlStateOfferer.ObjectName = "" - +ArmarX.RobotControlStateOfferer.XMLStatechartProfile = "Armar3Simulation" diff --git a/scenarios/tests/StatechartProfilesTestArmar3a/config/RobotControl.cfg b/scenarios/tests/StatechartProfilesTestArmar3a/config/RobotControl.cfg index 01fcafba4..0de35bad4 100644 --- a/scenarios/tests/StatechartProfilesTestArmar3a/config/RobotControl.cfg +++ b/scenarios/tests/StatechartProfilesTestArmar3a/config/RobotControl.cfg @@ -113,5 +113,5 @@ ArmarX.RobotControlStateOfferer.proxyName = "StatechartProfilesTestGroupRemoteSt # - Required: no # ArmarX.RobotControlStateOfferer.ObjectName = "" - +ArmarX.XMLStateComponent.XMLStatechartProfile = "Armar3a" diff --git a/source/RobotAPI/statecharts/operations/RobotControl.cpp b/source/RobotAPI/statecharts/operations/RobotControl.cpp index 47c178faa..d99d262ac 100644 --- a/source/RobotAPI/statecharts/operations/RobotControl.cpp +++ b/source/RobotAPI/statecharts/operations/RobotControl.cpp @@ -80,7 +80,7 @@ namespace armarx robotFunctionalState = stateList.begin()->second; callRemoteState(stateId, StringVariantContainerBaseMap()); - const std::string proxyName = getProperty<std::string>("proxyName").getValue(); + const std::string proxyName = getProperty<std::string>("XMLStatechartProfile").getValue() + getProperty<std::string>("proxyName").getValue(); const std::string stateName = getProperty<std::string>("stateName").getValue(); ARMARX_IMPORTANT << VAROUT(proxyName) << VAROUT(stateName); diff --git a/source/RobotAPI/statecharts/operations/RobotControl.h b/source/RobotAPI/statecharts/operations/RobotControl.h index c0d2cb409..fa875b00e 100644 --- a/source/RobotAPI/statecharts/operations/RobotControl.h +++ b/source/RobotAPI/statecharts/operations/RobotControl.h @@ -38,6 +38,8 @@ namespace armarx RobotControlContextProperties(std::string prefix): StatechartContextPropertyDefinitions(prefix) { + + defineOptionalProperty<std::string>("XMLStatechartProfile", "", "Name of the statechart profile to be used. This is used as prefix to the proxyName. So GraspGroupRemoteStateOfferer will be Armar3aGraspGroupRemoteStateOfferer"); defineOptionalProperty<std::string>("proxyName", "", "name of the proxy to load"); defineOptionalProperty<std::string>("stateName", "", "name of the state to load"); } -- GitLab