18 #ifndef __se3_geom_hpp__ 19 #define __se3_geom_hpp__ 22 #include "pinocchio/multibody/fcl.hpp" 23 #include "pinocchio/multibody/model.hpp" 24 #include "pinocchio/container/aligned-vector.hpp" 28 #include <boost/foreach.hpp> 40 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
57 const std::size_t num_max_collision_pairs = (ngeoms * (ngeoms-1))/2;
58 collisionPairs.reserve(num_max_collision_pairs);
75 const bool autofillJointParent =
false);
104 PINOCCHIO_DEPRECATED
const std::string &
getGeometryName(
const GeomIndex index)
const;
153 #endif // WITH_HPP_FCL 155 friend std::ostream& operator<<(std::ostream & os,
const GeometryModel & model_geom);
160 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
172 std::vector<fcl::CollisionObject> collisionObjects;
219 typedef std::vector<GeomIndex> GeomIndexList;
232 #endif // WITH_HPP_FCL 248 void fillInnerOuterObjectMaps(
const GeometryModel & geomModel);
259 void activateCollisionPair(
const PairIndex pairId,
const bool flag=
true);
265 void deactivateCollisionPair(
const PairIndex pairId);
267 #endif //WITH_HPP_FCL 268 friend std::ostream & operator<<(std::ostream & os,
const GeometryData & geomData);
277 #include "pinocchio/multibody/geometry.hxx" 279 #endif // ifndef __se3_geom_hpp__ container::aligned_vector< GeometryObject > geometryObjects
Vector of GeometryObjects used for collision computations.
GeomIndex getGeometryId(const std::string &name) const
Return the index of a GeometryObject given by its name.
void addCollisionPair(const CollisionPair &pair)
Add a collision pair into the vector of collision_pairs. The method check before if the given Collisi...
void removeAllCollisionPairs()
Remove all collision pairs from collisionPairs. Same as collisionPairs.clear().
std::vector< bool > activeCollisionPairs
Vector of collision pairs.
void addAllCollisionPairs()
Add all possible collision pairs.
PINOCCHIO_DEPRECATED const std::string & getGeometryName(const GeomIndex index) const
Get the name of a GeometryObject given by its index.
std::string name(const LieGroupVariant &lg)
Visit a LieGroupVariant to get the name of it.
fcl::CollisionRequest collisionRequest
Defines what information should be computed by collision test.
std::vector< fcl::CollisionResult > collisionResults
Vector gathering the result of the collision computation for all the collision pairs.
std::vector< CollisionPair > collisionPairs
Vector of collision pairs.
std::vector< fcl::DistanceResult > distanceResults
Vector gathering the result of the distance computation for all the collision pairs.
void removeCollisionPair(const CollisionPair &pair)
Remove if exists the CollisionPair from the vector collision_pairs.
std::map< JointIndex, GeomIndexList > innerObjects
Map over vector GeomModel::geometryObjects, indexed by joints.
fcl::DistanceRequest distanceRequest
Defines what information should be computed by distance computation.
PairIndex collisionPairIndex
index of the collision pair
bool existCollisionPair(const CollisionPair &pair) const
Check if a collision pair exists in collisionPairs. See also findCollisitionPair(const CollisionPair ...
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Index ngeoms
The number of GeometryObjects.
std::vector< double > radius
Radius of the bodies, i.e. distance of the further point of the geometry model attached to the body f...
EIGEN_MAKE_ALIGNED_OPERATOR_NEW container::aligned_vector< se3::SE3 > oMg
Vector gathering the SE3 placements of the geometry objects relative to the world. See updateGeometryPlacements to update the placements.
std::map< JointIndex, GeomIndexList > outerObjects
A list of associated collision GeometryObjects to a given joint Id.
GeomIndex addGeometryObject(GeometryObject object, const Model &model, const bool autofillJointParent=false)
Add a geometry object to a GeometryModel.
PairIndex findCollisionPair(const CollisionPair &pair) const
Return the index of a given collision pair in collisionPairs.
Specialization of an std::vector with an aligned allocator. This specialization might be used when th...
bool existGeometryName(const std::string &name) const
Check if a GeometryObject given by its name exists.