DART
6.10.1
|
#include <Body.hpp>
Public Member Functions | |
Body ()=default | |
Default constructor. More... | |
Attributes | |
const std::string & | getName () const |
Returns 'name' attribute. More... | |
bool | getMocap () const |
Returns 'mocap' attribute. More... | |
void | setRelativeTransform (const Eigen::Isometry3d &tf) |
Sets the transform relative to the parent <body> or <worldbody>. More... | |
const Eigen::Isometry3d & | getRelativeTransform () const |
Returns the transform relative to the parent <body> or <worldbody>. More... | |
void | setWorldTransform (const Eigen::Isometry3d &tf) |
Sets the world transform of this <body>. More... | |
const Eigen::Isometry3d & | getWorldTransform () const |
Returns the world transform of this <body>. More... | |
Child elements | |
const Inertial & | getInertial () const |
Returns <inertial> element. More... | |
std::size_t | getNumJoints () const |
Returns the number of <joint> elements. More... | |
const Joint & | getJoint (std::size_t index) const |
Returns a <joint> element at index . More... | |
std::size_t | getNumChildBodies () const |
Returns the number of child <body> elements. More... | |
const Body & | getChildBody (std::size_t index) const |
Returns a child <body> element at index . More... | |
std::size_t | getNumGeoms () const |
Returns the number of <geom> elements. More... | |
const Geom & | getGeom (std::size_t index) const |
Returns a <geom> element at index . More... | |
std::size_t | getNumSites () const |
Returns the number of <site> elements. More... | |
const Site & | getSite (std::size_t index) const |
Returns a <site> element at index . More... | |
Private Member Functions | |
Errors | read (tinyxml2::XMLElement *element, const common::optional< Size > &size, const Defaults &defaults, const Default *currentDefault) |
Errors | preprocess (const Compiler &compiler) |
Updates attributes and elements that doesn't require any other elements. More... | |
Errors | compile (const Compiler &compiler) |
Updates attributes and elements that require the preprocessed child elements of this <body>. More... | |
Errors | postprocess (const Body *body, const Compiler &compiler) |
Updates attributes and elements that require the compiled parent element. More... | |
Inertial | computeInertialFromGeoms (const std::vector< Geom > &geoms, const Compiler &compiler) |
Private Attributes | |
BodyAttributes | mAttributes |
std::string | mName {""} |
Name of the body. More... | |
bool | mMocap {false} |
If this attribute is "true", the body is labeled as a mocap body. More... | |
Eigen::Isometry3d | mRelativeTransform {Eigen::Isometry3d::Identity()} |
Eigen::Isometry3d | mWorldTransform {Eigen::Isometry3d::Identity()} |
Eigen::VectorXd | mUser |
Inertial | mInertial |
std::vector< Joint > | mJoints |
std::vector< Body > | mChildBodies |
std::vector< Geom > | mGeoms |
std::vector< Site > | mSites |
Friends | |
class | Worldbody |
|
default |
Default constructor.
Updates attributes and elements that require the preprocessed child elements of this <body>.
|
private |
const Body & dart::utils::MjcfParser::detail::Body::getChildBody | ( | std::size_t | index | ) | const |
Returns a child <body> element at index
.
const Geom & dart::utils::MjcfParser::detail::Body::getGeom | ( | std::size_t | index | ) | const |
Returns a <geom> element at index
.
const Inertial & dart::utils::MjcfParser::detail::Body::getInertial | ( | ) | const |
Returns <inertial> element.
When <inertial> element is not specified in the XML file, then it's inferred from <geom> elements. If both of <inertial> and <inertial> are missing, then the parser must be failed to parse the file.
const Joint & dart::utils::MjcfParser::detail::Body::getJoint | ( | std::size_t | index | ) | const |
Returns a <joint> element at index
.
bool dart::utils::MjcfParser::detail::Body::getMocap | ( | ) | const |
Returns 'mocap' attribute.
const std::string & dart::utils::MjcfParser::detail::Body::getName | ( | ) | const |
Returns 'name' attribute.
std::size_t dart::utils::MjcfParser::detail::Body::getNumChildBodies | ( | ) | const |
Returns the number of child <body> elements.
std::size_t dart::utils::MjcfParser::detail::Body::getNumGeoms | ( | ) | const |
Returns the number of <geom> elements.
std::size_t dart::utils::MjcfParser::detail::Body::getNumJoints | ( | ) | const |
Returns the number of <joint> elements.
std::size_t dart::utils::MjcfParser::detail::Body::getNumSites | ( | ) | const |
Returns the number of <site> elements.
const Eigen::Isometry3d & dart::utils::MjcfParser::detail::Body::getRelativeTransform | ( | ) | const |
Returns the transform relative to the parent <body> or <worldbody>.
const Site & dart::utils::MjcfParser::detail::Body::getSite | ( | std::size_t | index | ) | const |
Returns a <site> element at index
.
const Eigen::Isometry3d & dart::utils::MjcfParser::detail::Body::getWorldTransform | ( | ) | const |
Returns the world transform of this <body>.
|
private |
Updates attributes and elements that require the compiled parent element.
Updates attributes and elements that doesn't require any other elements.
|
private |
void dart::utils::MjcfParser::detail::Body::setRelativeTransform | ( | const Eigen::Isometry3d & | tf | ) |
Sets the transform relative to the parent <body> or <worldbody>.
void dart::utils::MjcfParser::detail::Body::setWorldTransform | ( | const Eigen::Isometry3d & | tf | ) |
Sets the world transform of this <body>.
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
If this attribute is "true", the body is labeled as a mocap body.
|
private |
Name of the body.
|
private |
|
private |
|
private |
|
private |