constraint_approximations.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 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 
42 #include <ompl/base/StateStorage.h>
43 #include <visualization_msgs/MarkerArray.h>
44 
45 namespace ompl_interface
46 {
47 typedef ompl::base::StateStorageWithMetadata<std::vector<std::size_t> > ConstraintApproximationStateStorage;
48 typedef std::function<bool(const ompl::base::State*, const ompl::base::State*)> ConstraintStateStorageOrderFn;
49 
50 struct ConstraintApproximation
51 {
52  ConstraintApproximation(const planning_models::RobotModelConstPtr& kinematic_model, const std::string& group,
53  const std::string& factory, const std::string& serialization, const std::string& filename,
54  const ompl::base::StateStoragePtr& storage);
55  ConstraintApproximation(const planning_models::RobotModelConstPtr& kinematic_model, const std::string& group,
56  const std::string& factory, const moveit_msgs::Constraints& msg, const std::string& filename,
57  const ompl::base::StateStoragePtr& storage);
58 
59  void visualizeDistribution(const std::string& link_name, unsigned int count,
60  visualization_msgs::MarkerArray& arr) const;
61 
62  std::string group_;
63  std::string factory_;
64  std::string serialization_;
65  moveit_msgs::Constraints constraint_msg_;
66  planning_models::RobotModelConstPtr robot_model_;
67  kinematic_constraints::KinematicConstraintSetPtr kconstraints_set_;
68  std::vector<int> space_signature_;
69 
70  std::string ompldb_filename_;
71  ompl::base::StateStoragePtr state_storage_ptr_;
73 };
74 
75 MOVEIT_DECLARE_PTR(ConstraintApproximations, std::vector<ConstraintApproximation>)
76 } // namespace ompl_interface
ompl_interface::ConstraintApproximation::group_
std::string group_
Definition: constraint_approximations.h:94
ompl_interface::ConstraintApproximation::constraint_msg_
moveit_msgs::Constraints constraint_msg_
Definition: constraint_approximations.h:97
ompl_interface::ConstraintApproximation::ompldb_filename_
std::string ompldb_filename_
Definition: constraint_approximations.h:102
ompl_interface::ConstraintApproximation::state_storage_ptr_
ompl::base::StateStoragePtr state_storage_ptr_
Definition: constraint_approximations.h:103
ompl_interface
The MoveIt interface to OMPL.
Definition: constrained_goal_sampler.h:46
ompl_interface::ConstraintApproximation::ConstraintApproximation
ConstraintApproximation(const planning_models::RobotModelConstPtr &kinematic_model, const std::string &group, const std::string &factory, const std::string &serialization, const std::string &filename, const ompl::base::StateStoragePtr &storage)
ompl_interface::ConstraintStateStorageOrderFn
std::function< bool(const ompl::base::State *, const ompl::base::State *)> ConstraintStateStorageOrderFn
Definition: constraint_approximations.h:80
ompl_interface::ConstraintApproximation::kconstraints_set_
kinematic_constraints::KinematicConstraintSetPtr kconstraints_set_
Definition: constraint_approximations.h:99
ompl_interface::ConstraintApproximation::space_signature_
std::vector< int > space_signature_
Definition: constraint_approximations.h:100
ompl_interface::ConstraintApproximation::state_storage_
ConstraintApproximationStateStorage * state_storage_
Definition: constraint_approximations.h:104
ompl_interface::ConstraintApproximationStateStorage
ompl::base::StateStorageWithMetadata< std::vector< std::size_t > > ConstraintApproximationStateStorage
Definition: constraint_approximations.h:79
MOVEIT_DECLARE_PTR
MOVEIT_DECLARE_PTR(MoveItCpp, moveit_cpp::MoveItCpp)
kinematic_constraint.h
declare_ptr.h
ompl_interface::ConstraintApproximation::serialization_
std::string serialization_
Definition: constraint_approximations.h:96
ompl_interface::ConstraintApproximation::factory_
std::string factory_
Definition: constraint_approximations.h:95
planning_scene.h
ompl_interface::ConstraintApproximation::robot_model_
planning_models::RobotModelConstPtr robot_model_
Definition: constraint_approximations.h:98
ompl_interface::ConstraintApproximation::visualizeDistribution
void visualizeDistribution(const std::string &link_name, unsigned int count, visualization_msgs::MarkerArray &arr) const


ompl
Author(s): Ioan Sucan
autogenerated on Thu Apr 18 2024 02:24:37