28#include <SimoxUtility/algorithm/string/string_tools.h>
29#include <VirtualRobot/Nodes/RobotNode.h>
30#include <VirtualRobot/RobotNodeSet.h>
31#include <VirtualRobot/VirtualRobot.h>
32#include <VirtualRobot/VirtualRobotException.h>
33#include <VirtualRobot/XML/RobotIO.h>
50 std::vector<std::string> result;
52 std::set<std::string> packageSet{packages.begin(), packages.end()};
54 packageSet.emplace(project);
66 Ice::StringSeq includePaths;
73 Ice::StringSeq projectIncludePaths = simox::alg::split(pathsString,
";,");
75 includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end());
80 throw UserException(
"Could not find robot file " + robotFile);
87 VirtualRobot::RobotIO::loadRobot(robotFile, VirtualRobot::RobotIO::eStructure);
89 catch (VirtualRobot::VirtualRobotException& e)
91 throw UserException(e.what());
97 throw UserException(
"RobotNodeSet not defined");
101 robotNodes = robotNodeSetPtr->getAllRobotNodes();
130 const Ice::Current&
c)
141 const Ice::Current&
c)
148 NameControlModeMap
c;
150 for (
const auto& j : getJoints())
152 c[j] = ControlMode::ePositionControl;
162 NameControlModeMap
c;
164 for (
const auto& j : getJoints())
166 c[j] = ControlMode::eVelocityControl;
191 std::vector<std::string>
202 return robot->getName();
206 throw NotInitializedException(
"Robot Ptr is NULL",
"getName");
215 throw NotInitializedException(
"RobotNodeSetName is empty",
"getRobotNodeSetName");
static const std::string & GetProjectName()
static const Ice::StringSeq & GetProjectDependencies()
static bool getAbsolutePath(const std::string &relativeFilename, std::string &storeAbsoluteFilename, const std::vector< std::string > &additionalSearchPaths={}, bool verbose=true)
The CMakePackageFinder class provides an interface to the CMake Package finder capabilities.
std::string getDataDir() const
void offeringTopicFromProperty(const std::string &propertyName)
Offer a topic whose name is specified by the given property.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Property< PropertyType > getProperty(const std::string &name)
std::string getRobotName(const Ice::Current &=Ice::emptyCurrent) const override
void onInitComponent() override
Pure virtual hook for the subclass.
void setJointVelocitiesToZero()
virtual void onStartKinematicUnit()=0
VirtualRobot::RobotPtr robot
std::vector< std::string > armarXPackages
std::string relativeRobotFile
void setJointAngles(const NameValueMap &targetJointAngles, const Ice::Current &c=Ice::emptyCurrent) override
void switchControlMode(const NameControlModeMap &targetJointModes, const Ice::Current &c=Ice::emptyCurrent) override
virtual void releaseKinematicUnit(const Ice::StringSeq &nodes, const Ice::Current &c=Ice::emptyCurrent)
std::vector< VirtualRobot::RobotNodePtr > robotNodes
std::vector< std::string > getArmarXPackages(const Ice::Current &=Ice::emptyCurrent) const override
getArmarXPackages
std::string robotNodeSetName
virtual void requestKinematicUnit(const Ice::StringSeq &nodes, const Ice::Current &c=Ice::emptyCurrent)
void onConnectComponent() override
Pure virtual hook for the subclass.
virtual void onExitKinematicUnit()=0
PropertyDefinitionsPtr createPropertyDefinitions() override
virtual void onInitKinematicUnit()=0
void onExitComponent() override
Hook for subclass.
std::string getRobotFilename(const Ice::Current &=Ice::emptyCurrent) const override
KinematicUnitListenerPrx listenerPrx
std::string getRobotNodeSetName(const Ice::Current &=Ice::emptyCurrent) const override
void setJointVelocities(const NameValueMap &targetJointVelocities, const Ice::Current &c=Ice::emptyCurrent) override
void setJointAnglesToZero()
std::string getReportTopicName(const Ice::Current &=Ice::emptyCurrent) const override
void offeringTopic(const std::string &name)
Registers a topic for retrival after initialization.
TopicProxyType getTopic(const std::string &name)
Returns a proxy of the specified topic.
void release(const Ice::Current &c=Ice::emptyCurrent) override
Release exclusive access to current unit.
void request(const Ice::Current &c=Ice::emptyCurrent) override
Request exclusive access to current unit.
#define ARMARX_INFO
The normal logging level.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
const LogSender::manipulator flush