hpp-rbprm 4.14.0
Implementation of RB-PRM planner using hpp.
Loading...
Searching...
No Matches
rbprm-validation.hh
Go to the documentation of this file.
1//
2// Copyright (c) 2014 CNRS
3// Authors: Steve Tonneau
4//
5// This file is part of hpp-rbprm
6// hpp-rbprm is free software: you can redistribute it
7// and/or modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation, either version
9// 3 of the License, or (at your option) any later version.
10//
11// hpp-core is distributed in the hope that it will be
12// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// General Lesser Public License for more details. You should have
15// received a copy of the GNU Lesser General Public License along with
16// hpp-core If not, see
17// <http://www.gnu.org/licenses/>.
18
19#ifndef HPP_RBPRM_VALIDATION_HH
20#define HPP_RBPRM_VALIDATION_HH
21
22#include <hpp/core/collision-validation-report.hh>
23#include <hpp/core/collision-validation.hh>
24#include <hpp/core/config-validation.hh>
25#include <hpp/core/problem-solver.hh>
26#include <hpp/rbprm/config.hh>
30
31namespace hpp {
32namespace rbprm {
33
34class RbPrmValidation;
35typedef shared_ptr<RbPrmValidation> RbPrmValidationPtr_t;
36typedef std::map<std::string, RbPrmRomValidationPtr_t> T_RomValidation;
37typedef hpp::core::Container<hpp::core::AffordanceObjects_t> affMap_t;
38
41
46class HPP_RBPRM_DLLAPI RbPrmValidation : public core::CollisionValidation {
47 public:
49 const pinocchio::RbPrmDevicePtr_t& robot,
50 const std::vector<std::string>& filter = std::vector<std::string>(),
51 const std::map<std::string, std::vector<std::string> >& affFilters =
52 std::map<std::string, std::vector<std::string> >(),
53 const affMap_t& affordances = affMap_t(),
54 const core::ObjectStdVector_t& geometries = core::ObjectStdVector_t());
55
61 virtual bool validate(const core::Configuration_t& config);
62
70 virtual bool validate(const core::Configuration_t& config,
71 core::ValidationReportPtr_t& validationReport);
72
80 virtual bool validate(const core::Configuration_t& config,
81 const std::vector<std::string>& filter);
82
92 virtual bool validate(const core::Configuration_t& config,
93 core::ValidationReportPtr_t& validationReport,
94 const std::vector<std::string>& filter);
95
102 virtual void addObstacle(const core::CollisionObjectConstPtr_t& object);
103
110 const core::JointPtr_t& joint,
111 const core::CollisionObjectPtr_t& obstacle);
112
117
123 void computeAllContacts(bool computeAllContacts);
124
125 private:
134 virtual bool validateTrunk(
135 const core::Configuration_t& config,
136 hpp::core::ValidationReportPtr_t& validationReport);
137
141 bool validateRoms(const core::Configuration_t& config);
142
148 bool validateRoms(const core::Configuration_t& config,
149 core::RbprmValidationReportPtr_t& validationReport);
150
156 bool validateRoms(const core::Configuration_t& config,
157 const std::vector<std::string>& filter);
158
164 bool validateRoms(const core::Configuration_t& config,
165 const std::vector<std::string>& filter,
166 core::RbprmValidationReportPtr_t& validationReport);
167
168 public:
170 const core::CollisionValidationPtr_t trunkValidation_;
171 const core::JointBoundValidationPtr_t boundValidation_;
174 std::vector<std::string> defaultFilter_;
175
176 protected:
178 const pinocchio::RbPrmDevicePtr_t& robot,
179 const std::vector<std::string>& filter,
180 const std::map<std::string, std::vector<std::string> >& affFilters,
181 const affMap_t& affordances, const core::ObjectStdVector_t& geometries);
182
183 private:
184 core::ValidationReportPtr_t unusedReport_;
185
186}; // class RbPrmValidation
188} // namespace rbprm
189} // namespace hpp
190
191#endif // HPP_RBPRM_VALIDATION_HH
Definition: rbprm-validation.hh:46
static RbPrmValidationPtr_t create(const pinocchio::RbPrmDevicePtr_t &robot, const std::vector< std::string > &filter=std::vector< std::string >(), const std::map< std::string, std::vector< std::string > > &affFilters=std::map< std::string, std::vector< std::string > >(), const affMap_t &affordances=affMap_t(), const core::ObjectStdVector_t &geometries=core::ObjectStdVector_t())
std::vector< std::string > defaultFilter_
Definition: rbprm-validation.hh:174
virtual void addObstacle(const core::CollisionObjectConstPtr_t &object)
void computeAllContacts(bool computeAllContacts)
set if the collision validation should compute all the possible contacts or stop after the first pair...
const T_RomValidation romValidations_
CollisionValidation for the range of motion of the limbs.
Definition: rbprm-validation.hh:173
const core::JointBoundValidationPtr_t boundValidation_
Definition: rbprm-validation.hh:171
virtual void randomnizeCollisionPairs()
randomnizeCollisionPairs
RbPrmValidation(const pinocchio::RbPrmDevicePtr_t &robot, const std::vector< std::string > &filter, const std::map< std::string, std::vector< std::string > > &affFilters, const affMap_t &affordances, const core::ObjectStdVector_t &geometries)
virtual bool validate(const core::Configuration_t &config, core::ValidationReportPtr_t &validationReport, const std::vector< std::string > &filter)
virtual bool validate(const core::Configuration_t &config, core::ValidationReportPtr_t &validationReport)
virtual bool validate(const core::Configuration_t &config, const std::vector< std::string > &filter)
virtual bool validate(const core::Configuration_t &config)
virtual void removeObstacleFromJoint(const core::JointPtr_t &joint, const core::CollisionObjectPtr_t &obstacle)
const core::CollisionValidationPtr_t trunkValidation_
CollisionValidation for the trunk.
Definition: rbprm-validation.hh:170
#define HPP_RBPRM_DLLAPI
Definition: config.hh:64
shared_ptr< RbprmValidationReport > RbprmValidationReportPtr_t
Definition: rbprm-validation-report.hh:29
shared_ptr< RbPrmDevice > RbPrmDevicePtr_t
Definition: dynamic-validation.hh:28
hpp::core::Container< hpp::core::AffordanceObjects_t > affMap_t
Definition: rbprm-fullbody.hh:47
shared_ptr< RbPrmValidation > RbPrmValidationPtr_t
Definition: rbprm-validation.hh:35
std::map< std::string, RbPrmRomValidationPtr_t > T_RomValidation
Definition: rbprm-validation.hh:36
Definition: algorithm.hh:26