diff --git a/source/RobotAPI/components/units/HeadIKUnit.cpp b/source/RobotAPI/components/units/HeadIKUnit.cpp index c30bfdb063a7a01368047e2e17c68421148a1123..0ab897d7df74739d7cd7921a6cf0f81a1c25a8e2 100644 --- a/source/RobotAPI/components/units/HeadIKUnit.cpp +++ b/source/RobotAPI/components/units/HeadIKUnit.cpp @@ -25,7 +25,7 @@ namespace armarx ScopedLock lock(accessMutex); usingProxy(getProperty<std::string>("KinematicUnitName").getValue()); - usingProxy("RobotStateComponent"); + usingProxy(getProperty<std::string>("RobotStateComponentName").getValue()); usingTopic(getProperty<std::string>("RobotStateTopicName").getValue()); @@ -43,7 +43,8 @@ namespace armarx drawer = getTopic<DebugDrawerInterfacePrx>("DebugDrawerUpdates"); kinematicUnitPrx = getProxy<KinematicUnitInterfacePrx>(getProperty<std::string>("KinematicUnitName").getValue()); - robotStateComponentPrx = getProxy<RobotStateComponentInterfacePrx>("RobotStateComponent"); + robotStateComponentPrx = getProxy<RobotStateComponentInterfacePrx>(getProperty<std::string>("RobotStateComponentName").getValue()); + //remoteRobotPrx = robotStateComponentPrx->getSynchronizedRobot(); localRobot = RemoteRobot::createLocalClone(robotStateComponentPrx); diff --git a/source/RobotAPI/components/units/HeadIKUnit.h b/source/RobotAPI/components/units/HeadIKUnit.h index 0a1917fa38800f1e3034c73471098fcac6b7d5c5..6deff5a7add3ea52ae1bc09721a4e421c316df2d 100644 --- a/source/RobotAPI/components/units/HeadIKUnit.h +++ b/source/RobotAPI/components/units/HeadIKUnit.h @@ -49,6 +49,7 @@ namespace armarx defineRequiredProperty<std::string>("KinematicUnitName", "Name of the KinematicUnit Proxy"); defineOptionalProperty<std::string>("RobotStateTopicName", "RobotState", "Name of the RobotComponent State topic."); defineOptionalProperty<std::string>("HeadIKUnitTopicName", "HeadIKUnitTopic", "Name of the HeadIKUnit Topic"); + defineOptionalProperty<std::string>("RobotStateComponentName", "RobotStateComponent", "Name of the RobotStateComponent that should be used"); defineOptionalProperty<int>("CycleTime", 30, "Cycle time of the tcp control in ms"); } }; diff --git a/source/RobotAPI/components/units/TCPControlUnit.cpp b/source/RobotAPI/components/units/TCPControlUnit.cpp index 7f7a2da918488dc013d014064ef57031f5d41f4f..0ab4790e9bf6e6227448594bb17da2ef7f4e0e2d 100644 --- a/source/RobotAPI/components/units/TCPControlUnit.cpp +++ b/source/RobotAPI/components/units/TCPControlUnit.cpp @@ -54,7 +54,7 @@ namespace armarx { topicName = getName() + "State"; usingProxy(getProperty<std::string>("KinematicUnitName").getValue()); - usingProxy("RobotStateComponent"); + usingProxy(getProperty<std::string>("RobotStateComponentName").getValue()); usingProxy("DebugObserver"); offeringTopic(topicName); usingTopic(getProperty<std::string>("RobotStateTopicName").getValue()); @@ -70,7 +70,8 @@ namespace armarx debugObs = getProxy<DebugObserverInterfacePrx>("DebugObserver"); kinematicUnitPrx = getProxy<KinematicUnitInterfacePrx>(getProperty<std::string>("KinematicUnitName").getValue()); - robotStateComponentPrx = getProxy<RobotStateComponentInterfacePrx>("RobotStateComponent"); + robotStateComponentPrx = getProxy<RobotStateComponentInterfacePrx>(getProperty<std::string>("RobotStateComponentName").getValue()); + //remoteRobotPrx = robotStateComponentPrx->getSynchronizedRobot(); @@ -180,7 +181,7 @@ namespace armarx void TCPControlUnit::setTCPVelocity(const std::string& nodeSetName, const std::string& tcpName, const FramedDirectionBasePtr& translationVelocity, const FramedDirectionBasePtr& orientationVelocityRPY, const Ice::Current& c) { - if(!isRequested()) + if (!isRequested()) { ARMARX_WARNING << "Implicitly requesting TCPControlUnit! Please call request before setting TCPVelocities!"; request(); diff --git a/source/RobotAPI/components/units/TCPControlUnit.h b/source/RobotAPI/components/units/TCPControlUnit.h index efb111ea2271f83edb524471f36a520aefa31f51..7611446f35eb6ab1057d8268aebece3cdcf4f75f 100644 --- a/source/RobotAPI/components/units/TCPControlUnit.h +++ b/source/RobotAPI/components/units/TCPControlUnit.h @@ -52,6 +52,7 @@ namespace armarx defineOptionalProperty<int>("CycleTime", 30, "Cycle time of the tcp control in ms"); defineOptionalProperty<float>("MaximumCommandDelay", 20000, "Delay after which the TCP Control unit releases itself if no new velocity have been set."); defineOptionalProperty<std::string>("TCPsToReport", "", "comma seperated list of nodesets' endeffectors, which poses and velocities that should be reported. * for all, empty for none"); + defineOptionalProperty<std::string>("RobotStateComponentName", "RobotStateComponent", "Name of the RobotStateComponent that should be used"); } diff --git a/source/RobotAPI/interface/speech/SpeechInterface.ice b/source/RobotAPI/interface/speech/SpeechInterface.ice index cbdba5932b0eefdbd184479b02640a191cf6a8e4..ea06c3caa6885958d266e07d53c624a2cfe741f0 100644 --- a/source/RobotAPI/interface/speech/SpeechInterface.ice +++ b/source/RobotAPI/interface/speech/SpeechInterface.ice @@ -81,7 +81,9 @@ module armarx * \param text Text. * \param string vector params. */ - //void reportTextWithParams(string text,Ice::StringSeq params); + + void reportTextWithParams(string text,Ice::StringSeq params); + }; enum FeedbackType diff --git a/source/RobotAPI/libraries/core/RobotStatechartContext.cpp b/source/RobotAPI/libraries/core/RobotStatechartContext.cpp index 7713be5cda5ee55e4f0a6153efe54d3f66116950..6e4988445a86ee0a2e42efc1ddcc4da2600d3609 100644 --- a/source/RobotAPI/libraries/core/RobotStatechartContext.cpp +++ b/source/RobotAPI/libraries/core/RobotStatechartContext.cpp @@ -41,7 +41,7 @@ namespace armarx kinematicUnitObserverName = getProperty<std::string>("KinematicUnitObserverName").getValue(); usingProxy(getProperty<std::string>("KinematicUnitName").getValue()); - usingProxy("RobotStateComponent"); + usingProxy(getProperty<std::string>("RobotStateComponentName").getValue()); usingProxy(kinematicUnitObserverName); if (!getProperty<std::string>("HandUnits").getValue().empty()) @@ -74,7 +74,7 @@ namespace armarx ARMARX_LOG << eINFO << "Starting RobotStatechartContext" << flush; // retrieve proxies - std::string rbStateName = "RobotStateComponent"; + std::string rbStateName = getProperty<std::string>("RobotStateComponentName").getValue(); robotStateComponent = getProxy<RobotStateComponentInterfacePrx>(rbStateName); std::string kinUnitName = getProperty<std::string>("KinematicUnitName").getValue(); kinematicUnitPrx = getProxy<KinematicUnitInterfacePrx>(kinUnitName); diff --git a/source/RobotAPI/libraries/core/RobotStatechartContext.h b/source/RobotAPI/libraries/core/RobotStatechartContext.h index 81cbdf2529b1d6ee3c5ef7e3c5acb0240c855c38..369ca866585f90f75be4b603df7d148b197cf6d2 100644 --- a/source/RobotAPI/libraries/core/RobotStatechartContext.h +++ b/source/RobotAPI/libraries/core/RobotStatechartContext.h @@ -55,6 +55,8 @@ namespace armarx defineOptionalProperty<std::string>("HandUnits", "", "Name of the comma-seperated hand units that should be used. Unitname for left hand should be LeftHandUnit, and for right hand RightHandUnit"); defineOptionalProperty<std::string>("HeadIKUnitName", "", "Name of the head unit that should be used."); defineOptionalProperty<std::string>("HeadIKKinematicChainName", "", "Name of the kinematic chain that should be used for head IK."); + defineOptionalProperty<std::string>("RobotStateComponentName", "RobotStateComponent", "Name of the RobotStateComponent that should be used"); + } };