5 #ifndef __pinocchio_multibody_fcl_hpp__ 6 #define __pinocchio_multibody_fcl_hpp__ 8 #include "pinocchio/spatial/se3.hpp" 9 #include "pinocchio/multibody/fwd.hpp" 10 #include "pinocchio/container/aligned-vector.hpp" 12 #ifdef PINOCCHIO_WITH_HPP_FCL 13 #include <hpp/fcl/collision_object.h> 14 #include <hpp/fcl/collision.h> 15 #include <hpp/fcl/distance.h> 16 #include <hpp/fcl/shape/geometric_shapes.h> 17 #include "pinocchio/spatial/fcl-pinocchio-conversions.hpp" 27 #include <boost/foreach.hpp> 28 #include <boost/shared_ptr.hpp> 35 typedef std::pair<GeomIndex, GeomIndex> Base;
39 void disp (std::ostream & os)
const;
40 friend std::ostream & operator << (std::ostream & os,
const CollisionPair & X);
44 #ifndef PINOCCHIO_WITH_HPP_FCL 49 struct FakeCollisionGeometry
51 FakeCollisionGeometry(){};
53 bool operator==(
const FakeCollisionGeometry &)
const 61 AABB(): min_(0), max_(1){};
67 typedef FakeCollisionGeometry CollisionGeometry;
73 namespace fcl = hpp::fcl;
75 #endif // PINOCCHIO_WITH_HPP_FCL 85 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
87 typedef boost::shared_ptr<fcl::CollisionGeometry> CollisionGeometryPtr;
107 PINOCCHIO_DEPRECATED CollisionGeometryPtr &
fcl;
127 #pragma GCC diagnostic push 128 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 144 const FrameIndex parent_frame,
145 const JointIndex parent_joint,
146 const CollisionGeometryPtr & collision_geometry,
147 const SE3 & placement,
148 const std::string & meshPath =
"",
149 const Eigen::Vector3d & meshScale = Eigen::Vector3d::Ones(),
150 const bool overrideMaterial =
false,
151 const Eigen::Vector4d & meshColor = Eigen::Vector4d::Zero(),
152 const std::string & meshTexturePath =
"")
154 , parentFrame(parent_frame)
155 , parentJoint(parent_joint)
156 , geometry(collision_geometry)
158 , placement(placement)
160 , meshScale(meshScale)
161 , overrideMaterial(overrideMaterial)
162 , meshColor(meshColor)
163 , meshTexturePath(meshTexturePath)
165 #pragma GCC diagnostic pop 167 #pragma GCC diagnostic push 168 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 184 const JointIndex parent_joint,
185 const CollisionGeometryPtr & collision_geometry,
186 const SE3 & placement,
187 const std::string & meshPath =
"",
188 const Eigen::Vector3d & meshScale = Eigen::Vector3d::Ones(),
189 const bool overrideMaterial =
false,
190 const Eigen::Vector4d & meshColor = Eigen::Vector4d::Zero(),
191 const std::string & meshTexturePath =
"")
193 , parentFrame(std::numeric_limits<FrameIndex>::max())
194 , parentJoint(parent_joint)
195 , geometry(collision_geometry)
197 , placement(placement)
199 , meshScale(meshScale)
200 , overrideMaterial(overrideMaterial)
201 , meshColor(meshColor)
202 , meshTexturePath(meshTexturePath)
204 #pragma GCC diagnostic pop 206 #pragma GCC diagnostic push 207 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 213 #pragma GCC diagnostic pop 230 friend std::ostream & operator<< (std::ostream & os,
const GeometryObject & geomObject);
239 #include "pinocchio/multibody/fcl.hxx" 241 #endif // ifndef __pinocchio_multibody_fcl_hpp__
CollisionGeometryPtr geometry
The FCL CollisionGeometry (might be a Mesh, a Geometry Primitive, etc.)
std::string name(const LieGroupGenericTpl< LieGroupCollection > &lg)
Visit a LieGroupVariant to get the name of it.
bool overrideMaterial
Decide whether to override the Material.
Eigen::Vector3d meshScale
Scaling vector applied to the GeometryObject::fcl object.
std::string meshTexturePath
Absolute path to the mesh texture file.
JointIndex parentJoint
Index of the parent joint.
std::string name
Name of the geometry object.
std::string meshPath
Absolute path to the mesh file (if the fcl pointee is also a Mesh)
Main pinocchio namespace.
SE3 placement
Position of geometry object in parent joint frame.
Eigen::Vector4d meshColor
RGBA color value of the GeometryObject::fcl object.
FrameIndex parentFrame
Index of the parent frame.
PINOCCHIO_DEPRECATED CollisionGeometryPtr & fcl
The former pointer to the FCL CollisionGeometry.