Public Types | |
enum | { Options = context::Options } |
typedef ::pinocchio::ComputeCollision | ComputeCollision |
typedef ::pinocchio::ComputeDistance | ComputeDistance |
typedef std::vector< GeomIndex > | GeomIndexList |
typedef Eigen::Matrix< bool, Eigen::Dynamic, Eigen::Dynamic, Options > | MatrixXb |
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > | MatrixXs |
typedef context::Scalar | Scalar |
typedef SE3Tpl< Scalar, Options > | SE3 |
Public Types inherited from NumericalBase< GeometryData > | |
typedef traits< GeometryData >::Scalar | Scalar |
Public Member Functions | |
GeometryData () | |
Empty constructor. | |
GeometryData (const GeometryData &other) | |
Copy constructor. More... | |
GeometryData (const GeometryModel &geom_model) | |
Default constructor from a GeometryModel. More... | |
~GeometryData () | |
Destructor. | |
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) |
bool | operator!= (const GeometryData &other) const |
Returns true if *this and other are not equal. | |
GeometryData & | operator= (const GeometryData &other) |
Copy operator. More... | |
bool | operator== (const GeometryData &other) const |
Returns true if *this and other are equal. | |
PINOCCHIO_ALIGNED_STD_VECTOR (ComputeCollision) collision_functors | |
More... | |
PINOCCHIO_ALIGNED_STD_VECTOR (ComputeDistance) distance_functors | |
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... | |
void | setSecurityMargins (const GeometryModel &geom_model, const MatrixXs &security_margin_map, const bool upper=true, const bool sync_distance_upper_bound=false) |
Set the security margin of all the collision request in a row, according to the values stored in the associative map. More... | |
Public Member Functions inherited from Serializable< GeometryData > | |
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 | |
std::vector< bool > | activeCollisionPairs |
Vector of collision pairs. | |
PairIndex | collisionPairIndex |
Index of the collision pair. More... | |
std::vector< fcl::CollisionRequest > | collisionRequests |
Defines what information should be computed by collision test. There is one request per pair of geometries. | |
std::vector< fcl::CollisionResult > | collisionResults |
Vector gathering the result of the collision computation for all the collision pairs. | |
std::vector< fcl::DistanceRequest > | distanceRequests |
Defines what information should be computed by distance computation. There is one request per pair of geometries. | |
std::vector< fcl::DistanceResult > | distanceResults |
Vector gathering the result of the distance computation for all the collision pairs. | |
std::map< JointIndex, GeomIndexList > | innerObjects |
Map over vector GeomModel::geometryObjects, indexed by joints. More... | |
std::map< JointIndex, GeomIndexList > | outerObjects |
A list of associated collision GeometryObjects to a given joint Id. More... | |
std::vector< Scalar > | radius |
Radius of the bodies, i.e. distance of the further point of the geometry model attached to the body from the joint center. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const GeometryData &geomData) |
Definition at line 233 of file geometry.hpp.
|
explicit |
Default constructor from a GeometryModel.
[in] | geom_model | GeometryModel associated to the new GeometryData |
GeometryData | ( | const GeometryData & | other | ) |
Copy constructor.
[in] | other | GeometryData to copy |
void activateAllCollisionPairs | ( | ) |
Activate all collision pairs.
void 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.
[in] | pair_id | the index of the pair in GeomModel::collisionPairs vector. |
void deactivateAllCollisionPairs | ( | ) |
Deactivate all collision pairs.
void deactivateCollisionPair | ( | const PairIndex | pair_id | ) |
Deactivate a collision pair.
Calls indeed GeomData::activateCollisionPair(pair_id)
[in] | pair_id | the index of the pair in GeomModel::collisionPairs vector. |
void 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.
[in] | geomModel | the geometry model (const) |
GeometryData& operator= | ( | const GeometryData & | other | ) |
Copy operator.
[in] | other | GeometryData to copy |
PINOCCHIO_ALIGNED_STD_VECTOR | ( | ComputeCollision | ) |
Functor associated to the computation of collisions.
PINOCCHIO_ALIGNED_STD_VECTOR | ( | ComputeDistance | ) |
Functor associated to the computation of distances.
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 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.
[in] | geom_model | Geometry model associated to the data. |
[in] | collision_map | Associative array. |
[in] | upper | Wheter the collision_map is an upper or lower triangular filled array. |
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.
[in] | geom_model | Geometry model associated to the data. |
[in] | geom_id | Index of the geometry. |
[in] | enable_collision | If true, the collision will be enable, otherwise disable. |
void setSecurityMargins | ( | const GeometryModel & | geom_model, |
const MatrixXs & | security_margin_map, | ||
const bool | upper = true , |
||
const bool | sync_distance_upper_bound = false |
||
) |
Set the security margin of all the collision request in a row, according to the values stored in the associative map.
[in] | geom_model | Geometry model associated to the data. |
[in] | security_margin_map | Associative map related the security margin of a given input collision pair (i,j). |
[in] | upper | Wheter the security_margin_map is an upper or lower triangular filled array. |
[in] | sync_distance_upper_bound | Wheter distance_upper_bound have fields to be updated with the security margin value. |
PairIndex collisionPairIndex |
Index of the collision pair.
It is used by some method to return additional information. For instance, the algo computeCollisions() sets it to the first colliding pair.
Definition at line 303 of file geometry.hpp.
std::map<JointIndex, GeomIndexList> 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 geometry.hpp.
std::map<JointIndex, GeomIndexList> 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 geometry.hpp.