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 = 0 }
 
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 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 (const GeometryModel &geom_model)
 Default constructor from a GeometryModel. More...
 
 GeometryData (const GeometryData &other)
 Copy constructor. More...
 
 GeometryData ()
 Empty constructor. More...
 
bool operator!= (const GeometryData &other) const
 Returns true if *this and other are not equal. 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 (const std::string &filename)
 Loads a Derived object from an binary file. More...
 
void loadFromBinary (boost::asio::streambuf &container)
 Loads a Derived object from a binary container. 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 (const std::string &filename) const
 Saves a Derived object as an binary file. More...
 
void saveToBinary (boost::asio::streambuf &container) const
 Saves a Derived object as a binary container. 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 double Scalar
 

Friends

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

Detailed Description

Definition at line 178 of file src/multibody/geometry.hpp.

Member Typedef Documentation

Definition at line 187 of file src/multibody/geometry.hpp.

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

Definition at line 188 of file src/multibody/geometry.hpp.

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

Definition at line 189 of file src/multibody/geometry.hpp.

Definition at line 186 of file src/multibody/geometry.hpp.

Member Enumeration Documentation

anonymous enum
Enumerator
Options 

Definition at line 184 of file src/multibody/geometry.hpp.

Constructor & Destructor Documentation

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

Default constructor from a GeometryModel.

Parameters
[in]geom_modelGeometryModel associated to the new GeometryData
pinocchio::GeometryData::GeometryData ( const GeometryData other)

Copy constructor.

Parameters
[in]otherGeometryData to copy
pinocchio::GeometryData::GeometryData ( )
inline

Empty constructor.

Definition at line 281 of file src/multibody/geometry.hpp.

pinocchio::GeometryData::~GeometryData ( )

Destructor.

Member Function Documentation

void pinocchio::GeometryData::activateAllCollisionPairs ( )

Activate all collision pairs.

See also
GeomData::deactivateAllCollisionPairs, GeomData::activateCollisionPair, GeomData::deactivateCollisionPair
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
void pinocchio::GeometryData::deactivateAllCollisionPairs ( )

Deactivate all collision pairs.

See also
GeomData::activateAllCollisionPairs, GeomData::activateCollisionPair, GeomData::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
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]).
bool pinocchio::GeometryData::operator!= ( const GeometryData other) const
inline

Returns true if *this and other are not equal.

Definition at line 399 of file src/multibody/geometry.hpp.

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

Returns true if *this and other are equal.

Definition at line 378 of file src/multibody/geometry.hpp.

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(.)

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.
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

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

Member Data Documentation

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

Vector of collision pairs.

Definition at line 208 of file src/multibody/geometry.hpp.

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 258 of file src/multibody/geometry.hpp.

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 264 of file src/multibody/geometry.hpp.

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef double pinocchio::GeometryData::Scalar

Definition at line 183 of file src/multibody/geometry.hpp.


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


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:05