Drake
drake::multibody::parsing::detail Namespace Reference

Functions

std::unique_ptr< geometry::ShapeMakeShapeFromSdfGeometry (const sdf::Geometry &sdf_geometry)
 Given an sdf::Geometry object representing a <geometry> element from an SDF file, this method makes a new drake::geometry::Shape object from this specification. More...
 
std::unique_ptr< GeometryInstance > MakeGeometryInstanceFromSdfVisual (const sdf::Visual &sdf_visual)
 Given an sdf::Visual object representing a <visual> element from an SDF file, this method makes a new drake::geometry::GeometryInstance object from this specification. More...
 
Isometry3d MakeGeometryPoseFromSdfCollision (const sdf::Collision &sdf_collision)
 Given sdf_collision stemming from the parsing of a <collision> element in an SDF file, this method makes the pose X_LG of frame G for the geometry of that collision element in the frame L of the link it belongs to. More...
 
CoulombFriction< doubleMakeCoulombFrictionFromSdfCollisionOde (const sdf::Collision &sdf_collision)
 Parses friction coefficients from sdf_collision. More...
 
sdf::Visual ResolveVisualUri (const sdf::Visual &original, const parsers::PackageMap &package_map, const std::string &root_dir)
 Given an sdf::Visual object representing a <visual> element from an SDF file, this method makes a new Visual object which resolves the uri for the mesh element, if present. More...
 
Vector3d ToVector3 (const ignition::math::Vector3d &vector)
 Helper function to express an ignition::math::Vector3d instance as a Vector3d instance. More...
 
Isometry3d ToIsometry3 (const ignition::math::Pose3d &pose)
 Helper function to express an ignition::math::Pose3d instance as an Isometry3d instance. More...
 

Function Documentation

multibody_plant::CoulombFriction< double > MakeCoulombFrictionFromSdfCollisionOde ( const sdf::Collision &  sdf_collision)

Parses friction coefficients from sdf_collision.

This method looks for the definitions specific to ODE, as given by the SDF specification in <collision><surface><friction><ode>. Drake understands <mu> as the static coefficient of friction and <mu2> as the dynamic coefficient of friction. Consider the example below:

  <collision>
    <surface>
      <friction>
        <ode>
          <mu>0.8</mu>
          <mu2>0.3</mu2>
        </ode>
      </friction>
    </surface>
  </collision>

If a <surface> is not found, it returns the coefficients for a frictionless surface. If <surface> is found, all other nested elements are required and an exception is thrown if not present.

Here is the caller graph for this function:

std::unique_ptr< geometry::GeometryInstance > MakeGeometryInstanceFromSdfVisual ( const sdf::Visual &  sdf_visual)

Given an sdf::Visual object representing a <visual> element from an SDF file, this method makes a new drake::geometry::GeometryInstance object from this specification.

This method returns nullptr when the given SDF specification corresponds to a geometry of type sdf::GeometryType::EMPTY (<empty> SDF tag.)

Here is the call graph for this function:

Here is the caller graph for this function:

Eigen::Isometry3d MakeGeometryPoseFromSdfCollision ( const sdf::Collision &  sdf_collision)

Given sdf_collision stemming from the parsing of a <collision> element in an SDF file, this method makes the pose X_LG of frame G for the geometry of that collision element in the frame L of the link it belongs to.

Here is the call graph for this function:

Here is the caller graph for this function:

std::unique_ptr< geometry::Shape > MakeShapeFromSdfGeometry ( const sdf::Geometry &  sdf_geometry)

Given an sdf::Geometry object representing a <geometry> element from an SDF file, this method makes a new drake::geometry::Shape object from this specification.

For sdf_geometry.Type() == sdf::GeometryType::EMPTY, corresponding to the <empty> SDF tag, it returns nullptr.

Here is the call graph for this function:

Here is the caller graph for this function:

sdf::Visual ResolveVisualUri ( const sdf::Visual &  original,
const parsers::PackageMap package_map,
const std::string &  root_dir 
)

Given an sdf::Visual object representing a <visual> element from an SDF file, this method makes a new Visual object which resolves the uri for the mesh element, if present.

If the mesh element is not present, the new object will be identical to the original. See parsers::ResolveFilename() for more detail on this operation.

Exceptions
std::runtime_errorif the <mesh> tag is present but missing <uri> or if the file referenced in <uri> can not be found.

Here is the call graph for this function:

Here is the caller graph for this function:

Eigen::Isometry3d ToIsometry3 ( const ignition::math::Pose3d &  pose)

Helper function to express an ignition::math::Pose3d instance as an Isometry3d instance.

Here is the call graph for this function:

Here is the caller graph for this function:

Eigen::Vector3d ToVector3 ( const ignition::math::Vector3d &  vector)

Helper function to express an ignition::math::Vector3d instance as a Vector3d instance.

Here is the caller graph for this function: