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
ca071a91
Commit
ca071a91
authored
Nov 14, 2019
by
Joseph Mirabel
Browse files
Move steeringMethod::Straight::impl_compute to definition file.
parent
5f892304
Changes
3
Show whitespace changes
Inline
Side-by-side
include/hpp/core/steering-method/straight.hh
View file @
ca071a91
...
...
@@ -21,12 +21,8 @@
# include <hpp/core/config.hh>
# include <hpp/core/fwd.hh>
# include <hpp/core/problem.hh>
# include <hpp/core/steering-method/fwd.hh>
# include <hpp/core/steering-method.hh>
# include <hpp/core/straight-path.hh>
# include <hpp/core/distance.hh>
# include <hpp/core/config-projector.hh>
namespace
hpp
{
namespace
core
{
...
...
@@ -64,20 +60,8 @@ namespace hpp {
/// create a path between two configurations
virtual
PathPtr_t
impl_compute
(
ConfigurationIn_t
q1
,
ConfigurationIn_t
q2
)
const
{
value_type
length
=
(
*
problem_
.
distance
())
(
q1
,
q2
);
ConstraintSetPtr_t
c
;
if
(
constraints
()
&&
constraints
()
->
configProjector
())
{
c
=
HPP_STATIC_PTR_CAST
(
ConstraintSet
,
constraints
()
->
copy
());
c
->
configProjector
()
->
rightHandSideFromConfig
(
q1
);
}
else
{
c
=
constraints
();
}
PathPtr_t
path
=
StraightPath
::
create
(
problem_
.
robot
(),
q1
,
q2
,
length
,
c
);
return
path
;
}
ConfigurationIn_t
q2
)
const
;
protected:
/// Constructor with robot
/// Weighed distance is created from robot
...
...
src/CMakeLists.txt
View file @
ca071a91
...
...
@@ -94,6 +94,7 @@ path-validation/no-validation.hh
steering-method/dubins.cc
steering-method/snibud.cc
steering-method/spline.cc
steering-method/straight.cc
straight-path.cc
interpolated-path.cc
visibility-prm-planner.cc
...
...
src/steering-method/straight.cc
0 → 100644
View file @
ca071a91
// Copyright (c) 2019 CNRS
// Authors: Joseph Mirabel
//
// 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/core/steering-method/straight.hh>
#include
<hpp/core/problem.hh>
#include
<hpp/core/straight-path.hh>
#include
<hpp/core/distance.hh>
#include
<hpp/core/config-projector.hh>
namespace
hpp
{
namespace
core
{
namespace
steeringMethod
{
PathPtr_t
Straight
::
impl_compute
(
ConfigurationIn_t
q1
,
ConfigurationIn_t
q2
)
const
{
value_type
length
=
(
*
problem_
.
distance
())
(
q1
,
q2
);
ConstraintSetPtr_t
c
;
if
(
constraints
()
&&
constraints
()
->
configProjector
())
{
c
=
HPP_STATIC_PTR_CAST
(
ConstraintSet
,
constraints
()
->
copy
());
c
->
configProjector
()
->
rightHandSideFromConfig
(
q1
);
c
->
configProjector
()
->
lineSearchType
(
ConfigProjector
::
Backtracking
);
}
else
{
c
=
constraints
();
}
PathPtr_t
path
=
StraightPath
::
create
(
problem_
.
robot
(),
q1
,
q2
,
length
,
c
);
return
path
;
}
}
// namespace steeringMethod
}
// namespace core
}
// namespace hpp
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