18 #ifndef __se3_fcl_hpp__ 19 #define __se3_fcl_hpp__ 21 #include "pinocchio/spatial/se3.hpp" 22 #include "pinocchio/multibody/fwd.hpp" 23 #include "pinocchio/container/aligned-vector.hpp" 26 #include <hpp/fcl/collision_object.h> 27 #include <hpp/fcl/collision.h> 28 #include <hpp/fcl/distance.h> 29 #include <hpp/fcl/shape/geometric_shapes.h> 30 #include "pinocchio/spatial/fcl-pinocchio-conversions.hpp" 39 #include <boost/foreach.hpp> 40 #include <boost/shared_ptr.hpp> 47 typedef std::pair<GeomIndex, GeomIndex> Base;
51 void disp (std::ostream & os)
const;
52 friend std::ostream & operator << (std::ostream & os,
const CollisionPair & X);
56 typedef std::vector<CollisionPair> CollisionPairsVector_t;
63 struct FakeCollisionGeometry
65 FakeCollisionGeometry(){};
70 AABB(): min_(0), max_(1){};
75 typedef FakeCollisionGeometry CollisionGeometry;
79 #endif // WITH_HPP_FCL 89 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
105 boost::shared_ptr<fcl::CollisionGeometry>
fcl;
127 GeometryObject(
const std::string & name,
const FrameIndex parentF,
128 const JointIndex parentJ,
129 const boost::shared_ptr<fcl::CollisionGeometry> & collision,
130 const SE3 & placement,
const std::string & meshPath =
"",
131 const Eigen::Vector3d & meshScale = Eigen::Vector3d::Ones(),
132 const bool overrideMaterial =
false,
133 const Eigen::Vector4d & meshColor = Eigen::Vector4d::Zero(),
134 const std::string & meshTexturePath =
"")
136 , parentFrame(parentF)
137 , parentJoint(parentJ)
139 , placement(placement)
141 , meshScale(meshScale)
142 , overrideMaterial(overrideMaterial)
143 , meshColor(meshColor)
144 , meshTexturePath(meshTexturePath)
162 friend std::ostream & operator<< (std::ostream & os,
const GeometryObject & geomObject);
171 #include "pinocchio/multibody/fcl.hxx" 174 #endif // ifndef __se3_fcl_hpp__ JointIndex parentJoint
Index of the parent joint.
Eigen::Vector3d meshScale
Scaling vector applied to the fcl object.
boost::shared_ptr< fcl::CollisionGeometry > fcl
The actual cloud of points representing the collision mesh of the object after scaling.
CollisionPair(const GeomIndex co1, const GeomIndex co2)
Default constructor of a collision pair from two collision object indexes. The indexes must be ordere...
EIGEN_MAKE_ALIGNED_OPERATOR_NEW std::string name
Name of the geometry object.
std::string meshPath
Absolute path to the mesh file.
Eigen::Vector4d meshColor
RGBA color value of the mesh.
SE3 placement
Position of geometry object in parent joint frame.
std::string meshTexturePath
Absolute path to the mesh texture file.
FrameIndex parentFrame
Index of the parent frame.
bool overrideMaterial
Decide whether to override the Material.