5 #ifndef __pinocchio_multibody_geometry_hpp__ 6 #define __pinocchio_multibody_geometry_hpp__ 8 #include "pinocchio/multibody/fcl.hpp" 9 #include "pinocchio/multibody/fwd.hpp" 10 #include "pinocchio/container/aligned-vector.hpp" 12 #include <boost/foreach.hpp> 23 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
25 typedef double Scalar;
31 typedef PINOCCHIO_ALIGNED_STD_VECTOR(GeometryObject) GeometryObjectVector;
32 typedef std::vector<CollisionPair> CollisionPairVector;
34 typedef pinocchio::GeomIndex GeomIndex;
53 template<
typename S2,
int O2,
template<
typename,
int>
class _JointCollectionTpl>
149 return !(*
this == other);
152 friend std::ostream& operator<<(std::ostream & os,
169 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
171 typedef double Scalar;
172 enum { Options = 0 };
175 typedef std::vector<GeomIndex> GeomIndexList;
184 PINOCCHIO_ALIGNED_STD_VECTOR(SE3) oMg;
191 #ifdef PINOCCHIO_WITH_HPP_FCL 192 std::vector<fcl::CollisionObject> collisionObjects PINOCCHIO_DEPRECATED;
245 #endif // PINOCCHIO_WITH_HPP_FCL 272 void fillInnerOuterObjectMaps(
const GeometryModel & geomModel);
287 void activateCollisionPair(
const PairIndex pairId);
298 void deactivateCollisionPair(
const PairIndex pairId);
300 friend std::ostream & operator<<(std::ostream & os,
const GeometryData & geomData);
309 #include "pinocchio/multibody/geometry.hxx" 311 #endif // ifndef __pinocchio_multibody_geometry_hpp__
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 equal.
GeomIndex addGeometryObject(const GeometryObject &object, const ModelTpl< S2, O2, _JointCollectionTpl > &model)
Add a geometry object to a GeometryModel and set its parent joint.
CollisionPairVector collisionPairs
Vector of collision pairs.
std::vector< fcl::DistanceResult > distanceResults
Vector gathering the result of the distance computation for all the collision pairs.
std::string name(const LieGroupGenericTpl< LieGroupCollection > &lg)
Visit a LieGroupVariant to get the name of it.
std::vector< fcl::CollisionResult > collisionResults
Vector gathering the result of the collision computation for all the collision pairs.
fcl::DistanceRequest distanceRequest PINOCCHIO_DEPRECATED
Defines what information should be computed by distance computation.
bool existCollisionPair(const CollisionPair &pair) const
Check if a collision pair exists in collisionPairs. See also findCollisitionPair(const CollisionPair ...
void removeAllCollisionPairs()
Remove all collision pairs from collisionPairs. Same as collisionPairs.clear().
std::vector< double > radius
Radius of the bodies, i.e. distance of the further point of the geometry model attached to the body f...
void removeCollisionPair(const CollisionPair &pair)
Remove if exists the CollisionPair from the vector collision_pairs.
std::vector< fcl::DistanceRequest > distanceRequests
Defines what information should be computed by distance computation. There is one request per pair of...
std::map< JointIndex, GeomIndexList > outerObjects
A list of associated collision GeometryObjects to a given joint Id.
Index ngeoms
The number of GeometryObjects.
std::vector< bool > activeCollisionPairs
Vector of collision pairs.
std::map< JointIndex, GeomIndexList > innerObjects
Map over vector GeomModel::geometryObjects, indexed by joints.
void addAllCollisionPairs()
Add all possible collision pairs.
Main pinocchio namespace.
fcl::CollisionRequest collisionRequest PINOCCHIO_DEPRECATED
Defines what information should be computed by collision test.
bool operator!=(const GeometryModel &other) const
Returns true if *this and other are not equal.
PairIndex collisionPairIndex
Index of the collision pair.
bool existGeometryName(const std::string &name) const
Check if a GeometryObject given by its name exists.
void addCollisionPair(const CollisionPair &pair)
Add a collision pair into the vector of collision_pairs. The method check before if the given Collisi...
PairIndex findCollisionPair(const CollisionPair &pair) const
Return the index of a given collision pair in collisionPairs.
std::vector< fcl::CollisionRequest > collisionRequests
Defines what information should be computed by collision test. There is one request per pair of geome...
GeometryObjectVector geometryObjects
Vector of GeometryObjects used for collision computations.