diff --git a/CMakeLists.txt b/CMakeLists.txt index cd15ab478ba627b71a3eea5fa1159e6d5cbf9619..a0f73bd4fe3434516a9528fe308fe8c2c25ce29f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,10 +16,15 @@ depends_on_armarx_package(ArmarXGui "OPTIONAL") set(ArmarX_Simox_VERSION 2.3.16) +find_package(Simox ${ArmarX_Simox_VERSION} QUIET) +if (Simox_FOUND) + setupSimoxExternalLibraries() +endif() + add_subdirectory(source) list(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS "simox") install_project() -add_subdirectory(scenarios) \ No newline at end of file +add_subdirectory(scenarios) diff --git a/data/RobotAPI/VariantInfo-RobotAPI.xml b/data/RobotAPI/VariantInfo-RobotAPI.xml index 8dee1c90a6e82984cc2144c5a1b29298cc0911aa..4d490440cbe8afbb145564d63c638b5235ecf7f2 100644 --- a/data/RobotAPI/VariantInfo-RobotAPI.xml +++ b/data/RobotAPI/VariantInfo-RobotAPI.xml @@ -81,6 +81,14 @@ propertyName="WeissHapticUnitName" propertyIsOptional="true" propertyDefaultValue="WeissHapticUnit" /> + <Proxy include="RobotAPI/interface/units/HeadIKUnit.h" + humanName="Head IK Unit" + typeName="HeadIKUnitInterfacePrx" + memberName="headIKUnit" + getterName="getHeadIKUnit" + propertyName="HeadIKUnitName" + propertyIsOptional="true" + propertyDefaultValue="HeadIKUnit" /> <Proxy include="RobotAPI/interface/core/RobotState.h" humanName="Robot State Component" typeName="RobotStateComponentInterfacePrx" diff --git a/data/RobotAPI/robots/Armar3/ArmarIII-Head.xml b/data/RobotAPI/robots/Armar3/ArmarIII-Head.xml index 2d846aa86220f7b6ca80fdf577947ad98e52af2c..68b453a3fafa5be3e9edfaae1e15455ae349d4db 100644 --- a/data/RobotAPI/robots/Armar3/ArmarIII-Head.xml +++ b/data/RobotAPI/robots/Armar3/ArmarIII-Head.xml @@ -33,7 +33,7 @@ <Joint type="revolute"> <!--DH theta="90" d="0" a="0" alpha="90" unitsangle="degree" unitslength="mm"/--> <axis x="0" y="0" z="-1"/> - <Limits unit="degree" lo="-45" hi="38"/> + <Limits unit="degree" lo="-45" hi="37"/> <MaxVelocity unit="radian" value="1"/> <MaxAcceleration value="10"/> <MaxTorque value="3000"/> diff --git a/data/RobotAPI/robots/Armar3/ArmarIII-RightArm.xml b/data/RobotAPI/robots/Armar3/ArmarIII-RightArm.xml index 3f4b75084f79e4c0567a0dd2ad4d711910cb3898..34e053589c8c97c5522615bc169da0c160426f1f 100644 --- a/data/RobotAPI/robots/Armar3/ArmarIII-RightArm.xml +++ b/data/RobotAPI/robots/Armar3/ArmarIII-RightArm.xml @@ -173,7 +173,7 @@ </Transform> <Joint type="revolute"> <!--DH a="0" d="0" theta="-90" alpha="90" units="degree"/--> - <Limits unit="degree" lo="-31" hi="38"/> + <Limits unit="degree" lo="-31" hi="37"/> <MaxVelocity unit="radian" value="0.5"/> <MaxAcceleration value="10"/> <MaxTorque value="3000"/> diff --git a/source/RobotAPI/components/DebugDrawer/CMakeLists.txt b/source/RobotAPI/components/DebugDrawer/CMakeLists.txt index 0b1f1c08e388326ead4f3b1eab0deea6e7d00817..80523e46f0dff7b0804e34279b300b3316e165ec 100644 --- a/source/RobotAPI/components/DebugDrawer/CMakeLists.txt +++ b/source/RobotAPI/components/DebugDrawer/CMakeLists.txt @@ -7,7 +7,7 @@ armarx_build_if(Eigen3_FOUND "Eigen3 not available") armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available") if (Eigen3_FOUND AND Simox_FOUND) - + setupSimoxExternalLibraries() include_directories( ${Eigen3_INCLUDE_DIR} ${Simox_INCLUDE_DIRS} diff --git a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp index 3a0de019a99a2db556f9d3057d3ef0ae886d8bf5..c88020b14e4efb3061253bd514c66125db7cbe01 100644 --- a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp +++ b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp @@ -23,6 +23,8 @@ #include "DebugDrawerComponent.h" + +#include <VirtualRobot/VirtualRobot.h> #include <VirtualRobot/Visualization/CoinVisualization/CoinVisualizationFactory.h> #include <VirtualRobot/Visualization/CoinVisualization/CoinVisualization.h> #include <Inventor/nodes/SoUnits.h> @@ -1401,7 +1403,7 @@ namespace armarx d.layerName = layerName; d.name = robotName; - for (auto & it : configuration) + for (auto& it : configuration) { d.configuration[it.first] = it.second; } @@ -1448,7 +1450,7 @@ namespace armarx void DebugDrawerComponent::clearAll(const Ice::Current&) { - for (auto & i : layers) + for (auto& i : layers) { clearLayer(i.first); } @@ -1481,57 +1483,57 @@ namespace armarx auto& layer = layers.at(layerName); - for (const auto & i : layer.addedCoordVisualizations) + for (const auto& i : layer.addedCoordVisualizations) { removePoseVisu(layerName, i.first); } - for (const auto & i : layer.addedLineVisualizations) + for (const auto& i : layer.addedLineVisualizations) { removeLineVisu(layerName, i.first); } - for (const auto & i : layer.addedBoxVisualizations) + for (const auto& i : layer.addedBoxVisualizations) { removeBoxVisu(layerName, i.first); } - for (const auto & i : layer.addedTextVisualizations) + for (const auto& i : layer.addedTextVisualizations) { removeTextVisu(layerName, i.first); } - for (const auto & i : layer.addedSphereVisualizations) + for (const auto& i : layer.addedSphereVisualizations) { removeSphereVisu(layerName, i.first); } - for (const auto & i : layer.addedCylinderVisualizations) + for (const auto& i : layer.addedCylinderVisualizations) { removeCylinderVisu(layerName, i.first); } - for (const auto & i : layer.addedPointCloudVisualizations) + for (const auto& i : layer.addedPointCloudVisualizations) { removePointCloudVisu(layerName, i.first); } - for (const auto & i : layer.addedPolygonVisualizations) + for (const auto& i : layer.addedPolygonVisualizations) { removePolygonVisu(layerName, i.first); } - for (const auto & i : layer.addedArrowVisualizations) + for (const auto& i : layer.addedArrowVisualizations) { removeArrowVisu(layerName, i.first); } - for (const auto & i : layer.addedRobotVisualizations) + for (const auto& i : layer.addedRobotVisualizations) { removeRobotVisu(layerName, i.first); } - for (const auto & i : layer.addedCustomVisualizations) + for (const auto& i : layer.addedCustomVisualizations) { removeCustomVisu(layerName, i.first); } @@ -1908,7 +1910,7 @@ namespace armarx ScopedRecursiveLockPtr l = getScopedVisuLock(); StringSequence seq {}; - for (const auto & layer : layers) + for (const auto& layer : layers) { seq.push_back(layer.first); } @@ -1921,7 +1923,7 @@ namespace armarx ::armarx::LayerInformationSequence seq {}; ScopedRecursiveLockPtr l = getScopedVisuLock(); - for (const auto & layer : layers) + for (const auto& layer : layers) { int count = layer.second.addedCoordVisualizations.size() + layer.second.addedLineVisualizations.size() + diff --git a/source/RobotAPI/components/RobotState/CMakeLists.txt b/source/RobotAPI/components/RobotState/CMakeLists.txt index fa39860ac77df6f7e32fd8d86392cd06ba2537b6..246213dd5994fd1a196ebbcb087962382581b6b3 100644 --- a/source/RobotAPI/components/RobotState/CMakeLists.txt +++ b/source/RobotAPI/components/RobotState/CMakeLists.txt @@ -1,8 +1,7 @@ -armarx_set_target("Core Library: ArmarXCoreRobotStateComponent") +armarx_set_target("RobotAPI Library: RobotStateComponent") find_package(Eigen3 QUIET) find_package(Simox ${ArmarX_Simox_VERSION} QUIET) - armarx_build_if(Eigen3_FOUND "Eigen3 not available") armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available") diff --git a/source/RobotAPI/components/units/ForceTorqueObserver.cpp b/source/RobotAPI/components/units/ForceTorqueObserver.cpp index 653bf523d4624394dee8434a86efc07d4f69f824..fb26ce56f3166d15cba8a3565b53c3aa22f8ea82 100644 --- a/source/RobotAPI/components/units/ForceTorqueObserver.cpp +++ b/source/RobotAPI/components/units/ForceTorqueObserver.cpp @@ -82,42 +82,78 @@ void ForceTorqueObserver::onInitObserver() void ForceTorqueObserver::onConnectObserver() { - assignProxy(robot, "RobotStateComponent"); + debugDrawer = getTopic<DebugDrawerInterfacePrx>("DebugDrawerUpdates"); - visualizerTask = new PeriodicTask<ForceTorqueObserver>(this, &ForceTorqueObserver::visualizerFunction, 50, false, "visualizerFunction"); - localRobot = RemoteRobot::createLocalClone(robot); - visualizerTask->start(); + if (getProperty<bool>("VisualizeForce").getValue()) + { + visualizerTask = new PeriodicTask<ForceTorqueObserver>(this, &ForceTorqueObserver::visualizerFunction, getProperty<int>("VisualizeForceUpdateFrequency").getValue(), false, "visualizerFunction"); + visualizerTask->start(); + } } void ForceTorqueObserver::visualizerFunction() { - RemoteRobot::synchronizeLocalClone(localRobot, robot); - auto channels = getAvailableChannels(false); - for(auto& channel : channels) + if (!robot) + { + try + { + assignProxy(robot, "RobotStateComponent"); + } + catch (...) + { + + } + + if (!robot) + { + return; + } + } + + try { - if(localRobot->hasRobotNode(channel.first)) + if (!localRobot) + { + localRobot = RemoteRobot::createLocalClone(robot); + } + if (!localRobot) { - DatafieldRefPtr field = DatafieldRefPtr::dynamicCast(getForceDatafield(channel.first, Ice::Current())); - FramedDirectionPtr value = field->getDataField()->get<FramedDirection>(); - auto force = value->toGlobal(localRobot); -// ARMARX_INFO << deactivateSpam(5,channel.first) << "new force" << channel.first << " : " << force->toEigen(); - - float forceMag = force->toEigen().norm()/100; - forceMag = std::min(1.0f, forceMag); - debugDrawer->setArrowVisu("Forces", - "Force" + channel.first, - new Vector3(localRobot->getRobotNode(channel.first)->getGlobalPose()), - force, - DrawColor{forceMag, 1.0f-forceMag, 0.0f, 0.5f}, - 50, - 5); + return; } - else + float arrowLength = getProperty<float>("MaxForceArrowLength").getValue(); + float forceFactor = getProperty<float>("ForceVisualizerFactor").getValue(); + RemoteRobot::synchronizeLocalClone(localRobot, robot); + auto channels = getAvailableChannels(false); + for (auto& channel : channels) { -// ARMARX_INFO << deactivateSpam(5,channel.first) << "No node name " << channel.first; + if (localRobot->hasRobotNode(channel.first)) + { + DatafieldRefPtr field = DatafieldRefPtr::dynamicCast(getForceDatafield(channel.first, Ice::Current())); + FramedDirectionPtr value = field->getDataField()->get<FramedDirection>(); + auto force = value->toGlobal(localRobot); + // ARMARX_INFO << deactivateSpam(5,channel.first) << "new force" << channel.first << " : " << force->toEigen(); + + float forceMag = force->toEigen().norm() * forceFactor; + forceMag = std::min(1.0f, forceMag); + debugDrawer->setArrowVisu("Forces", + "Force" + channel.first, + new Vector3(localRobot->getRobotNode(channel.first)->getGlobalPose()), + force, + DrawColor {forceMag, 1.0f - forceMag, 0.0f, 0.5f}, + std::max(arrowLength * forceMag, 10.f), + 3); + } + else + { + // ARMARX_INFO << deactivateSpam(5,channel.first) << "No node name " << channel.first; + } } } + catch (...) + { + + } } @@ -132,13 +168,14 @@ void ForceTorqueObserver::offerValue(std::string nodeName, const std::string& ty { FramedDirectionPtr vec = FramedDirectionPtr::dynamicCast(value); - if (!existsChannel(id->channelName)) - { - offerChannel(id->channelName, type + " vectors on specific parts of the robot."); - } + if (!existsDataField(id->channelName, id->datafieldName)) { + if (!existsChannel(id->channelName)) + { + offerChannel(id->channelName, type + " vectors on specific parts of the robot."); + } offerDataFieldWithDefault(id->channelName, id->datafieldName, Variant(value), "3D vector for " + type + " of " + nodeName); } else @@ -272,6 +309,8 @@ DataFieldIdentifierPtr ForceTorqueObserver::getTorqueDatafieldId(const std::stri void ForceTorqueObserver::onExitObserver() { - if(visualizerTask) + if (visualizerTask) + { visualizerTask->stop(); + } } diff --git a/source/RobotAPI/components/units/ForceTorqueObserver.h b/source/RobotAPI/components/units/ForceTorqueObserver.h index ca2f27cc632d4be8d85676e4aba158accc60b929..8cf255be21512233a4d8caf8f3c836c5a4a4fd40 100644 --- a/source/RobotAPI/components/units/ForceTorqueObserver.h +++ b/source/RobotAPI/components/units/ForceTorqueObserver.h @@ -42,6 +42,10 @@ namespace armarx ComponentPropertyDefinitions(prefix) { defineRequiredProperty<std::string>("ForceTorqueTopicName", "Name of the ForceTorqueUnit Topic"); + defineOptionalProperty<bool>("VisualizeForce", true, "Visualize the force with an arrow in the debug drawer"); + defineOptionalProperty<int>("VisualizeForceUpdateFrequency", 20, "Frequency with which the force is visualized"); + defineOptionalProperty<float>("ForceVisualizerFactor", 0.01, "Factor by which the forces are scaled to fit into 0..1 (only for visulization) "); + defineOptionalProperty<float>("MaxForceArrowLength", 150, "Length of the force visu arrow in mm"); } }; diff --git a/source/RobotAPI/components/units/HapticObserver.cpp b/source/RobotAPI/components/units/HapticObserver.cpp index ed10cc0355424c71e974b67d624b754d92991d7d..2ad4e48737c6b673804c79d5b6e90b0fd8e02d8b 100644 --- a/source/RobotAPI/components/units/HapticObserver.cpp +++ b/source/RobotAPI/components/units/HapticObserver.cpp @@ -39,7 +39,6 @@ void HapticObserver::onInitObserver() offerConditionCheck("larger", new ConditionCheckLarger()); offerConditionCheck("equals", new ConditionCheckEquals()); offerConditionCheck("smaller", new ConditionCheckSmaller()); - } void HapticObserver::onConnectObserver() @@ -55,7 +54,14 @@ void HapticObserver::onExitObserver() void HapticObserver::reportSensorValues(const std::string& device, const std::string& name, const armarx::MatrixFloatBasePtr& values, const armarx::TimestampBasePtr& timestamp, const Ice::Current&) { ScopedLock lock(dataMutex); + MatrixFloatPtr matrix = MatrixFloatPtr::dynamicCast(values); + if (matrix->cols == 0) + { + // Empty matrix received, silently ignore + return; + } + TimestampVariantPtr timestampPtr = TimestampVariantPtr::dynamicCast(timestamp); Eigen::MatrixXf eigenMatrix = matrix->toEigen(); float max = eigenMatrix.maxCoeff(); 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/PlatformUnitObserver.h b/source/RobotAPI/components/units/PlatformUnitObserver.h index 5589e366c3d49e004e83fce534fe842b0c7117b4..9b4709a0d0fe816e06db3412780dfac819310536 100644 --- a/source/RobotAPI/components/units/PlatformUnitObserver.h +++ b/source/RobotAPI/components/units/PlatformUnitObserver.h @@ -20,8 +20,8 @@ * GNU General Public License */ -#ifndef _ARMARX_CORE_KINEMATIC_UNIT_OBSERVER_H -#define _ARMARX_CORE_KINEMATIC_UNIT_OBSERVER_H +#ifndef _ARMARX_CORE_PLATFORM_UNIT_OBSERVER_H +#define _ARMARX_CORE_PLATFORM_UNIT_OBSERVER_H #include <ArmarXCore/core/system/ImportExport.h> #include <ArmarXCore/core/Component.h> diff --git a/source/RobotAPI/components/units/PlatformUnitSimulation.h b/source/RobotAPI/components/units/PlatformUnitSimulation.h index 0e9bb1fc683262e4117b7fae14d1a83ce9ec4a87..b4afb8c37c35aa9dd29ad146631d96d64c155bc0 100644 --- a/source/RobotAPI/components/units/PlatformUnitSimulation.h +++ b/source/RobotAPI/components/units/PlatformUnitSimulation.h @@ -20,8 +20,8 @@ * GNU General Public License */ -#ifndef _ARMARX_COMPONENT_KINEMATIC_UNIT_SIMULATION_H -#define _ARMARX_COMPONENT_KINEMATIC_UNIT_SIMULATION_H +#ifndef _ARMARX_COMPONENT_PLATFORM_UNIT_SIMULATION_H +#define _ARMARX_COMPONENT_PLATFORM_UNIT_SIMULATION_H #include "PlatformUnit.h" 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/gui-plugins/HapticUnitPlugin/MatrixDatafieldDisplayWidget.h b/source/RobotAPI/gui-plugins/HapticUnitPlugin/MatrixDatafieldDisplayWidget.h index 76c0d573ccc91d4d850e96476ec4604b05fb1d31..d24da08e71f8bf8eb529bb2052502e091246accc 100644 --- a/source/RobotAPI/gui-plugins/HapticUnitPlugin/MatrixDatafieldDisplayWidget.h +++ b/source/RobotAPI/gui-plugins/HapticUnitPlugin/MatrixDatafieldDisplayWidget.h @@ -1,5 +1,5 @@ -#ifndef MATRIXDISPLAYWIDGET_H -#define MATRIXDISPLAYWIDGET_H +#ifndef MATRIXDATAFIELDDISPLAYWIDGET_H +#define MATRIXDATAFIELDDISPLAYWIDGET_H #include <QWidget> #include <QMutex> 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"); + } };