1#ifndef INCLUDE_TINYURDF_POSE_POSE_PARSER_H_
2#define INCLUDE_TINYURDF_POSE_POSE_PARSER_H_
24 this->p_ = std::make_shared<Pose>();
27 void print(std::ostream& os)
override {
28 os <<
"Parsed Pose = [";
45 bool isA(
const char* name)
override {
49 void parse(
const tinyxml2::XMLElement* xml)
override {
52 const char* xyz_str = xml->Attribute(
"xyz");
53 const char* rpy_str = xml->Attribute(
"rpy");
58 p_->setPosition(v[0], v[1], v[2]);
64 p_->setRotation(r[0], r[1], r[2]);
68 std::shared_ptr<Pose>
get()
override {
73 std::shared_ptr<Pose> p_;
Definition parser_base.h:16
virtual void parse(const tinyxml2::XMLElement *xml)
Definition parser_base.h:27
Elementary parser for minimal pose description.
Definition pose_parser.h:21
void clear() override
Definition pose_parser.h:37
PoseParser()
Definition pose_parser.h:23
std::shared_ptr< Pose > get() override
Definition pose_parser.h:68
void parse(const tinyxml2::XMLElement *xml) override
Definition pose_parser.h:49
const char * getTypename() override
Definition pose_parser.h:41
bool empty() const override
Definition pose_parser.h:33
void print(std::ostream &os) override
Definition pose_parser.h:27
bool isA(const char *name) override
Definition pose_parser.h:45
void str2array(const char *str, double *arr)
Definition utils.cc:3