Class representing a named rigid model.
More...
#include <model/RigidModel.h>
|
virtual | ~RigidModel () |
| Destructor. More...
|
|
template<typename Reflector > |
void | reflect (Reflector &r) |
|
void | reflect (XMLDeserializer &r) |
| Specialized reflect for XMLDeserializer. More...
|
|
void | clear () |
| Clears the rigid model. More...
|
|
std::string | getRootLink () const |
| Returns the name of the root link, the only link that has no parent. More...
|
|
CollisionGeometries | getCollisionGeometries (std::string targetFrame="", const Time ×tamp=Time::now(), const std::string &filter="") const |
| Returns a list of the models collision geometries and the corresponding transforms for each geometry that describes its position within the model. More...
|
|
std::list< Box3f > | getCollisionBoundingBoxes (std::string targetFrame="", const Time ×tamp=Time::now(), const std::string &filter="") const |
| Returns a list of the bounding boxes for each of the models collision geometries at their correct positions. More...
|
|
Footprint | getFootprint (std::string targetFrame="", const Time ×tamp=Time::now(), const std::string &filter="") const |
| Returns the models footprint (the projection on the xy-plane). More...
|
|
void | resolveAndPublishLinks (const std::string &ns, const Time ×tamp=Time::now()) |
| Resolves all link names in the model and adds the transforms between them to the transform tree. More...
|
|
void | publishJoint (const std::string &name, float value, const Time ×tamp=Time::now()) const |
| Publishes the state of the joint with the given name. More...
|
|
Class const & | getClass () const |
|
Class representing a named rigid model.
A rigid model consists of:
- Links - A link is a single body part of the model.
- Joints - A joint connects two body parts (links)
- Materials - A material can be used when visualizing a rigid model two links.
◆ LinkList
◆ JointMap
Maps joint pointers to their name.
◆ MaterialMap
Maps material pointers to their name.
◆ CollisionGeometries
List of collision geometries, each item consisting of the geometry pointer and a transform that describes the position of the geometry.
◆ ~RigidModel()
◆ reflect() [1/2]
void reflect |
( |
Reflector & |
r | ) |
|
|
inline |
◆ reflect() [2/2]
◆ clear()
◆ getRootLink()
std::string getRootLink |
( |
| ) |
const |
Returns the name of the root link, the only link that has no parent.
- Exceptions
-
XLogical,if | NONE or MORE than one root link exists |
◆ getCollisionGeometries()
Returns a list of the models collision geometries and the corresponding transforms for each geometry that describes its position within the model.
All transforms are given in relation to the specified target frame. If the target frame is left blank, the root link of the model is used, i.e. the footprint is given in the coordinate frame of the model. The optional timestamp parameter allows to specify a timestamp that is used for querying the transforms.
- Parameters
-
[in] | targetFrame | All transforms will be given relative to this frame. If empty (default) the root frame of the model will be used, so all transforms will be relative to the models origin. |
[in] | timestamp | Timestamp used for querying transforms |
[in] | filter | Filter for filtering only collision geometries where the name matches the filter By default collision geometries with no name are returned |
◆ getCollisionBoundingBoxes()
std::list<Box3f> getCollisionBoundingBoxes |
( |
std::string |
targetFrame = "" , |
|
|
const Time & |
timestamp = Time::now() , |
|
|
const std::string & |
filter = "" |
|
) |
| const |
Returns a list of the bounding boxes for each of the models collision geometries at their correct positions.
All transforms and hence the position of the boxes are given in relation to the specified target frame. If the target frame is left blank, the root link of the model is used, i.e. the bounding boxes are given in the coordinate frame of the model. The optional timestamp parameter allows to specify a timestamp that is used for querying the transforms.
- Parameters
-
[in] | targetFrame | All box positions will be given relative to this frame. If empty (default) the root frame of the model will be used, so all box positions will be relative to the models origin. |
[in] | timestamp | Timestamp used for querying transforms |
[in] | filter | Filter for filtering only collision geometries where the name matches the filter By default collision geometries with no name are used for calculating the bounding boxes |
◆ getFootprint()
Footprint getFootprint |
( |
std::string |
targetFrame = "" , |
|
|
const Time & |
timestamp = Time::now() , |
|
|
const std::string & |
filter = "" |
|
) |
| const |
Returns the models footprint (the projection on the xy-plane).
The geometry of the footprint is returned in relation to the specified target frame. If the target frame is left blank, the root link of the model is used, i.e. the footprint is given in the coordinate frame of the model.
- Parameters
-
[in] | targetFrame | The footprint will be given relative to this frame. If empty (default) the root frame of the model will be used, so the footprint will be relative to the models origin. |
[in] | timestamp | Timestamp used for querying transforms |
[in] | filter | Filter for filtering only collision geometries where the name matches the filter By default collision geometries with no name are used for calculating the footprint |
◆ resolveAndPublishLinks()
void resolveAndPublishLinks |
( |
const std::string & |
ns, |
|
|
const Time & |
timestamp = Time::now() |
|
) |
| |
Resolves all link names in the model and adds the transforms between them to the transform tree.
- Parameters
-
ns | The namespace of the model. |
timestamp | An optional timestamp of the (initial) transformation states |
◆ publishJoint()
void publishJoint |
( |
const std::string & |
name, |
|
|
float |
value, |
|
|
const Time & |
timestamp = Time::now() |
|
) |
| const |
Publishes the state of the joint with the given name.
Can be used for CONTINUOUS, REVOLUTE and PRISMATIC joints.
- Exceptions
-
XInvalidConfig | if used with not supported types of joints |
- Parameters
-
name | Name of the joint to alter |
value | The new value for the joint
- radian for CONTINUOUS and REVOLUTE
- meter for PRISMATIC
|
timestamp | An optional timestamp of the new joint state |
◆ name
◆ links
List of links used by this model.
◆ joints
Map with name - joint pointer pairs used by this model.
◆ materials
Map with name - material pointer pairs used by this model.
The documentation for this class was generated from the following file: