00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef MOVEIT_COLLISION_DISTANCE_FIELD_COLLISION_WORLD_HYBRID_H_
00038 #define MOVEIT_COLLISION_DISTANCE_FIELD_COLLISION_WORLD_HYBRID_H_
00039
00040 #include <moveit/collision_detection_fcl/collision_world_fcl.h>
00041 #include <moveit/collision_distance_field/collision_distance_field_types.h>
00042 #include <moveit/collision_distance_field/collision_world_distance_field.h>
00043
00044 namespace collision_detection
00045 {
00046 class CollisionRobotHybrid;
00047
00048 class CollisionWorldHybrid : public CollisionWorldFCL
00049 {
00050 public:
00051 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00052 CollisionWorldHybrid(Eigen::Vector3d size = Eigen::Vector3d(3, 3, 4),
00053 Eigen::Vector3d origin = Eigen::Vector3d(0, 0, 0), bool use_signed_distance_field = false,
00054 double resolution = .02, double collision_tolerance = 0.0,
00055 double max_propogation_distance = .25);
00056
00057 explicit CollisionWorldHybrid(const WorldPtr& world, Eigen::Vector3d size = Eigen::Vector3d(3, 3, 4),
00058 Eigen::Vector3d origin = Eigen::Vector3d(0, 0, 0),
00059 bool use_signed_distance_field = false, double resolution = .02,
00060 double collision_tolerance = 0.0, double max_propogation_distance = .25);
00061
00062 CollisionWorldHybrid(const CollisionWorldHybrid& other, const WorldPtr& world);
00063
00064 virtual ~CollisionWorldHybrid()
00065 {
00066 }
00067
00068 void checkCollisionDistanceField(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
00069 const robot_state::RobotState& state) const;
00070
00071 void checkCollisionDistanceField(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
00072 const robot_state::RobotState& state,
00073 boost::shared_ptr<GroupStateRepresentation>& gsr) const;
00074
00075 void checkCollisionDistanceField(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
00076 const robot_state::RobotState& state, const AllowedCollisionMatrix& acm) const;
00077
00078 void checkCollisionDistanceField(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
00079 const robot_state::RobotState& state, const AllowedCollisionMatrix& acm,
00080 boost::shared_ptr<GroupStateRepresentation>& gsr) const;
00081
00082 void checkRobotCollisionDistanceField(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
00083 const robot_state::RobotState& state) const;
00084
00085 void checkRobotCollisionDistanceField(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
00086 const robot_state::RobotState& state,
00087 boost::shared_ptr<GroupStateRepresentation>& gsr) const;
00088
00089 void checkRobotCollisionDistanceField(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
00090 const robot_state::RobotState& state, const AllowedCollisionMatrix& acm) const;
00091
00092 void checkRobotCollisionDistanceField(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
00093 const robot_state::RobotState& state, const AllowedCollisionMatrix& acm,
00094 boost::shared_ptr<GroupStateRepresentation>& gsr) const;
00095
00096 virtual void setWorld(const WorldPtr& world);
00097
00098 void getCollisionGradients(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
00099 const robot_state::RobotState& state, const AllowedCollisionMatrix* acm,
00100 boost::shared_ptr<GroupStateRepresentation>& gsr) const;
00101
00102 void getAllCollisions(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
00103 const robot_state::RobotState& state, const AllowedCollisionMatrix* acm,
00104 boost::shared_ptr<GroupStateRepresentation>& gsr) const;
00105
00106 const boost::shared_ptr<const collision_detection::CollisionWorldDistanceField> getCollisionWorldDistanceField() const
00107 {
00108 return cworld_distance_;
00109 }
00110
00111 protected:
00112 boost::shared_ptr<collision_detection::CollisionWorldDistanceField> cworld_distance_;
00113 };
00114 }
00115
00116 #endif