diff --git a/source/RobotAPI/components/robotstate/RobotStateComponent.cpp b/source/RobotAPI/components/robotstate/RobotStateComponent.cpp index d4a171a3ccfeaa8699d61e0e3696bb28b37dc07f..ed04fbe08d91fb059874831e3e010da89e06783e 100644 --- a/source/RobotAPI/components/robotstate/RobotStateComponent.cpp +++ b/source/RobotAPI/components/robotstate/RobotStateComponent.cpp @@ -58,8 +58,8 @@ namespace armarx void RobotStateComponent::onInitComponent() { - robotFile = getProperty<std::string>("RobotFileName").getValue(); - if (!ArmarXDataPath::getAbsolutePath(robotFile,robotFile)) + relativeRobotFile = getProperty<std::string>("RobotFileName").getValue(); + if (!ArmarXDataPath::getAbsolutePath(relativeRobotFile,robotFile)) { throw UserException("Could not find robot file " + robotFile); } @@ -181,7 +181,7 @@ namespace armarx std::string RobotStateComponent::getRobotFilename(const Ice::Current&) const { - return robotFile; + return relativeRobotFile; } void RobotStateComponent::reportControlModeChanged(const NameControlModeMap& jointModes, bool aValueChanged,const Current& c){} diff --git a/source/RobotAPI/components/robotstate/RobotStateComponent.h b/source/RobotAPI/components/robotstate/RobotStateComponent.h index 80d9ec37bceea376ae17a87338246df463eef2ea..ab2f9f22013fb129140ef18b76d2c3469d0cc4aa 100644 --- a/source/RobotAPI/components/robotstate/RobotStateComponent.h +++ b/source/RobotAPI/components/robotstate/RobotStateComponent.h @@ -139,6 +139,7 @@ namespace armarx SharedRobotServantPtr _sharedRobotServant; VirtualRobot::RobotPtr _synchronized; std::string robotFile; + std::string relativeRobotFile; RobotStateObserverPtr robotStateObs;