Unverified Commit 938491e8 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by GitHub
Browse files

Merge pull request #170 from florent-lamiraux/devel

[ProblemSolver] Allow to disable path validations
parents b1248207 9c1f10b8
......@@ -49,6 +49,7 @@ path-validations.cc
path-validation/discretized.cc
path-validation/discretized-collision-checking.cc
path-validation/discretized-joint-bound.cc
path-validation/no-validation.hh
nearest-neighbor/basic.hh #
nearest-neighbor/basic.cc #
# nearest-neighbor/k-d-tree.cc #
......
//
// Copyright (c) 2019 CNRS
// Authors: Florent Lamiraux
//
// This file is part of hpp-core
// hpp-core is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later version.
//
// hpp-core is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// hpp-core If not, see
// <http://www.gnu.org/licenses/>.
#include <hpp/pinocchio/device.hh>
#include <hpp/core/collision-path-validation-report.hh>
#include <hpp/core/collision-validation.hh>
#include <hpp/core/config-validations.hh>
#include <hpp/core/path.hh>
#include <hpp/core/path-validation/discretized.hh>
#include <hpp/util/debug.hh>
namespace hpp {
namespace core {
namespace pathValidation {
HPP_PREDEF_CLASS (NoValidation);
typedef boost::shared_ptr <NoValidation> NoValidationPtr_t;
class NoValidation : public PathValidation
{
public:
// Validate all paths
virtual bool validate (const PathPtr_t& path, bool,
PathPtr_t& validPart,
PathValidationReportPtr_t&)
{
validPart = path;
return true;
}
static NoValidationPtr_t create (const DevicePtr_t&,
const value_type&)
{
NoValidation* ptr = new NoValidation ();
NoValidationPtr_t shPtr (ptr);
return shPtr;
}
protected:
NoValidation () {}
}; // class NoValidation
} // namespace pathValidation
} // namespace core
} // namespace hpp
......@@ -76,6 +76,8 @@
#include <hpp/core/joint-bound-validation.hh>
#include <hpp/core/kinodynamic-distance.hh>
#include "../src/path-validation/no-validation.hh"
namespace hpp {
namespace core {
using boost::bind;
......@@ -238,6 +240,8 @@ namespace hpp {
pathOptimizers.add ("SimpleTimeParameterization", pathOptimization::SimpleTimeParameterization::create);
// Store path validation methods in map.
pathValidations.add ("NoValidation",
pathValidation::NoValidation::create);
pathValidations.add ("Discretized", pathValidation::createDiscretizedCollisionChecking);
pathValidations.add ("DiscretizedCollision", pathValidation::createDiscretizedCollisionChecking);
pathValidations.add ("DiscretizedJointBound", pathValidation::createDiscretizedJointBound);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment