diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp index af6a391295c5dd8326addd850613584344237452..14eee8730cfcdb657f704de37b0729b18557e25b 100644 --- a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp +++ b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp @@ -141,20 +141,6 @@ namespace armarx { ARMARX_WARNING << "Failed to read robot info from file: " << robotFile; } - - - /*VirtualRobot::RobotNodeSetPtr pns = this->_synchronized->getRobotNodeSet("Platform"); - if (pns) - { - usingTopic("PlatformState"); - vector<RobotNodePtr> nodes = pns->getAllRobotNodes(); - - ARMARX_VERBOSE << "Using RobotNodeSet Platform with " << nodes.size() << " robot nodes."; - BOOST_FOREACH(RobotNodePtr node, nodes) - { - ARMARX_VERBOSE << "Node: " << node->getName() << endl; - } - }*/ } void RobotStateComponent::readRobotInfo(const std::string& robotFile) @@ -199,7 +185,7 @@ namespace armarx } - SharedRobotInterfacePrx RobotStateComponent::getSynchronizedRobot(const Current& current) const + SharedRobotInterfacePrx RobotStateComponent::getSynchronizedRobot(const Current&) const { if (!this->_synchronizedPrx) { @@ -210,7 +196,7 @@ namespace armarx } - SharedRobotInterfacePrx RobotStateComponent::getRobotSnapshot(const std::string& time, const Current& current) + SharedRobotInterfacePrx RobotStateComponent::getRobotSnapshot(const std::string& time, const Current&) { if (!_synchronized) { @@ -219,7 +205,7 @@ namespace armarx auto clone = this->_synchronized->clone(_synchronized->getName()); - SharedRobotServantPtr p = new SharedRobotServant(clone, RobotStateComponentInterfacePrx::uncheckedCast(getProxy()), NULL); + SharedRobotServantPtr p = new SharedRobotServant(clone, RobotStateComponentInterfacePrx::uncheckedCast(getProxy()), nullptr); p->setTimestamp(IceUtil::Time::microSecondsDouble(_sharedRobotServant->getTimestamp()->timestamp)); auto result = getObjectAdapter()->addWithUUID(p); // virtal robot clone is buggy -> set global pose here @@ -227,7 +213,7 @@ namespace armarx return SharedRobotInterfacePrx::uncheckedCast(result); } - SharedRobotInterfacePrx RobotStateComponent::getRobotSnapshotAtTimestamp(double time, const Current& current) + SharedRobotInterfacePrx RobotStateComponent::getRobotSnapshotAtTimestamp(double time, const Current&) { if (!_synchronized) { @@ -238,12 +224,13 @@ namespace armarx RobotStateConfig config; if (!interpolate(time, config)) { - ARMARX_WARNING << "Could not find or interpolate a robot state for time " << IceUtil::Time::microSeconds(time).toDateTime(); - return NULL; + ARMARX_WARNING << "Could not find or interpolate a robot state for time " + << IceUtil::Time::microSeconds(static_cast<int>(time)).toDateTime(); + return nullptr; } clone->setJointValues(config.jointMap); - SharedRobotServantPtr p = new SharedRobotServant(clone, RobotStateComponentInterfacePrx::uncheckedCast(getProxy()), NULL); + SharedRobotServantPtr p = new SharedRobotServant(clone, RobotStateComponentInterfacePrx::uncheckedCast(getProxy()), nullptr); p->setTimestamp(IceUtil::Time::microSecondsDouble(time)); auto result = getObjectAdapter()->addWithUUID(p); // virtal robot clone is buggy -> set global pose here @@ -414,23 +401,23 @@ namespace armarx return result; } - void RobotStateComponent::reportControlModeChanged(const NameControlModeMap& jointModes, Ice::Long timestamp, bool aValueChanged, const Current& c) {} - void RobotStateComponent::reportJointVelocities(const NameValueMap& jointVelocities, Ice::Long timestamp, bool aValueChanged, const Current& c) + void RobotStateComponent::reportControlModeChanged(const NameControlModeMap& jointModes, Ice::Long timestamp, bool aValueChanged, const Current&) {} + void RobotStateComponent::reportJointVelocities(const NameValueMap& jointVelocities, Ice::Long timestamp, bool aValueChanged, const Current&) { if (robotStateObs) { robotStateObs->updateNodeVelocities(jointVelocities, timestamp); } } - void RobotStateComponent::reportJointTorques(const NameValueMap& jointTorques, Ice::Long timestamp, bool aValueChanged, const Current& c) {} + void RobotStateComponent::reportJointTorques(const NameValueMap& jointTorques, Ice::Long timestamp, bool aValueChanged, const Current&) {} - void RobotStateComponent::reportJointAccelerations(const NameValueMap& jointAccelerations, Ice::Long timestamp, bool aValueChanged, const Current& c) + void RobotStateComponent::reportJointAccelerations(const NameValueMap& jointAccelerations, Ice::Long timestamp, bool aValueChanged, const Current&) { } - void RobotStateComponent::reportJointCurrents(const NameValueMap& jointCurrents, Ice::Long timestamp, bool aValueChanged, const Current& c) {} - void RobotStateComponent::reportJointMotorTemperatures(const NameValueMap& jointMotorTemperatures, Ice::Long timestamp, bool aValueChanged, const Current& c) {} - void RobotStateComponent::reportJointStatuses(const NameStatusMap& jointStatuses, Ice::Long timestamp, bool aValueChanged, const Current& c) {} + void RobotStateComponent::reportJointCurrents(const NameValueMap& jointCurrents, Ice::Long timestamp, bool aValueChanged, const Current&) {} + void RobotStateComponent::reportJointMotorTemperatures(const NameValueMap& jointMotorTemperatures, Ice::Long timestamp, bool aValueChanged, const Current&) {} + void RobotStateComponent::reportJointStatuses(const NameStatusMap& jointStatuses, Ice::Long timestamp, bool aValueChanged, const Current&) {} PropertyDefinitionsPtr RobotStateComponent::createPropertyDefinitions() { @@ -469,4 +456,5 @@ namespace armarx { return robotStateTopicName; } + }