Public Member Functions | List of all members
sdf::v9::Collision Class Reference

A collision element descibes the collision properties associated with a link. More...

#include <Collision.hh>

Public Member Functions

 Collision ()
 Default constructor. More...
 
 Collision (Collision &&_collision) noexcept
 Move constructor. More...
 
 Collision (const Collision &_collision)
 Copy constructor. More...
 
 ~Collision ()
 Destructor. More...
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load. More...
 
const GeometryGeom () const
 Get a pointer to the collisions's geometry. More...
 
Errors Load (ElementPtr _sdf)
 Load the collision based on a element pointer. More...
 
std::string Name () const
 Get the name of the collision. More...
 
Collisionoperator= (Collision &&_collision)
 Move assignment operator. More...
 
Collisionoperator= (const Collision &_collision)
 Copy assignment operator. More...
 
const gz::math::Pose3d & Pose () const SDF_DEPRECATED(9.0)
 Get the pose of the collision object. More...
 
const std::string & PoseFrame () const SDF_DEPRECATED(9.0)
 Get the name of the coordinate frame in which this collision object's pose is expressed. More...
 
const std::string & PoseRelativeTo () const
 Get the name of the coordinate frame relative to which this object's pose is expressed. More...
 
const gz::math::Pose3d & RawPose () const
 Get the pose of the collision object. More...
 
sdf::SemanticPose SemanticPose () const
 Get SemanticPose object of this object to aid in resolving poses. More...
 
void SetGeom (const Geometry &_geom)
 Set the collision's geometry. More...
 
void SetName (const std::string &_name) const
 Set the name of the collision. More...
 
void SetPose (const gz::math::Pose3d &_pose) SDF_DEPRECATED(9.0)
 Set the pose of the collision object. More...
 
void SetPoseFrame (const std::string &_frame) SDF_DEPRECATED(9.0)
 Set the name of the coordinate frame in which this collision object's pose is expressed. More...
 
void SetPoseRelativeTo (const std::string &_frame)
 Set the name of the coordinate frame relative to which this object's pose is expressed. More...
 
void SetRawPose (const gz::math::Pose3d &_pose)
 Set the pose of the collision object. More...
 
void SetSurface (const sdf::Surface &_surface)
 Set the collision's surface parameters. More...
 
sdf::SurfaceSurface () const
 Get a pointer to the collisions's surface parameters. More...
 

Detailed Description

A collision element descibes the collision properties associated with a link.

This can be different from the visual properties of a link. For example, simple collision models are often used to reduce computation time.

Constructor & Destructor Documentation

◆ Collision() [1/3]

sdf::v9::Collision::Collision ( )

Default constructor.

◆ Collision() [2/3]

sdf::v9::Collision::Collision ( const Collision _collision)

Copy constructor.

Parameters
[in]_collisionCollision to copy.

◆ Collision() [3/3]

sdf::v9::Collision::Collision ( Collision &&  _collision)
noexcept

Move constructor.

Parameters
[in]_collisionCollision to move.

◆ ~Collision()

sdf::v9::Collision::~Collision ( )

Destructor.

Member Function Documentation

◆ Element()

sdf::ElementPtr sdf::v9::Collision::Element ( ) const

Get a pointer to the SDF element that was used during load.

Returns
SDF element pointer. The value will be nullptr if Load has not been called.

◆ Geom()

const Geometry* sdf::v9::Collision::Geom ( ) const

Get a pointer to the collisions's geometry.

Returns
The collision's geometry.

◆ Load()

Errors sdf::v9::Collision::Load ( ElementPtr  _sdf)

Load the collision based on a element pointer.

This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.

Parameters
[in]_sdfThe SDF Element pointer
Returns
Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.

◆ Name()

std::string sdf::v9::Collision::Name ( ) const

Get the name of the collision.

The name of the collision must be unique within the scope of a Link.

Returns
Name of the collision.

◆ operator=() [1/2]

Collision& sdf::v9::Collision::operator= ( Collision &&  _collision)

Move assignment operator.

Parameters
[in]_collisionCollision to move.
Returns
Reference to this.

◆ operator=() [2/2]

Collision& sdf::v9::Collision::operator= ( const Collision _collision)

Copy assignment operator.

Parameters
[in]_collisionCollision to copy.
Returns
Reference to this.

◆ Pose()

const gz::math::Pose3d& sdf::v9::Collision::Pose ( ) const

Get the pose of the collision object.

This is the pose of the collision as specified in SDF (<collision><pose> ... </pose></collision>).

Returns
The pose of the collision object.
Deprecated:
See RawPose.

◆ PoseFrame()

const std::string& sdf::v9::Collision::PoseFrame ( ) const

Get the name of the coordinate frame in which this collision object's pose is expressed.

A empty value indicates that the frame is the parent link.

Returns
The name of the pose frame.
Deprecated:
See PoseRelativeTo.

◆ PoseRelativeTo()

const std::string& sdf::v9::Collision::PoseRelativeTo ( ) const

Get the name of the coordinate frame relative to which this object's pose is expressed.

An empty value indicates that the frame is relative to the parent link.

Returns
The name of the pose relative-to frame.

◆ RawPose()

const gz::math::Pose3d& sdf::v9::Collision::RawPose ( ) const

Get the pose of the collision object.

This is the pose of the collison as specified in SDF (<collision><pose> ... </pose></collision>).

Returns
The pose of the collision object.

◆ SemanticPose()

sdf::SemanticPose sdf::v9::Collision::SemanticPose ( ) const

Get SemanticPose object of this object to aid in resolving poses.

Returns
SemanticPose object for this link.

◆ SetGeom()

void sdf::v9::Collision::SetGeom ( const Geometry _geom)

Set the collision's geometry.

Parameters
[in]_geomThe geometry of the collision object

◆ SetName()

void sdf::v9::Collision::SetName ( const std::string &  _name) const

Set the name of the collision.

The name of the collision must be unique within the scope of a Link.

Parameters
[in]_nameName of the collision.

◆ SetPose()

void sdf::v9::Collision::SetPose ( const gz::math::Pose3d &  _pose)

Set the pose of the collision object.

See also
const gz::math::Pose3d &Pose() const
Parameters
[in]_poseThe pose of the collision object.
Deprecated:
See SetRawPose.

◆ SetPoseFrame()

void sdf::v9::Collision::SetPoseFrame ( const std::string &  _frame)

Set the name of the coordinate frame in which this collision object's pose is expressed.

A empty value indicates that the frame is the parent link.

Parameters
[in]_frameThe name of the pose frame.
Deprecated:
See SetPoseRelativeTo.

◆ SetPoseRelativeTo()

void sdf::v9::Collision::SetPoseRelativeTo ( const std::string &  _frame)

Set the name of the coordinate frame relative to which this object's pose is expressed.

An empty value indicates that the frame is relative to the parent link.

Parameters
[in]_frameThe name of the pose relative-to frame.

◆ SetRawPose()

void sdf::v9::Collision::SetRawPose ( const gz::math::Pose3d &  _pose)

Set the pose of the collision object.

See also
const gz::math::Pose3d &RawPose() const
Parameters
[in]_poseThe pose of the collision object.

◆ SetSurface()

void sdf::v9::Collision::SetSurface ( const sdf::Surface _surface)

Set the collision's surface parameters.

Parameters
[in]_surfaceThe surface parameters of the collision object

◆ Surface()

sdf::Surface* sdf::v9::Collision::Surface ( ) const

Get a pointer to the collisions's surface parameters.

Returns
The collision's surface parameters.

The documentation for this class was generated from the following file: