37 #ifndef MOVEIT_OMPL_INTERFACE_CONSTRAINTS_LIBRARY_ 38 #define MOVEIT_OMPL_INTERFACE_CONSTRAINTS_LIBRARY_ 43 #include <ompl/base/StateStorage.h> 44 #include <boost/function.hpp> 45 #include <boost/serialization/map.hpp> 49 typedef std::pair<std::vector<std::size_t>, std::map<std::size_t, std::pair<std::size_t, std::size_t> > >
58 ConstraintApproximation(
const std::string& group,
const std::string& state_space_parameterization,
59 bool explicit_motions,
const moveit_msgs::Constraints& msg,
const std::string&
filename,
60 const ompl::base::StateStoragePtr& storage, std::size_t milestones = 0);
68 return constraint_msg_.name;
71 ompl::base::StateSamplerAllocator getStateSamplerAllocator(
const moveit_msgs::Constraints& msg)
const;
77 return space_signature_;
87 return explicit_motions_;
97 return state_space_parameterization_;
102 return constraint_msg_;
107 return state_storage_ptr_;
112 return ompldb_filename_;
169 void loadConstraintApproximations(
const std::string& path);
171 void saveConstraintApproximations(
const std::string& path);
174 addConstraintApproximation(
const moveit_msgs::Constraints& constr_sampling,
175 const moveit_msgs::Constraints& constr_hard,
const std::string& group,
176 const planning_scene::PlanningSceneConstPtr& scene,
180 addConstraintApproximation(
const moveit_msgs::Constraints& constr,
const std::string& group,
181 const planning_scene::PlanningSceneConstPtr& scene,
184 void printConstraintApproximations(std::ostream& out = std::cout)
const;
185 void clearConstraintApproximations();
189 constraint_approximations_[approx->getName()] = approx;
192 const ConstraintApproximationPtr& getConstraintApproximation(
const moveit_msgs::Constraints& msg)
const;
195 ompl::base::StateStoragePtr constructConstraintApproximation(
196 const ModelBasedPlanningContextPtr& pcontext,
const moveit_msgs::Constraints& constr_sampling,
std::pair< std::vector< std::size_t >, std::map< std::size_t, std::pair< std::size_t, std::size_t > > > ConstrainedStateMetadata
std::vector< int > space_signature_
std::string state_space_parameterization
bool hasExplicitMotions() const
double state_connection_time
double sampling_success_rate
ConstraintApproximationConstructionOptions()
moveit_msgs::Constraints constraint_msg_
const std::string & getGroup() const
std::string state_space_parameterization_
The MoveIt! interface to OMPL.
const moveit_msgs::Constraints & getConstraintsMsg() const
virtual ~ConstraintApproximation()
ConstraintApproximationStateStorage * state_storage_
MOVEIT_CLASS_FORWARD(ConstraintsLibrary)
std::size_t getMilestoneCount() const
ompl::base::StateStoragePtr state_storage_ptr_
const std::string & getStateSpaceParameterization() const
unsigned int max_explicit_points
void registerConstraintApproximation(const ConstraintApproximationPtr &approx)
double explicit_points_resolution
ConstraintsLibrary(const PlanningContextManager &pcontext)
const std::string & getName() const
unsigned int edges_per_sample
const std::vector< int > & getSpaceSignature() const
double state_sampling_time
std::string ompldb_filename_
ompl::base::StateStorageWithMetadata< ConstrainedStateMetadata > ConstraintApproximationStateStorage
const PlanningContextManager & context_manager_
std::map< std::string, ConstraintApproximationPtr > constraint_approximations_
const std::string & getFilename() const
ConstraintApproximationPtr approx
const ompl::base::StateStoragePtr & getStateStorage() const
boost::function< bool(const ompl::base::State *from, const ompl::base::State *to, const double t, ompl::base::State *state)> InterpolationFunction