shape_mesh_conservative_advancement_traversal_node.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2011-2014, Willow Garage, Inc.
5  * Copyright (c) 2014-2016, Open Source Robotics Foundation
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of Open Source Robotics Foundation nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  */
35 
38 #ifndef FCL_TRAVERSAL_SHAPEMESHCONSERVATIVEADVANCEMENTTRAVERSALNODE_H
39 #define FCL_TRAVERSAL_SHAPEMESHCONSERVATIVEADVANCEMENTTRAVERSALNODE_H
40 
44 
45 namespace fcl
46 {
47 
48 namespace detail
49 {
50 
51 template <typename Shape, typename BV, typename NarrowPhaseSolver>
53  : public ShapeMeshDistanceTraversalNode<Shape, BV, NarrowPhaseSolver>
54 {
55 public:
56 
57  using S = typename BV::S;
58 
60 
62  S BVTesting(int b1, int b2) const;
63 
65  void leafTesting(int b1, int b2) const;
66 
68  bool canStop(S c) const;
69 
70  mutable S min_distance;
71 
72  mutable Vector3<S> closest_p1, closest_p2;
73 
74  mutable int last_tri_id;
75 
77  S w;
78 
80  S toc;
82 
84  mutable S delta_t;
85 
89 
90  mutable std::vector<ConservativeAdvancementStackData<S>> stack;
91 };
92 
93 template <typename Shape, typename BV, typename NarrowPhaseSolver>
94 bool initialize(
96  const Shape& model1,
97  const Transform3<typename BV::S>& tf1,
98  BVHModel<BV>& model2,
99  const Transform3<typename BV::S>& tf2,
100  const NarrowPhaseSolver* nsolver,
101  typename BV::S w = 1,
102  bool use_refit = false,
103  bool refit_bottomup = false);
104 
105 template <typename Shape, typename NarrowPhaseSolver>
108  Shape, RSS<typename Shape::S>, NarrowPhaseSolver>
109 {
110 public:
111  using S = typename Shape::S;
112 
114 
115  S BVTesting(int b1, int b2) const;
116 
117  void leafTesting(int b1, int b2) const;
118 
119  bool canStop(S c) const;
120 };
121 
122 template <typename Shape, typename NarrowPhaseSolver>
123 bool initialize(
125  const Shape& model1,
127  const BVHModel<RSS<typename Shape::S>>& model2,
129  const NarrowPhaseSolver* nsolver,
130  typename Shape::S w = 1);
131 
132 template <typename Shape, typename NarrowPhaseSolver>
135  Shape, OBBRSS<typename Shape::S>, NarrowPhaseSolver>
136 {
137 public:
138  using S = typename Shape::S;
139 
141 
142  S BVTesting(int b1, int b2) const;
143 
144  void leafTesting(int b1, int b2) const;
145 
146  bool canStop(S c) const;
147 };
148 
149 template <typename Shape, typename NarrowPhaseSolver>
150 bool initialize(
152  const Shape& model1,
154  const BVHModel<OBBRSS<typename Shape::S>>& model2,
156  const NarrowPhaseSolver* nsolver,
157  typename Shape::S w = 1);
158 
159 } // namespace detail
160 } // namespace fcl
161 
163 
164 #endif
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode::w
S w
CA controlling variable: early stop for the early iterations of CA.
Definition: shape_mesh_conservative_advancement_traversal_node.h:77
fcl::detail::ShapeMeshConservativeAdvancementTraversalNodeRSS
Definition: shape_mesh_conservative_advancement_traversal_node.h:106
fcl::Transform3
Eigen::Transform< S, 3, Eigen::Isometry > Transform3
Definition: types.h:91
utility.h
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode::toc
S toc
The time from beginning point.
Definition: shape_mesh_conservative_advancement_traversal_node.h:80
conservative_advancement_stack_data.h
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode::motion1
const MotionBase< S > * motion1
Motions for the two objects in query.
Definition: shape_mesh_conservative_advancement_traversal_node.h:87
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode::delta_t
S delta_t
The delta_t each step.
Definition: shape_mesh_conservative_advancement_traversal_node.h:84
fcl::RSS
A class for rectangle swept sphere bounding volume.
Definition: RSS.h:58
shape_mesh_conservative_advancement_traversal_node-inl.h
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode::stack
std::vector< ConservativeAdvancementStackData< S > > stack
Definition: shape_mesh_conservative_advancement_traversal_node.h:90
fcl::Vector3
Eigen::Matrix< S, 3, 1 > Vector3
Definition: types.h:70
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode::motion2
const MotionBase< S > * motion2
Definition: shape_mesh_conservative_advancement_traversal_node.h:88
fcl::detail::ShapeMeshConservativeAdvancementTraversalNodeOBBRSS
Definition: shape_mesh_conservative_advancement_traversal_node.h:133
fcl::MotionBase
Definition: bv_motion_bound_visitor.h:45
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode
Definition: shape_mesh_conservative_advancement_traversal_node.h:52
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode::closest_p2
Vector3< S > closest_p2
Definition: shape_mesh_conservative_advancement_traversal_node.h:72
fcl::detail::ShapeMeshDistanceTraversalNode
Traversal node for distance between shape and mesh.
Definition: shape_mesh_distance_traversal_node.h:52
fcl::detail::initialize
template bool initialize(MeshCollisionTraversalNodeOBB< double > &node, const BVHModel< OBB< double >> &model1, const Transform3< double > &tf1, const BVHModel< OBB< double >> &model2, const Transform3< double > &tf2, const CollisionRequest< double > &request, CollisionResult< double > &result)
fcl::OBBRSS
Class merging the OBB and RSS, can handle collision and distance simultaneously.
Definition: OBBRSS.h:50
fcl::BVHModel
A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as ...
Definition: BVH_model.h:57
shape_mesh_distance_traversal_node.h
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode::last_tri_id
int last_tri_id
Definition: shape_mesh_conservative_advancement_traversal_node.h:74
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode::t_err
S t_err
Definition: shape_mesh_conservative_advancement_traversal_node.h:81
fcl::detail::ShapeMeshConservativeAdvancementTraversalNodeOBBRSS::S
typename Shape::S S
Definition: shape_mesh_conservative_advancement_traversal_node.h:138
fcl::detail::ShapeMeshConservativeAdvancementTraversalNodeRSS::S
typename Shape::S S
Definition: shape_mesh_conservative_advancement_traversal_node.h:111
fcl::detail::ShapeMeshConservativeAdvancementTraversalNode::min_distance
S min_distance
Definition: shape_mesh_conservative_advancement_traversal_node.h:70
fcl
Main namespace.
Definition: broadphase_bruteforce-inl.h:45
fcl::detail::ShapeBVHDistanceTraversalNode< Shape, OBBRSS< Shape::S > >::S
typename OBBRSS< Shape::S > ::S S
Definition: shape_bvh_distance_traversal_node.h:58


fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:48