43#include <boost/property_tree/ptree.hpp>
47namespace pt = boost::property_tree;
123 XmlTestdataLoader(
const std::string& path_filename,
const moveit::core::RobotModelConstPtr& robot_model);
156 const pt::ptree::value_type& findNodeWithName(
const boost::property_tree::ptree& tree,
const std::string& name,
157 const std::string& key,
const std::string& path =
"")
const;
162 const pt::ptree::value_type& findCmd(
const std::string& cmd_name,
const std::string& cmd_path,
163 const std::string& cmd_key)
const;
165 CartesianCenter getCartesianCenter(
const std::string& cmd_name,
const std::string& planning_group)
const;
167 CartesianInterim getCartesianInterim(
const std::string& cmd_name,
const std::string& planning_group)
const;
176 static inline std::vector<double> strVec2doubleVec(std::vector<std::string>& strVec);
198 std::string path_filename_;
201 using AbstractCmdGetterUPtr = std::unique_ptr<AbstractCmdGetterAdapter>;
208 std::map<std::string, AbstractCmdGetterUPtr> cmd_getter_funcs_;
211 const pt::ptree::value_type empty_value_type_{};
212 const pt::ptree empty_tree_{};
215std::vector<double> XmlTestdataLoader::strVec2doubleVec(std::vector<std::string>& strVec)
217 std::vector<double> vec;
219 vec.resize(strVec.size());
220 std::transform(strVec.begin(), strVec.end(), vec.begin(), [](
const std::string& val) { return std::stod(val); });
Class to define a robot configuration in space with the help of cartesian coordinates.
Class to define a robot configuration in space with the help of joint values.
Data class storing all information regarding a Sequence command.
AbstractCmdGetterAdapter()=default
AbstractCmdGetterAdapter(const AbstractCmdGetterAdapter &)=default
virtual CmdVariant getCmd(const std::string &) const =0
AbstractCmdGetterAdapter(AbstractCmdGetterAdapter &&)=default
virtual ~AbstractCmdGetterAdapter()=default
AbstractCmdGetterAdapter & operator=(AbstractCmdGetterAdapter &&)=default
AbstractCmdGetterAdapter & operator=(const AbstractCmdGetterAdapter &)=default
CircCenterCart getCircCartCenterCart(const std::string &cmd_name) const override
Returns the command with the specified name from the test data.
JointConfiguration getJoints(const std::string &pos_name, const std::string &group_name) const override
LinJointCart getLinJointCart(const std::string &cmd_name) const override
PtpCart getPtpCart(const std::string &cmd_name) const override
CircInterimCart getCircCartInterimCart(const std::string &cmd_name) const override
~XmlTestdataLoader() override
CartesianConfiguration getPose(const std::string &pos_name, const std::string &group_name) const override
PtpJointCart getPtpJointCart(const std::string &cmd_name) const override
XmlTestdataLoader(const std::string &path_filename)
LinCart getLinCart(const std::string &cmd_name) const override
LinJoint getLinJoint(const std::string &cmd_name) const override
Returns the command with the specified name from the test data.
CircJointCenterCart getCircJointCenterCart(const std::string &cmd_name) const override
CircJointInterimCart getCircJointInterimCart(const std::string &cmd_name) const override
Sequence getSequence(const std::string &cmd_name) const override
Returns the command with the specified name from the test data.
Gripper getGripper(const std::string &cmd_name) const override
Returns the command with the specified name from the test data.
PtpJoint getPtpJoint(const std::string &cmd_name) const override
Returns the command with the specified name from the test data.
std::unique_ptr< TestdataLoader > XmlTestDataLoaderUPtr
Lin< JointConfiguration, CartesianConfiguration > LinJointCart
Interim< CartesianConfiguration, CartesianPathConstraintsBuilder > CartesianInterim
Circ< CartesianConfiguration, CartesianCenter, CartesianConfiguration > CircCenterCart
Lin< CartesianConfiguration, CartesianConfiguration > LinCart
Lin< JointConfiguration, JointConfiguration > LinJoint
Circ< CartesianConfiguration, CartesianInterim, CartesianConfiguration > CircInterimCart
std::variant< PtpJoint, PtpJointCart, PtpCart, LinJoint, LinCart, CircCenterCart, CircInterimCart, CircJointCenterCart, CircJointInterimCart, Gripper > CmdVariant
Ptp< CartesianConfiguration, CartesianConfiguration > PtpCart
Ptp< JointConfiguration, CartesianConfiguration > PtpJointCart
Ptp< JointConfiguration, JointConfiguration > PtpJoint
Circ< JointConfiguration, CartesianCenter, JointConfiguration > CircJointCenterCart
Center< CartesianConfiguration, CartesianPathConstraintsBuilder > CartesianCenter
Circ< JointConfiguration, CartesianInterim, JointConfiguration > CircJointInterimCart