Public Types | Public Member Functions | Public Attributes | Friends | List of all members
pinocchio::GeometryData Struct Reference

#include <geometry.hpp>

Inheritance diagram for pinocchio::GeometryData:
Inheritance graph
[legend]

Public Types

enum  { Options = context::Options }
 
typedef std::vector< GeomIndexGeomIndexList
 
typedef Eigen::Matrix< bool, Eigen::Dynamic, Eigen::Dynamic, OptionsMatrixXb
 
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, OptionsMatrixXs
 
typedef SE3Tpl< Scalar, OptionsSE3
 
- Public Types inherited from pinocchio::NumericalBase< GeometryData >
typedef traits< GeometryData >::Scalar Scalar
 

Public Member Functions

void activateAllCollisionPairs ()
 Activate all collision pairs. More...
 
void activateCollisionPair (const PairIndex pair_id)
 
void deactivateAllCollisionPairs ()
 Deactivate all collision pairs. More...
 
void deactivateCollisionPair (const PairIndex pair_id)
 
void fillInnerOuterObjectMaps (const GeometryModel &geomModel)
 
 GeometryData ()
 Empty constructor. More...
 
 GeometryData (const GeometryData &other)
 Copy constructor. More...
 
 GeometryData (const GeometryModel &geom_model)
 Default constructor from a GeometryModel. More...
 
bool operator!= (const GeometryData &other) const
 Returns true if *this and other are not equal. More...
 
GeometryDataoperator= (const GeometryData &other)
 Copy operator. More...
 
bool operator== (const GeometryData &other) const
 Returns true if *this and other are equal. More...
 
 PINOCCHIO_ALIGNED_STD_VECTOR (SE3) oMg
 Vector gathering the SE3 placements of the geometry objects relative to the world. See updateGeometryPlacements to update the placements. More...
 
void setActiveCollisionPairs (const GeometryModel &geom_model, const MatrixXb &collision_map, const bool upper=true)
 Set the collision pair association from a given input array. Each entry of the input matrix defines the activation of a given collision pair. More...
 
void setGeometryCollisionStatus (const GeometryModel &geom_model, const GeomIndex geom_id, bool enable_collision)
 Enable or disable collision for the given geometry given by its geometry id with all the other geometries registered in the list of collision pairs. More...
 
 ~GeometryData ()
 Destructor. More...
 
- Public Member Functions inherited from pinocchio::serialization::Serializable< GeometryData >
void loadFromBinary (boost::asio::streambuf &container)
 Loads a Derived object from a binary container. More...
 
void loadFromBinary (const std::string &filename)
 Loads a Derived object from an binary file. More...
 
void loadFromBinary (StaticBuffer &container)
 Loads a Derived object from a static binary container. More...
 
void loadFromString (const std::string &str)
 Loads a Derived object from a string. More...
 
void loadFromStringStream (std::istringstream &is)
 Loads a Derived object from a stream string. More...
 
void loadFromText (const std::string &filename)
 Loads a Derived object from a text file. More...
 
void loadFromXML (const std::string &filename, const std::string &tag_name)
 Loads a Derived object from an XML file. More...
 
void saveToBinary (boost::asio::streambuf &container) const
 Saves a Derived object as a binary container. More...
 
void saveToBinary (const std::string &filename) const
 Saves a Derived object as an binary file. More...
 
void saveToBinary (StaticBuffer &container) const
 Saves a Derived object as a static binary container. More...
 
std::string saveToString () const
 Saves a Derived object to a string. More...
 
void saveToStringStream (std::stringstream &ss) const
 Saves a Derived object to a string stream. More...
 
void saveToText (const std::string &filename) const
 Saves a Derived object as a text file. More...
 
void saveToXML (const std::string &filename, const std::string &tag_name) const
 Saves a Derived object as an XML file. More...
 

Public Attributes

std::vector< bool > activeCollisionPairs
 Vector of collision pairs. More...
 
std::map< JointIndex, GeomIndexListinnerObjects
 Map over vector GeomModel::geometryObjects, indexed by joints. More...
 
std::map< JointIndex, GeomIndexListouterObjects
 A list of associated collision GeometryObjects to a given joint Id. More...
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef context::Scalar Scalar
 

Friends

std::ostream & operator<< (std::ostream &os, const GeometryData &geomData)
 

Detailed Description

Definition at line 233 of file multibody/geometry.hpp.

Member Typedef Documentation

◆ GeomIndexList

Definition at line 246 of file multibody/geometry.hpp.

◆ MatrixXb

typedef Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic, Options> pinocchio::GeometryData::MatrixXb

Definition at line 247 of file multibody/geometry.hpp.

◆ MatrixXs

typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options> pinocchio::GeometryData::MatrixXs

Definition at line 248 of file multibody/geometry.hpp.

◆ SE3

Definition at line 245 of file multibody/geometry.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Options 

Definition at line 240 of file multibody/geometry.hpp.

Constructor & Destructor Documentation

◆ GeometryData() [1/3]

pinocchio::GeometryData::GeometryData ( const GeometryModel geom_model)
explicit

Default constructor from a GeometryModel.

Parameters
[in]geom_modelGeometryModel associated to the new GeometryData

◆ GeometryData() [2/3]

pinocchio::GeometryData::GeometryData ( const GeometryData other)

Copy constructor.

Parameters
[in]otherGeometryData to copy

◆ GeometryData() [3/3]

pinocchio::GeometryData::GeometryData ( )
inline

Empty constructor.

Definition at line 348 of file multibody/geometry.hpp.

◆ ~GeometryData()

pinocchio::GeometryData::~GeometryData ( )

Destructor.

Member Function Documentation

◆ activateAllCollisionPairs()

void pinocchio::GeometryData::activateAllCollisionPairs ( )

Activate all collision pairs.

See also
GeomData::deactivateAllCollisionPairs, GeomData::activateCollisionPair, GeomData::deactivateCollisionPair

◆ activateCollisionPair()

void pinocchio::GeometryData::activateCollisionPair ( const PairIndex  pair_id)

Activate a collision pair, for which collisions and distances would now be computed.

The collision (resp distance) between two geometries of GeomModel::geometryObjects is computed iff the corresponding pair has been added in GeomModel::collisionPairs AND it is active, i.e. the corresponding boolean in GeomData::activePairs is true. The second condition can be used to temporarily remove a pair without touching the model, in a versatile manner.

Parameters
[in]pair_idthe index of the pair in GeomModel::collisionPairs vector.

 

See also
GeomData

◆ deactivateAllCollisionPairs()

void pinocchio::GeometryData::deactivateAllCollisionPairs ( )

Deactivate all collision pairs.

See also
GeomData::activateAllCollisionPairs, GeomData::activateCollisionPair, GeomData::deactivateCollisionPair

◆ deactivateCollisionPair()

void pinocchio::GeometryData::deactivateCollisionPair ( const PairIndex  pair_id)

Deactivate a collision pair.

Calls indeed GeomData::activateCollisionPair(pair_id)

Parameters
[in]pair_idthe index of the pair in GeomModel::collisionPairs vector.
See also
GeomData::activateCollisionPair

◆ fillInnerOuterObjectMaps()

void pinocchio::GeometryData::fillInnerOuterObjectMaps ( const GeometryModel geomModel)

Fill both innerObjects and outerObjects maps, from vectors collisionObjects and collisionPairs.

This simply corresponds to storing in a re-arranged manner the information stored in geomModel.geometryObjects and geomModel.collisionPairs.

Parameters
[in]geomModelthe geometry model (const)
Warning
Outer objects are not duplicated (i.e. if a is in outerObjects[b], then b is not in outerObjects[a]).

◆ operator!=()

bool pinocchio::GeometryData::operator!= ( const GeometryData other) const
inline

Returns true if *this and other are not equal.

Definition at line 468 of file multibody/geometry.hpp.

◆ operator=()

GeometryData& pinocchio::GeometryData::operator= ( const GeometryData other)

Copy operator.

Parameters
[in]otherGeometryData to copy

◆ operator==()

bool pinocchio::GeometryData::operator== ( const GeometryData other) const
inline

Returns true if *this and other are equal.

Definition at line 452 of file multibody/geometry.hpp.

◆ PINOCCHIO_ALIGNED_STD_VECTOR()

pinocchio::GeometryData::PINOCCHIO_ALIGNED_STD_VECTOR ( SE3  )

Vector gathering the SE3 placements of the geometry objects relative to the world. See updateGeometryPlacements to update the placements.

oMg is used for pinocchio (kinematics) computation but is translated to fcl type for fcl (collision) computation. The copy is done in collisionObjects[i]->setTransform(.)

◆ setActiveCollisionPairs()

void pinocchio::GeometryData::setActiveCollisionPairs ( const GeometryModel geom_model,
const MatrixXb collision_map,
const bool  upper = true 
)

Set the collision pair association from a given input array. Each entry of the input matrix defines the activation of a given collision pair.

Parameters
[in]geom_modelGeometry model associated to the data.
[in]collision_mapAssociative array.
[in]upperWheter the collision_map is an upper or lower triangular filled array.

◆ setGeometryCollisionStatus()

void pinocchio::GeometryData::setGeometryCollisionStatus ( const GeometryModel geom_model,
const GeomIndex  geom_id,
bool  enable_collision 
)

Enable or disable collision for the given geometry given by its geometry id with all the other geometries registered in the list of collision pairs.

Parameters
[in]geom_modelGeometry model associated to the data.
[in]geom_idIndex of the geometry.
[in]enable_collisionIf true, the collision will be enable, otherwise disable.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const GeometryData geomData 
)
friend

Member Data Documentation

◆ activeCollisionPairs

std::vector<bool> pinocchio::GeometryData::activeCollisionPairs

Vector of collision pairs.

Definition at line 267 of file multibody/geometry.hpp.

◆ innerObjects

std::map<JointIndex, GeomIndexList> pinocchio::GeometryData::innerObjects

Map over vector GeomModel::geometryObjects, indexed by joints.

The map lists the collision GeometryObjects associated to a given joint Id. Inner objects can be seen as geometry objects that directly move when the associated joint moves

Definition at line 318 of file multibody/geometry.hpp.

◆ outerObjects

std::map<JointIndex, GeomIndexList> pinocchio::GeometryData::outerObjects

A list of associated collision GeometryObjects to a given joint Id.

Outer objects can be seen as geometry objects that may often be obstacles to the Inner objects of a given joint

Definition at line 324 of file multibody/geometry.hpp.

◆ Scalar

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef context::Scalar pinocchio::GeometryData::Scalar

Definition at line 239 of file multibody/geometry.hpp.


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


pinocchio
Author(s):
autogenerated on Mon Dec 16 2024 03:41:07