Skip to content
Snippets Groups Projects
Commit b492a8e8 authored by Fabian Reister's avatar Fabian Reister
Browse files

deleting files

parent a4d58fc7
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,6 @@ armarx_add_library( ...@@ -26,7 +26,6 @@ armarx_add_library(
./client/common/RobotReader.h ./client/common/RobotReader.h
./client/common/VirtualRobotReader.h ./client/common/VirtualRobotReader.h
./client/common/VirtualRobotHelper.h
./client/localization/interfaces.h ./client/localization/interfaces.h
./client/localization/TransformReader.h ./client/localization/TransformReader.h
...@@ -50,8 +49,6 @@ armarx_add_library( ...@@ -50,8 +49,6 @@ armarx_add_library(
./client/common/RobotReader.cpp ./client/common/RobotReader.cpp
./client/common/VirtualRobotReader.cpp ./client/common/VirtualRobotReader.cpp
./client/common/VirtualRobotHelper.cpp
./client/localization/TransformReader.cpp ./client/localization/TransformReader.cpp
./client/localization/TransformWriter.cpp ./client/localization/TransformWriter.cpp
......
#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
/*
* 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment