33 #ifndef DART_UTILS_MJCF_DETAIL_BODY_HPP_
34 #define DART_UTILS_MJCF_DETAIL_BODY_HPP_
48 namespace MjcfParser {
62 const std::string&
getName()
const;
120 tinyxml2::XMLElement* element,
123 const Default* currentDefault);
137 const std::vector<Geom>& geoms,
const Compiler& compiler);
std::size_t index
Definition: SkelParser.cpp:1672
std::size_t getNumJoints() const
Returns the number of <joint> elements.
Definition: Body.cpp:352
Eigen::Isometry3d mWorldTransform
Definition: Body.hpp:149
const Eigen::Isometry3d & getWorldTransform() const
Returns the world transform of this <body>.
Definition: Body.cpp:420
bool mMocap
If this attribute is "true", the body is labeled as a mocap body.
Definition: Body.hpp:145
std::size_t getNumSites() const
Returns the number of <site> elements.
Definition: Body.cpp:388
Errors compile(const Compiler &compiler)
Updates attributes and elements that require the preprocessed child elements of this <body>.
Definition: Body.cpp:186
std::size_t getNumChildBodies() const
Returns the number of child <body> elements.
Definition: Body.cpp:364
std::vector< Body > mChildBodies
Definition: Body.hpp:156
const Body & getChildBody(std::size_t index) const
Returns a child <body> element at index.
Definition: Body.cpp:370
const Geom & getGeom(std::size_t index) const
Returns a <geom> element at index.
Definition: Body.cpp:382
const Site & getSite(std::size_t index) const
Returns a <site> element at index.
Definition: Body.cpp:394
const Joint & getJoint(std::size_t index) const
Returns a <joint> element at index.
Definition: Body.cpp:358
Eigen::Isometry3d mRelativeTransform
Definition: Body.hpp:147
std::string mName
Name of the body.
Definition: Body.hpp:142
std::vector< Joint > mJoints
Definition: Body.hpp:155
BodyAttributes mAttributes
Definition: Body.hpp:139
Eigen::VectorXd mUser
Definition: Body.hpp:151
Inertial mInertial
Definition: Body.hpp:153
const std::string & getName() const
Returns 'name' attribute.
Definition: Body.cpp:334
const Eigen::Isometry3d & getRelativeTransform() const
Returns the transform relative to the parent <body> or <worldbody>.
Definition: Body.cpp:407
std::vector< Site > mSites
Definition: Body.hpp:158
bool getMocap() const
Returns 'mocap' attribute.
Definition: Body.cpp:340
void setWorldTransform(const Eigen::Isometry3d &tf)
Sets the world transform of this <body>.
Definition: Body.cpp:413
Body()=default
Default constructor.
std::size_t getNumGeoms() const
Returns the number of <geom> elements.
Definition: Body.cpp:376
Errors read(tinyxml2::XMLElement *element, const common::optional< Size > &size, const Defaults &defaults, const Default *currentDefault)
Definition: Body.cpp:47
Errors postprocess(const Body *body, const Compiler &compiler)
Updates attributes and elements that require the compiled parent element.
Definition: Body.cpp:245
Errors preprocess(const Compiler &compiler)
Updates attributes and elements that doesn't require any other elements.
Definition: Body.cpp:141
std::vector< Geom > mGeoms
Definition: Body.hpp:157
void setRelativeTransform(const Eigen::Isometry3d &tf)
Sets the transform relative to the parent <body> or <worldbody>.
Definition: Body.cpp:400
const Inertial & getInertial() const
Returns <inertial> element.
Definition: Body.cpp:346
Inertial computeInertialFromGeoms(const std::vector< Geom > &geoms, const Compiler &compiler)
Definition: Body.cpp:426
Definition: Compiler.hpp:51
Definition: Default.hpp:54
Definition: Default.hpp:80
Definition: Inertial.hpp:51
Definition: Worldbody.hpp:54
boost::optional< T > optional
Definition: Optional.hpp:50
std::vector< Error > Errors
Definition: Error.hpp:85
Definition: BulletCollisionDetector.cpp:65
Intermediate raw data read from the XML file.
Definition: BodyAttributes.hpp:56