DART 6.10.1
|
#include <DartLoader.hpp>
Public Types | |
enum | Flags { NONE = 0 , FIXED_BASE_LINK = 1 << 1 , DEFAULT = NONE } |
Flags for specifying URDF file parsing policies. More... | |
Public Member Functions | |
DartLoader () | |
Constructor with the default ResourceRetriever. | |
void | addPackageDirectory (const std::string &_packageName, const std::string &_packageDirectory) |
Specify the directory of a ROS package. | |
dynamics::SkeletonPtr | parseSkeleton (const common::Uri &_uri, const common::ResourceRetrieverPtr &_resourceRetriever=nullptr, unsigned int flags=DEFAULT) |
Parse a file to produce a Skeleton. | |
dynamics::SkeletonPtr | parseSkeletonString (const std::string &_urdfString, const common::Uri &_baseUri, const common::ResourceRetrieverPtr &_resourceRetriever=nullptr, unsigned int flags=DEFAULT) |
Parse a text string to produce a Skeleton. | |
dart::simulation::WorldPtr | parseWorld (const common::Uri &_uri, const common::ResourceRetrieverPtr &_resourceRetriever=nullptr, unsigned int flags=DEFAULT) |
Parse a file to produce a World. | |
dart::simulation::WorldPtr | parseWorldString (const std::string &_urdfString, const common::Uri &_baseUri, const common::ResourceRetrieverPtr &_resourceRetriever=nullptr, unsigned int flags=DEFAULT) |
Parse a text string to produce a World. | |
Private Types | |
typedef std::shared_ptr< dynamics::BodyNode::Properties > | BodyPropPtr |
typedef std::shared_ptr< dynamics::Joint::Properties > | JointPropPtr |
Private Member Functions | |
common::ResourceRetrieverPtr | getResourceRetriever (const common::ResourceRetrieverPtr &_resourceRetriever) |
Static Private Member Functions | |
static dart::dynamics::SkeletonPtr | modelInterfaceToSkeleton (const urdf::ModelInterface *model, const common::Uri &baseUri, const common::ResourceRetrieverPtr &resourceRetriever, unsigned int flags) |
Parses the ModelInterface and spits out a Skeleton object. | |
static bool | createSkeletonRecursive (const urdf::ModelInterface *model, dynamics::SkeletonPtr skel, const urdf::Link *lk, dynamics::BodyNode *parent, const common::Uri &baseUri, const common::ResourceRetrieverPtr &_resourceRetriever, unsigned int flags) |
static bool | addMimicJointsRecursive (const urdf::ModelInterface *model, dynamics::SkeletonPtr _skel, const urdf::Link *_lk) |
template<class VisualOrCollision > | |
static dynamics::ShapePtr | createShape (const VisualOrCollision *_vizOrCol, const common::Uri &_baseUri, const common::ResourceRetrieverPtr &_resourceRetriever) |
@function createShape | |
static dynamics::BodyNode * | createDartJointAndNode (const urdf::Joint *_jt, const dynamics::BodyNode::Properties &_body, dynamics::BodyNode *_parent, dynamics::SkeletonPtr _skeleton, unsigned int flgas) |
@function createDartJoint | |
static bool | createDartNodeProperties (const urdf::Link *_lk, dynamics::BodyNode::Properties &properties, const common::Uri &_baseUri, const common::ResourceRetrieverPtr &_resourceRetriever) |
@function createDartNode | |
static bool | createShapeNodes (const urdf::ModelInterface *model, const urdf::Link *lk, dynamics::BodyNode *bodyNode, const common::Uri &baseUri, const common::ResourceRetrieverPtr &resourceRetriever) |
static Eigen::Isometry3d | toEigen (const urdf::Pose &_pose) |
@function pose2Affine3d | |
static Eigen::Vector3d | toEigen (const urdf::Vector3 &_vector) |
static bool | readFileToString (const common::ResourceRetrieverPtr &_resourceRetriever, const common::Uri &_uri, std::string &_output) |
@function readXml | |
Private Attributes | |
common::LocalResourceRetrieverPtr | mLocalRetriever |
utils::PackageResourceRetrieverPtr | mPackageRetriever |
utils::CompositeResourceRetrieverPtr | mRetriever |
|
private |
|
private |
dart::utils::DartLoader::DartLoader | ( | ) |
Constructor with the default ResourceRetriever.
|
staticprivate |
void dart::utils::DartLoader::addPackageDirectory | ( | const std::string & | _packageName, |
const std::string & | _packageDirectory | ||
) |
Specify the directory of a ROS package.
In your URDF files, you may see strings with a package URI pattern such as:
For us to successfully parse a URDF, we need to be told what the path to the package directory is, using addPackageDirectory(). In this case, suppose the path to the my_robot package is /path/to/my_robot. Then you should use addPackageDirectory("my_robot", "/path/to/my_robot"). Altogether, this implies that a file named "/path/to/my_robot/meshes/mesh_for_my_robot.stl" exists. Whatever you specify as the package directory will end up replacing the 'package keyword' and 'package name' components of the URI string.
|
staticprivate |
@function createDartJoint
|
staticprivate |
@function createDartNode
|
staticprivate |
@function createShape
|
staticprivate |
|
staticprivate |
|
private |
|
staticprivate |
Parses the ModelInterface and spits out a Skeleton object.
dynamics::SkeletonPtr dart::utils::DartLoader::parseSkeleton | ( | const common::Uri & | _uri, |
const common::ResourceRetrieverPtr & | _resourceRetriever = nullptr , |
||
unsigned int | flags = DEFAULT |
||
) |
Parse a file to produce a Skeleton.
dynamics::SkeletonPtr dart::utils::DartLoader::parseSkeletonString | ( | const std::string & | _urdfString, |
const common::Uri & | _baseUri, | ||
const common::ResourceRetrieverPtr & | _resourceRetriever = nullptr , |
||
unsigned int | flags = DEFAULT |
||
) |
Parse a text string to produce a Skeleton.
simulation::WorldPtr dart::utils::DartLoader::parseWorld | ( | const common::Uri & | _uri, |
const common::ResourceRetrieverPtr & | _resourceRetriever = nullptr , |
||
unsigned int | flags = DEFAULT |
||
) |
Parse a file to produce a World.
simulation::WorldPtr dart::utils::DartLoader::parseWorldString | ( | const std::string & | _urdfString, |
const common::Uri & | _baseUri, | ||
const common::ResourceRetrieverPtr & | _resourceRetriever = nullptr , |
||
unsigned int | flags = DEFAULT |
||
) |
Parse a text string to produce a World.
|
staticprivate |
@function readXml
|
staticprivate |
@function pose2Affine3d
|
staticprivate |
|
private |
|
private |
|
private |