collision_robot_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_ROBOT_HYBRID_H_
38 #define MOVEIT_COLLISION_DISTANCE_FIELD_COLLISION_ROBOT_HYBRID_H_
39 
44 
45 #include <boost/thread/mutex.hpp>
46 
47 namespace collision_detection
48 {
50 {
51 public:
53 
54  CollisionRobotHybrid(const robot_model::RobotModelConstPtr& kmodel);
55 
56  CollisionRobotHybrid(const robot_model::RobotModelConstPtr& kmodel,
57  const std::map<std::string, std::vector<CollisionSphere>>& link_body_decompositions,
58  double size_x = 3.0, double size_y = 3.0, double size_z = 4.0,
59  bool use_signed_distance_field = false, double resolution = .02,
60  double collision_tolerance = 0.0, double max_propogation_distance = .25, double padding = 0.0,
61  double scale = 1.0);
62 
63  CollisionRobotHybrid(const CollisionRobotHybrid& other);
64 
65  void initializeRobotDistanceField(const std::map<std::string, std::vector<CollisionSphere>>& link_body_decompositions,
66  double size_x, double size_y, double size_z, bool use_signed_distance_field,
67  double resolution, double collision_tolerance, double max_propogation_distance)
68  {
69  crobot_distance_->initialize(link_body_decompositions, Eigen::Vector3d(size_x, size_y, size_z),
70  Eigen::Vector3d(0, 0, 0), use_signed_distance_field, resolution, collision_tolerance,
71  max_propogation_distance);
72  }
73 
76  const robot_state::RobotState& state) const;
77 
80  GroupStateRepresentationPtr& gsr) const;
81 
85 
89  GroupStateRepresentationPtr& gsr) const;
90  const CollisionRobotDistanceFieldConstPtr getCollisionRobotDistanceField() const
91  {
92  return crobot_distance_;
93  }
94 
95 protected:
96  CollisionRobotDistanceFieldPtr crobot_distance_;
97 };
98 }
99 
100 #endif
const CollisionRobotDistanceFieldConstPtr getCollisionRobotDistanceField() const
CollisionRobotDistanceFieldPtr crobot_distance_
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...
ROS/KDL based interface for the inverse kinematics of the PR2 arm.
void checkSelfCollisionDistanceField(const collision_detection::CollisionRequest &req, collision_detection::CollisionResult &res, const robot_state::RobotState &state) const
void initializeRobotDistanceField(const std::map< std::string, std::vector< CollisionSphere >> &link_body_decompositions, double size_x, double size_y, double size_z, bool use_signed_distance_field, double resolution, double collision_tolerance, double max_propogation_distance)
Representation of a robot&#39;s state. This includes position, velocity, acceleration and effort...
Definition: robot_state.h:123
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CollisionRobotHybrid(const robot_model::RobotModelConstPtr &kmodel)


moveit_core
Author(s): Ioan Sucan , Sachin Chitta , Acorn Pooley
autogenerated on Wed Jul 10 2019 04:03:04