Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-core
Commits
9c1f10b8
Commit
9c1f10b8
authored
May 15, 2019
by
Florent Lamiraux
Committed by
Florent Lamiraux florent@laas.fr
May 15, 2019
Browse files
[ProblemSolver] Allow to disable path validations
- Add "NoValidation" as a key for PathValidations selection.
parent
b1248207
Changes
3
Show whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
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 #
...
...
src/path-validation/no-validation.hh
0 → 100644
View file @
9c1f10b8
//
// 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
src/problem-solver.cc
View file @
9c1f10b8
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment