33 #ifndef DART_UTILS_URDF_DARTLOADER_HPP_
34 #define DART_UTILS_URDF_DARTLOADER_HPP_
39 #include <Eigen/Geometry>
67 namespace simulation {
115 const std::string& _packageName,
const std::string& _packageDirectory);
125 const std::string& _urdfString,
138 const std::string& _urdfString,
144 typedef std::shared_ptr<dynamics::BodyNode::Properties>
BodyPropPtr;
149 const urdf::ModelInterface* model,
155 const urdf::ModelInterface* model,
157 const urdf::Link* lk,
164 const urdf::ModelInterface* model,
166 const urdf::Link* _lk);
168 template <
class VisualOrCollision>
170 const VisualOrCollision* _vizOrCol,
175 const urdf::Joint* _jt,
182 const urdf::Link* _lk,
188 const urdf::ModelInterface* model,
189 const urdf::Link* lk,
197 static Eigen::Isometry3d
toEigen(
const urdf::Pose& _pose);
203 std::string& _output);
BodyPropPtr properties
Definition: SdfParser.cpp:80
Definition: CompositeData.hpp:186
BodyNode class represents a single node of the skeleton.
Definition: BodyNode.hpp:79
Definition: DartLoader.hpp:77
utils::CompositeResourceRetrieverPtr mRetriever
Definition: DartLoader.hpp:207
static dynamics::ShapePtr createShape(const VisualOrCollision *_vizOrCol, const common::Uri &_baseUri, const common::ResourceRetrieverPtr &_resourceRetriever)
@function createShape
Definition: DartLoader.cpp:666
static Eigen::Isometry3d toEigen(const urdf::Pose &_pose)
@function pose2Affine3d
Definition: DartLoader.cpp:751
Flags
Flags for specifying URDF file parsing policies.
Definition: DartLoader.hpp:81
@ NONE
Definition: DartLoader.hpp:82
@ DEFAULT
The default flgas.
Definition: DartLoader.hpp:89
@ FIXED_BASE_LINK
Parser the root link's joint type to be "fixed" joint when not specified.
Definition: DartLoader.hpp:86
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.
Definition: DartLoader.cpp:206
void addPackageDirectory(const std::string &_packageName, const std::string &_packageDirectory)
Specify the directory of a ROS package.
Definition: DartLoader.cpp:75
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.
Definition: DartLoader.cpp:148
common::ResourceRetrieverPtr getResourceRetriever(const common::ResourceRetrieverPtr &_resourceRetriever)
Definition: DartLoader.cpp:730
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)
Definition: DartLoader.cpp:263
static bool addMimicJointsRecursive(const urdf::ModelInterface *model, dynamics::SkeletonPtr _skel, const urdf::Link *_lk)
Definition: DartLoader.cpp:313
common::LocalResourceRetrieverPtr mLocalRetriever
Definition: DartLoader.hpp:205
std::shared_ptr< dynamics::Joint::Properties > JointPropPtr
Definition: DartLoader.hpp:145
static dynamics::BodyNode * createDartJointAndNode(const urdf::Joint *_jt, const dynamics::BodyNode::Properties &_body, dynamics::BodyNode *_parent, dynamics::SkeletonPtr _skeleton, unsigned int flgas)
@function createDartJoint
Definition: DartLoader.cpp:408
dart::simulation::WorldPtr parseWorld(const common::Uri &_uri, const common::ResourceRetrieverPtr &_resourceRetriever=nullptr, unsigned int flags=DEFAULT)
Parse a file to produce a World.
Definition: DartLoader.cpp:133
static bool readFileToString(const common::ResourceRetrieverPtr &_resourceRetriever, const common::Uri &_uri, std::string &_output)
@function readXml
Definition: DartLoader.cpp:365
std::shared_ptr< dynamics::BodyNode::Properties > BodyPropPtr
Definition: DartLoader.hpp:144
static bool createShapeNodes(const urdf::ModelInterface *model, const urdf::Link *lk, dynamics::BodyNode *bodyNode, const common::Uri &baseUri, const common::ResourceRetrieverPtr &resourceRetriever)
Definition: DartLoader.cpp:612
dynamics::SkeletonPtr parseSkeleton(const common::Uri &_uri, const common::ResourceRetrieverPtr &_resourceRetriever=nullptr, unsigned int flags=DEFAULT)
Parse a file to produce a Skeleton.
Definition: DartLoader.cpp:81
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.
Definition: DartLoader.cpp:106
DartLoader()
Constructor with the default ResourceRetriever.
Definition: DartLoader.cpp:65
static bool createDartNodeProperties(const urdf::Link *_lk, dynamics::BodyNode::Properties &properties, const common::Uri &_baseUri, const common::ResourceRetrieverPtr &_resourceRetriever)
@function createDartNode
Definition: DartLoader.cpp:551
utils::PackageResourceRetrieverPtr mPackageRetriever
Definition: DartLoader.hpp:206
::fcl::Vec3f Vector3
Definition: BackwardCompatibility.hpp:148
std::shared_ptr< ResourceRetriever > ResourceRetrieverPtr
Definition: ResourceRetriever.hpp:76
std::shared_ptr< LocalResourceRetriever > LocalResourceRetrieverPtr
Definition: LocalResourceRetriever.hpp:58
std::shared_ptr< Shape > ShapePtr
Definition: SmartPointer.hpp:81
std::shared_ptr< Skeleton > SkeletonPtr
Definition: SmartPointer.hpp:60
std::shared_ptr< World > WorldPtr
Definition: SmartPointer.hpp:41
std::shared_ptr< CompositeResourceRetriever > CompositeResourceRetrieverPtr
Definition: CompositeResourceRetriever.hpp:91
std::shared_ptr< PackageResourceRetriever > PackageResourceRetrieverPtr
Definition: PackageResourceRetriever.hpp:112
Definition: BulletCollisionDetector.cpp:65
Definition: DartLoader.hpp:51
The Uri struct provides URI parsing and merging functionality based on RFC 3986.
Definition: Uri.hpp:87