diff --git a/source/RobotAPI/libraries/armem_robot_state/CMakeLists.txt b/source/RobotAPI/libraries/armem_robot_state/CMakeLists.txt index 6599139bf53c297b40ace942af30416e01ccda24..498a422fb201bf435cfb8ddbfdc43b71ba1944a0 100644 --- a/source/RobotAPI/libraries/armem_robot_state/CMakeLists.txt +++ b/source/RobotAPI/libraries/armem_robot_state/CMakeLists.txt @@ -26,7 +26,6 @@ armarx_add_library( ./client/common/RobotReader.h ./client/common/VirtualRobotReader.h - ./client/common/VirtualRobotHelper.h ./client/localization/interfaces.h ./client/localization/TransformReader.h @@ -50,8 +49,6 @@ armarx_add_library( ./client/common/RobotReader.cpp ./client/common/VirtualRobotReader.cpp - ./client/common/VirtualRobotHelper.cpp - ./client/localization/TransformReader.cpp ./client/localization/TransformWriter.cpp diff --git a/source/RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotHelper.cpp b/source/RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotHelper.cpp deleted file mode 100644 index c2cf87007cc887947c959daefa8c0d8f99128e77..0000000000000000000000000000000000000000 --- a/source/RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotHelper.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "VirtualRobotHelper.h" -#include "ArmarXCore/core/rapidxml/wrapper/RapidXmlReader.h" - -#include <VirtualRobot/Robot.h> - -namespace armarx -{ - VirtualRobotHelper::VirtualRobotHelper(const VirtualRobot::RobotPtr& robot): robot(robot) {} - - RobotInfoNodePtr VirtualRobotHelper::readRobotInfo() const - { - RapidXmlReaderPtr reader = RapidXmlReader::FromFile(robot->getFilename()); - RapidXmlReaderNode robotNode = reader->getRoot("Robot"); - return readRobotInfo(robotNode.first_node("RobotInfo")); - } - - RobotInfoNodePtr VirtualRobotHelper::readRobotInfo(const RapidXmlReaderNode& infoNode) const - { - std::string name = infoNode.name(); - std::string profile = infoNode.attribute_value_or_default("profile", ""); - std::string value = infoNode.attribute_value_or_default("value", ""); - //ARMARX_IMPORTANT << "name: " << name << "; profile: " << profile << "; value: " << value; - std::vector<RobotInfoNodePtr> children; - for (const RapidXmlReaderNode& childNode : infoNode.nodes()) - { - children.push_back(readRobotInfo(childNode)); - } - return new RobotInfoNode(name, profile, value, children); - } -} // namespace armarx \ No newline at end of file diff --git a/source/RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotHelper.h b/source/RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotHelper.h deleted file mode 100644 index 199cd650afb7a5d0f5ff9832c303cb260abcda63..0000000000000000000000000000000000000000 --- a/source/RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotHelper.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * ArmarX is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @author Fabian Reister ( fabian dot reister at kit dot edu ) - * @date 2021 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - -#include <VirtualRobot/VirtualRobot.h> - -#include <RobotAPI/interface/core/RobotState.h> - -namespace armarx -{ - - class RapidXmlReaderNode; - - /** - * @brief The VirtualRobotHelper class. - * - * Provides access to additional data stored in the robot's XML file that is not part - * of the VirtualRobot::Robot data structure. - * - * Formerly, this functionality was part of armarx::RobotStateComponent. - */ - class VirtualRobotHelper - { - public: - VirtualRobotHelper(const VirtualRobot::RobotPtr& robot); - - RobotInfoNodePtr readRobotInfo() const; - - private: - RobotInfoNodePtr readRobotInfo(const RapidXmlReaderNode& infoNode) const; - - VirtualRobot::RobotPtr robot; - }; - -} // namespace armarx \ No newline at end of file