state_validity_checker.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2011, 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 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: Ioan Sucan */
36 
37 #pragma once
38 
40 #include <moveit/collision_detection/collision_common.h>
41 #include <ompl/base/StateValidityChecker.h>
42 
43 namespace ompl_interface
44 {
45 class ModelBasedPlanningContext;
46 
48 class StateValidityChecker : public ompl::base::StateValidityChecker
49 {
50 public:
51  StateValidityChecker(const ModelBasedPlanningContext* planning_context);
52 
53  bool isValid(const ompl::base::State* state) const override
54  {
55  return isValid(state, verbose_);
56  }
57 
58  bool isValid(const ompl::base::State* state, double& dist) const override
59  {
60  return isValid(state, dist, verbose_);
61  }
62 
63  bool isValid(const ompl::base::State* state, double& dist, ompl::base::State* /*validState*/,
64  bool& /*validStateAvailable*/) const override
65  {
66  return isValid(state, dist, verbose_);
67  }
68 
69  bool isValid(const ompl::base::State* state, bool verbose) const;
70  bool isValid(const ompl::base::State* state, double& dist, bool verbose) const;
71 
72  virtual double cost(const ompl::base::State* state) const;
73  double clearance(const ompl::base::State* state) const override;
74 
75  void setVerbose(bool flag);
76 
77 protected:
78  const ModelBasedPlanningContext* planning_context_;
79  std::string group_name_;
85 
87  bool verbose_;
88 };
89 } // namespace ompl_interface
ompl_interface::StateValidityChecker::clearance
double clearance(const ompl::base::State *state) const override
Definition: state_validity_checker.cpp:189
ompl_interface::StateValidityChecker::tss_
TSStateStorage tss_
Definition: state_validity_checker.h:112
ompl_interface::StateValidityChecker::cost
virtual double cost(const ompl::base::State *state) const
Definition: state_validity_checker.cpp:172
ompl_interface::StateValidityChecker::planning_context_
const ModelBasedPlanningContext * planning_context_
Definition: state_validity_checker.h:110
ompl_interface
The MoveIt interface to OMPL.
Definition: constrained_goal_sampler.h:46
collision_detection::CollisionRequest
ompl_interface::StateValidityChecker::collision_request_with_distance_
collision_detection::CollisionRequest collision_request_with_distance_
Definition: state_validity_checker.h:114
ompl_interface::StateValidityChecker::verbose_
bool verbose_
Definition: state_validity_checker.h:119
ompl_interface::StateValidityChecker::setVerbose
void setVerbose(bool flag)
Definition: state_validity_checker.cpp:71
threadsafe_state_storage.h
ompl_interface::StateValidityChecker::collision_request_with_cost_
collision_detection::CollisionRequest collision_request_with_cost_
Definition: state_validity_checker.h:118
ompl_interface::StateValidityChecker::collision_request_simple_verbose_
collision_detection::CollisionRequest collision_request_simple_verbose_
Definition: state_validity_checker.h:115
ompl_interface::StateValidityChecker::collision_request_simple_
collision_detection::CollisionRequest collision_request_simple_
Definition: state_validity_checker.h:113
ompl_interface::StateValidityChecker::StateValidityChecker
StateValidityChecker(const ModelBasedPlanningContext *planning_context)
Definition: state_validity_checker.cpp:47
ompl_interface::StateValidityChecker::isValid
bool isValid(const ompl::base::State *state) const override
Definition: state_validity_checker.h:85
ompl_interface::StateValidityChecker::group_name_
std::string group_name_
Definition: state_validity_checker.h:111
ompl_interface::StateValidityChecker::collision_request_with_distance_verbose_
collision_detection::CollisionRequest collision_request_with_distance_verbose_
Definition: state_validity_checker.h:116
ompl_interface::TSStateStorage
Definition: threadsafe_state_storage.h:77


ompl
Author(s): Ioan Sucan
autogenerated on Fri May 3 2024 02:29:39