39 #include <fcl/shape/geometric_shape_to_BVH_model.h> 40 #include <fcl/traversal/traversal_node_bvhs.h> 41 #include <fcl/traversal/traversal_node_setup.h> 42 #include <fcl/collision_node.h> 43 #include <boost/bind.hpp> 51 auto m =
new fcl::DynamicAABBTreeCollisionManager();
61 auto m =
new fcl::DynamicAABBTreeCollisionManager();
73 auto m =
new fcl::DynamicAABBTreeCollisionManager();
79 fcl_obj.second.registerTo(
manager_.get());
108 ROS_ERROR_NAMED(
"collision_detection.fcl",
"FCL continuous collision checking not yet implemented");
116 ROS_ERROR_NAMED(
"collision_detection.fcl",
"FCL continuous collision checking not yet implemented");
179 for (std::size_t i = 0; i < obj->
shapes_.size(); ++i)
197 jt->second.unregisterFrom(
manager_.get());
209 jt->second.registerTo(
manager_.get());
255 it->second.unregisterFrom(
manager_.get());
Representation of a collision checking request.
void updateFCLObject(const std::string &id)
void constructFCLObject(const robot_state::RobotState &state, FCLObject &fcl_obj) const
const WorldPtr & getWorld()
bool done_
Flag indicating whether collision checking is complete.
void checkRobotCollisionHelper(const CollisionRequest &req, CollisionResult &res, const CollisionRobot &robot, const robot_state::RobotState &state, const AllowedCollisionMatrix *acm) const
FCLGeometryConstPtr createCollisionGeometry(const shapes::ShapeConstPtr &shape, const robot_model::LinkModel *link, int shape_index)
static const std::string NAME_
virtual void distanceRobot(const DistanceRequest &req, DistanceResult &res, const CollisionRobot &robot, const robot_state::RobotState &state) const override
Compute the distance between a robot and the world.
const AllowedCollisionMatrix * acm
The allowed collision matrix used to filter checks.
std::vector< shapes::ShapeConstPtr > shapes_
All the shapes making up this object.
bool collisionCallback(fcl::CollisionObject *o1, fcl::CollisionObject *o2, void *data)
virtual void distanceWorld(const DistanceRequest &req, DistanceResult &res, const CollisionWorld &world) const override
Compute the distance between another world.
bool distance
If true, compute proximity distance.
DistanceResultsData minimum_distance
ResultsData for the two objects with the minimum distance.
Represents an action that occurred on an object in the world. Several bits may be set indicating seve...
Representation of a collision checking result.
const robot_model::RobotModelConstPtr & getRobotModel() const
The kinematic model corresponding to this collision model.
std::unique_ptr< fcl::BroadPhaseCollisionManager > manager_
Generic interface to collision detection.
void enableGroup(const robot_model::RobotModelConstPtr &kmodel)
Compute active_components_only_ based on req_.
double distance
Closest distance between two bodies.
World::ObjectConstPtr ObjectConstPtr
virtual void setWorld(const WorldPtr &world)
A representation of an object.
void checkWorldCollisionHelper(const CollisionRequest &req, CollisionResult &res, const CollisionWorld &other_world, const AllowedCollisionMatrix *acm) const
virtual void checkWorldCollision(const CollisionRequest &req, CollisionResult &res, const CollisionWorld &other_world) const
Check whether a given set of objects is in collision with objects from another world. Any contacts are considered.
Definition of a structure for the allowed collision matrix. All elements in the collision world are r...
void cleanCollisionGeometryCache()
This class represents a collision model of the robot and can be used for self collision checks (to ch...
std::string group_name
The group name to check collisions for (optional; if empty, assume the complete robot) ...
std::vector< FCLGeometryConstPtr > collision_geometry_
double distance
The distance between two objects. If two objects are in collision, distance <= 0. ...
std::vector< FCLCollisionObjectPtr > collision_objects_
virtual void checkRobotCollision(const CollisionRequest &req, CollisionResult &res, const CollisionRobot &robot, const robot_state::RobotState &state) const
Check whether the robot model is in collision with the world. Any collisions between a robot link and...
virtual void setWorld(const WorldPtr &world)
virtual ~CollisionWorldFCL()
Perform collision checking with the environment. The collision world maintains a representation of th...
void enableGroup(const robot_model::RobotModelConstPtr &kmodel)
Compute active_components_only_ based on req_.
void transform2fcl(const Eigen::Affine3d &b, fcl::Transform3f &f)
#define ROS_ERROR_NAMED(name,...)
Representation of a robot's state. This includes position, velocity, acceleration and effort...
void notifyObjectChange(const ObjectConstPtr &obj, World::Action action)
World::ObserverHandle observer_handle_
bool done
Indicates if distance query is finished.
bool distanceCallback(fcl::CollisionObject *o1, fcl::CollisionObject *o2, void *data, double &min_dist)
EigenSTL::vector_Affine3d shape_poses_
The poses of the corresponding entries in shapes_.
std::string group_name
The group name.
std::shared_ptr< fcl::CollisionObject > FCLCollisionObjectPtr
std::map< std::string, FCLObject > fcl_objs_
void constructFCLObject(const World::Object *obj, FCLObject &fcl_obj) const