collision_world_hybrid.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2012, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Author: E. Gil Jones */
36 
37 #ifndef MOVEIT_COLLISION_DISTANCE_FIELD_COLLISION_WORLD_HYBRID_H_
38 #define MOVEIT_COLLISION_DISTANCE_FIELD_COLLISION_WORLD_HYBRID_H_
39 
43 
44 namespace collision_detection
45 {
46 class CollisionRobotHybrid;
47 
49 {
50 public:
52  CollisionWorldHybrid(Eigen::Vector3d size = Eigen::Vector3d(3, 3, 4),
53  Eigen::Vector3d origin = Eigen::Vector3d(0, 0, 0), bool use_signed_distance_field = false,
54  double resolution = .02, double collision_tolerance = 0.0,
55  double max_propogation_distance = .25);
56 
57  explicit CollisionWorldHybrid(const WorldPtr& world, Eigen::Vector3d size = Eigen::Vector3d(3, 3, 4),
58  Eigen::Vector3d origin = Eigen::Vector3d(0, 0, 0),
59  bool use_signed_distance_field = false, double resolution = .02,
60  double collision_tolerance = 0.0, double max_propogation_distance = .25);
61 
62  CollisionWorldHybrid(const CollisionWorldHybrid& other, const WorldPtr& world);
63 
65  {
66  }
67 
69  const robot_state::RobotState& state) const;
70 
72  const robot_state::RobotState& state, GroupStateRepresentationPtr& gsr) const;
73 
75  const robot_state::RobotState& state, const AllowedCollisionMatrix& acm) const;
76 
78  const robot_state::RobotState& state, const AllowedCollisionMatrix& acm,
79  GroupStateRepresentationPtr& gsr) const;
80 
82  const robot_state::RobotState& state) const;
83 
85  const robot_state::RobotState& state, GroupStateRepresentationPtr& gsr) const;
86 
88  const robot_state::RobotState& state, const AllowedCollisionMatrix& acm) const;
89 
91  const robot_state::RobotState& state, const AllowedCollisionMatrix& acm,
92  GroupStateRepresentationPtr& gsr) const;
93 
94  virtual void setWorld(const WorldPtr& world);
95 
96  void getCollisionGradients(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
97  const robot_state::RobotState& state, const AllowedCollisionMatrix* acm,
98  GroupStateRepresentationPtr& gsr) const;
99 
100  void getAllCollisions(const CollisionRequest& req, CollisionResult& res, const CollisionRobot& robot,
101  const robot_state::RobotState& state, const AllowedCollisionMatrix* acm,
102  GroupStateRepresentationPtr& gsr) const;
103 
104  const CollisionWorldDistanceFieldConstPtr getCollisionWorldDistanceField() const
105  {
106  return cworld_distance_;
107  }
108 
109 protected:
110  CollisionWorldDistanceFieldPtr cworld_distance_;
111 };
112 }
113 
114 #endif
void getCollisionGradients(const CollisionRequest &req, CollisionResult &res, const CollisionRobot &robot, const robot_state::RobotState &state, const AllowedCollisionMatrix *acm, GroupStateRepresentationPtr &gsr) const
void checkRobotCollisionDistanceField(const CollisionRequest &req, CollisionResult &res, const CollisionRobot &robot, const robot_state::RobotState &state) const
void getAllCollisions(const CollisionRequest &req, CollisionResult &res, const CollisionRobot &robot, const robot_state::RobotState &state, const AllowedCollisionMatrix *acm, GroupStateRepresentationPtr &gsr) const
CollisionWorldDistanceFieldPtr cworld_distance_
virtual void setWorld(const WorldPtr &world)
Generic interface to collision detection.
static const double resolution
Definition of a structure for the allowed collision matrix. All elements in the collision world are r...
This class represents a collision model of the robot and can be used for self collision checks (to ch...
ROS/KDL based interface for the inverse kinematics of the PR2 arm.
void checkCollisionDistanceField(const CollisionRequest &req, CollisionResult &res, const CollisionRobot &robot, const robot_state::RobotState &state) const
Representation of a robot's state. This includes position, velocity, acceleration and effort...
Definition: robot_state.h:123
const CollisionWorldDistanceFieldConstPtr getCollisionWorldDistanceField() const
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CollisionWorldHybrid(Eigen::Vector3d size=Eigen::Vector3d(3, 3, 4), Eigen::Vector3d origin=Eigen::Vector3d(0, 0, 0), bool use_signed_distance_field=false, double resolution=.02, double collision_tolerance=0.0, double max_propogation_distance=.25)


moveit_core
Author(s): Ioan Sucan , Sachin Chitta , Acorn Pooley
autogenerated on Fri Jul 12 2019 03:52:06