Public Types | |
enum | { Options = traits<GeometryModel>::Options } |
typedef std::vector< CollisionPair > | CollisionPairVector |
typedef ::pinocchio::GeometryObject | GeometryObject |
typedef pinocchio::GeomIndex | GeomIndex |
typedef Eigen::Matrix< bool, Eigen::Dynamic, Eigen::Dynamic, Options > | MatrixXb |
typedef Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, Options > | MatrixXi |
typedef traits< GeometryModel >::Scalar | Scalar |
typedef SE3Tpl< Scalar, Options > | SE3 |
![]() | |
typedef traits< GeometryModel >::Scalar | Scalar |
Public Member Functions | |
GeometryModel (const GeometryModel &other)=default | |
void | addAllCollisionPairs () |
Add all possible collision pairs. | |
void | addCollisionPair (const CollisionPair &pair) |
Add a collision pair into the vector of collision_pairs. The method check before if the given CollisionPair is already included. | |
GeomIndex | addGeometryObject (const GeometryObject &object) |
Add a geometry object to a GeometryModel. | |
template<typename S2 , int O2, template< typename, int > class _JointCollectionTpl> | |
GeomIndex | addGeometryObject (const GeometryObject &object, const ModelTpl< S2, O2, _JointCollectionTpl > &model) |
Add a geometry object to a GeometryModel and set its parent joint. | |
GeometryModel | clone () const |
Create a deep copy of *this. | |
bool | existCollisionPair (const CollisionPair &pair) const |
Check if a collision pair exists in collisionPairs. See also findCollisitionPair(const CollisionPair & pair). | |
bool | existGeometryName (const std::string &name) const |
Check if a GeometryObject given by its name exists. | |
PairIndex | findCollisionPair (const CollisionPair &pair) const |
Return the index of a given collision pair in collisionPairs. | |
GeomIndex | getGeometryId (const std::string &name) const |
Return the index of a GeometryObject given by its name. | |
bool | operator!= (const GeometryModel &other) const |
Returns true if *this and other are not equal. | |
bool | operator== (const GeometryModel &other) const |
Returns true if *this and other are equal. | |
typedef | PINOCCHIO_ALIGNED_STD_VECTOR (GeometryObject) GeometryObjectVector |
void | removeAllCollisionPairs () |
Remove all collision pairs from collisionPairs. Same as collisionPairs.clear(). | |
void | removeCollisionPair (const CollisionPair &pair) |
Remove if exists the CollisionPair from the vector collision_pairs. | |
void | removeGeometryObject (const std::string &name) |
Remove a GeometryObject. | |
void | setCollisionPairs (const MatrixXb &collision_map, const bool upper=true) |
Set the collision pairs from a given input array. Each entry of the input matrix defines the activation of a given collision pair (map[i,j] == true means that the pair (i,j) is active). | |
![]() | |
void | loadFromBinary (boost::asio::streambuf &container) |
Loads a Derived object from a binary container. | |
void | loadFromBinary (const std::string &filename) |
Loads a Derived object from an binary file. | |
void | loadFromBinary (StaticBuffer &container) |
Loads a Derived object from a static binary container. | |
void | loadFromString (const std::string &str) |
Loads a Derived object from a string. | |
void | loadFromStringStream (std::istringstream &is) |
Loads a Derived object from a stream string. | |
void | loadFromText (const std::string &filename) |
Loads a Derived object from a text file. | |
void | loadFromXML (const std::string &filename, const std::string &tag_name) |
Loads a Derived object from an XML file. | |
void | saveToBinary (boost::asio::streambuf &container) const |
Saves a Derived object as a binary container. | |
void | saveToBinary (const std::string &filename) const |
Saves a Derived object as an binary file. | |
void | saveToBinary (StaticBuffer &container) const |
Saves a Derived object as a static binary container. | |
std::string | saveToString () const |
Saves a Derived object to a string. | |
void | saveToStringStream (std::stringstream &ss) const |
Saves a Derived object to a string stream. | |
void | saveToText (const std::string &filename) const |
Saves a Derived object as a text file. | |
void | saveToXML (const std::string &filename, const std::string &tag_name) const |
Saves a Derived object as an XML file. | |
Public Attributes | |
MatrixXi | collisionPairMapping |
Matrix relating the collision pair ID to a pair of two GeometryObject indexes. | |
CollisionPairVector | collisionPairs |
Vector of collision pairs. | |
GeometryObjectVector | geometryObjects |
Vector of GeometryObjects used for collision computations. | |
Index | ngeoms |
The number of GeometryObjects. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const GeometryModel &model_geom) |
Definition at line 54 of file geometry.hpp.
typedef std::vector<CollisionPair> CollisionPairVector |
Definition at line 70 of file geometry.hpp.
Definition at line 68 of file geometry.hpp.
typedef pinocchio::GeomIndex GeomIndex |
Definition at line 74 of file geometry.hpp.
Definition at line 71 of file geometry.hpp.
Definition at line 72 of file geometry.hpp.
typedef traits<GeometryModel>::Scalar Scalar |
Definition at line 60 of file geometry.hpp.
Definition at line 66 of file geometry.hpp.
Definition at line 61 of file geometry.hpp.
|
inline |
Definition at line 76 of file geometry.hpp.
|
inline |
Definition at line 85 of file geometry.hpp.
void addAllCollisionPairs | ( | ) |
Add all possible collision pairs.
void addCollisionPair | ( | const CollisionPair & | pair | ) |
Add a collision pair into the vector of collision_pairs. The method check before if the given CollisionPair is already included.
[in] | pair | The CollisionPair to add. |
GeomIndex addGeometryObject | ( | const GeometryObject & | object | ) |
Add a geometry object to a GeometryModel.
[in] | object | Object |
GeomIndex addGeometryObject | ( | const GeometryObject & | object, |
const ModelTpl< S2, O2, _JointCollectionTpl > & | model | ||
) |
Add a geometry object to a GeometryModel and set its parent joint.
[in] | object | Object |
[in] | model | Corresponding model, used to assert the attributes of object. |
bool existCollisionPair | ( | const CollisionPair & | pair | ) | const |
Check if a collision pair exists in collisionPairs. See also findCollisitionPair(const CollisionPair & pair).
[in] | pair | The CollisionPair. |
Check if a GeometryObject given by its name exists.
[in] | name | Name of the GeometryObject |
PairIndex findCollisionPair | ( | const CollisionPair & | pair | ) | const |
Return the index of a given collision pair in collisionPairs.
[in] | pair | The CollisionPair. |
GeomIndex getGeometryId | ( | const std::string & | name | ) | const |
Return the index of a GeometryObject given by its name.
[in] | name | Name of the GeometryObject |
|
inline |
Returns true if *this and other are not equal.
Definition at line 210 of file geometry.hpp.
|
inline |
Returns true if *this and other are equal.
Definition at line 200 of file geometry.hpp.
void removeCollisionPair | ( | const CollisionPair & | pair | ) |
Remove if exists the CollisionPair from the vector collision_pairs.
[in] | pair | The CollisionPair to remove. |
Remove a GeometryObject.
[in] | name | Name of the GeometryObject |
@node Remove also the collision pairs that contain the object.
Set the collision pairs from a given input array. Each entry of the input matrix defines the activation of a given collision pair (map[i,j] == true means that the pair (i,j) is active).
[in] | collision_map | Associative array. |
[in] | upper | Wheter the collision_map is an upper or lower triangular filled array. |
MatrixXi collisionPairMapping |
Matrix relating the collision pair ID to a pair of two GeometryObject indexes.
Definition at line 227 of file geometry.hpp.
CollisionPairVector collisionPairs |
Vector of collision pairs.
Definition at line 224 of file geometry.hpp.
GeometryObjectVector geometryObjects |
Vector of GeometryObjects used for collision computations.
Definition at line 221 of file geometry.hpp.
Index ngeoms |
The number of GeometryObjects.
Definition at line 218 of file geometry.hpp.