diff --git a/source/RobotAPI/components/units/TCPControlUnit.cpp b/source/RobotAPI/components/units/TCPControlUnit.cpp index ccc88e9923269ba39be462610c3ca4fabbb92eaf..f21bd0df271cd8900bec881e4e38c9750fe402eb 100644 --- a/source/RobotAPI/components/units/TCPControlUnit.cpp +++ b/source/RobotAPI/components/units/TCPControlUnit.cpp @@ -74,14 +74,14 @@ namespace armarx //remoteRobotPrx = robotStateComponentPrx->getSynchronizedRobot(); - + robotName = robotStateComponentPrx->getRobotName(); localRobot = RemoteRobot::createLocalClone(robotStateComponentPrx); jointExistenceCheckRobot = RemoteRobot::createLocalClone(robotStateComponentPrx); localReportRobot = localRobot->clone(localRobot->getName()); std::string nodesetsString = getProperty<std::string>("TCPsToReport").getValue(); - + nodesToReport.clear(); if (!nodesetsString.empty()) { if (nodesetsString == "*") @@ -1356,7 +1356,7 @@ void armarx::TCPControlUnit::reportJointAngles(const NameValueMap& jointAngles, RobotNodePtr& node = nodesToReport.at(i); const std::string& tcpName = node->getName(); const Eigen::Matrix4f& currentPose = node->getPoseInRootFrame(); - tcpPoses[tcpName] = new FramedPose(currentPose, rootFrame, localReportRobot->getName()); + tcpPoses[tcpName] = new FramedPose(currentPose, rootFrame, robotName); } @@ -1376,7 +1376,7 @@ void armarx::TCPControlUnit::reportJointVelocities(const NameValueMap& jointVel, if (!localVelReportRobot) { - localVelReportRobot = localReportRobot->clone(localReportRobot->getName()); + localVelReportRobot = localReportRobot->clone(robotName); } // ARMARX_DEBUG << jointVel; FramedPoseBaseMap tcpPoses; @@ -1391,7 +1391,7 @@ void armarx::TCPControlUnit::reportJointVelocities(const NameValueMap& jointVel, RobotNodePtr node = nodesToReport.at(i); const std::string& tcpName = node->getName(); const Eigen::Matrix4f& currentPose = node->getPoseInRootFrame(); - tcpPoses[tcpName] = new FramedPose(currentPose, rootFrame, localReportRobot->getName()); + tcpPoses[tcpName] = new FramedPose(currentPose, rootFrame, robotName); } @@ -1427,7 +1427,7 @@ void armarx::TCPControlUnit::reportJointVelocities(const NameValueMap& jointVel, VirtualRobot::MathTools::eigen4f2rpy(mat, rpy); // Eigen::AngleAxisf orient(rot.block<3,3>(0,0)); - tcpOrientationVelocities[tcpName] = new FramedDirection(rpy / tDelta, rootFrame, localReportRobot->getName()); + tcpOrientationVelocities[tcpName] = new FramedDirection(rpy / tDelta, rootFrame, robotName); } diff --git a/source/RobotAPI/components/units/TCPControlUnit.h b/source/RobotAPI/components/units/TCPControlUnit.h index 7611446f35eb6ab1057d8268aebece3cdcf4f75f..10d8bde11f64aa0baf168d2e7c167e1d2d8603e0 100644 --- a/source/RobotAPI/components/units/TCPControlUnit.h +++ b/source/RobotAPI/components/units/TCPControlUnit.h @@ -194,7 +194,7 @@ namespace armarx PeriodicTask<TCPControlUnit>::pointer_type execTask; PeriodicTask<TCPControlUnit>::pointer_type topicTask; - + std::string robotName; RobotStateComponentInterfacePrx robotStateComponentPrx; KinematicUnitInterfacePrx kinematicUnitPrx; VirtualRobot::RobotPtr jointExistenceCheckRobot;