17 #ifndef XML_TESTDATA_LOADER_H 18 #define XML_TESTDATA_LOADER_H 26 #include <boost/property_tree/ptree.hpp> 30 namespace pt = boost::property_tree;
108 const moveit::core::RobotModelConstPtr& robot_model);
113 const std::string &group_name)
const override;
116 const std::string &group_name)
const override;
143 const pt::ptree::value_type &
findNodeWithName(
const boost::property_tree::ptree &tree,
144 const std::string &
name,
145 const std::string &key,
146 const std::string &path =
"")
const;
151 const pt::ptree::value_type &
findCmd(
const std::string &cmd_name,
152 const std::string& cmd_path,
153 const std::string &cmd_key)
const;
159 const std::string &planning_group)
const;
163 const std::string &group_name)
const;
169 inline static std::vector<double>
strVec2doubleVec(std::vector<std::string> &strVec);
204 std::vector<double>
vec;
206 vec.resize(strVec.size());
207 std::transform(strVec.begin(), strVec.end(), vec.begin(), [](
const std::string& val)
209 return std::stod(val);
219 #endif // XML_TESTDATA_LOADER_H static std::vector< double > strVec2doubleVec(std::vector< std::string > &strVec)
Converts string vector to double vector.
virtual CircInterimCart getCircCartInterimCart(const std::string &cmd_name) const override
std::map< std::string, AbstractCmdGetterUPtr > cmd_getter_funcs_
CartesianInterim getCartesianInterim(const std::string &cmd_name, const std::string &planning_group) const
virtual LinCart getLinCart(const std::string &cmd_name) const override
const pt::ptree empty_tree_
virtual ~AbstractCmdGetterAdapter()=default
virtual CircCenterCart getCircCartCenterCart(const std::string &cmd_name) const override
Returns the command with the specified name from the test data.
std::unique_ptr< TestdataLoader > XmlTestDataLoaderUPtr
Data class storing all information regarding a Circ command.
virtual LinJoint getLinJoint(const std::string &cmd_name) const override
Returns the command with the specified name from the test data.
virtual PtpCart getPtpCart(const std::string &cmd_name) const override
virtual LinJointCart getLinJointCart(const std::string &cmd_name) const override
boost::variant< PtpJoint, PtpJointCart, PtpCart, LinJoint, LinCart, CircCenterCart, CircInterimCart, CircJointCenterCart, CircJointInterimCart, Gripper > CmdVariant
Implements a test data loader which uses a xml file to store the test data.
Data class storing all information regarding a linear command.
Abstract base class providing a GENERIC getter-function signature which can be used to load DIFFERENT...
Class to define a robot configuration in space with the help of joint values.
virtual JointConfiguration getJoints(const std::string &pos_name, const std::string &group_name) const override
virtual Sequence getSequence(const std::string &cmd_name) const override
Returns the command with the specified name from the test data.
const pt::ptree::value_type & findNodeWithName(const boost::property_tree::ptree &tree, const std::string &name, const std::string &key, const std::string &path="") const
Use this function to search for a node (like an pos or cmd) with a given name.
std::string path_filename_
Data class storing all information regarding a Sequence command.
virtual CircJointCenterCart getCircJointCenterCart(const std::string &cmd_name) const override
virtual CmdVariant getCmd(const std::string &) const =0
virtual CircJointInterimCart getCircJointInterimCart(const std::string &cmd_name) const override
const pt::ptree::value_type empty_value_type_
Abstract base class describing the interface to access test data like robot poses and robot commands...
const pt::ptree::value_type & findCmd(const std::string &cmd_name, const std::string &cmd_path, const std::string &cmd_key) const
Use this function to search for a cmd-node with a given name.
Class to define a point on the circle on which the robot is supposed to move via circ command...
virtual CartesianConfiguration getPose(const std::string &pos_name, const std::string &group_name) const override
Class to define a robot configuration in space with the help of cartesian coordinates.
Class to define the center point of the circle on which the robot is supposed to move via circ comman...
virtual Gripper getGripper(const std::string &cmd_name) const override
Returns the command with the specified name from the test data.
XmlTestdataLoader(const std::string &path_filename)
virtual PtpJointCart getPtpJointCart(const std::string &cmd_name) const override
CartesianCenter getCartesianCenter(const std::string &cmd_name, const std::string &planning_group) const
std::unique_ptr< AbstractCmdGetterAdapter > AbstractCmdGetterUPtr
virtual PtpJoint getPtpJoint(const std::string &cmd_name) const override
Returns the command with the specified name from the test data.