Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-manipulation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Saurel
hpp-manipulation
Commits
8e78a62a
Commit
8e78a62a
authored
3 years ago
by
Florent Lamiraux
Browse files
Options
Downloads
Patches
Plain Diff
[StatesPathFinder] Allow to define goal as a set of constraints
parent
4a096660
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/hpp/manipulation/path-planner/states-path-finder.hh
+2
-0
2 additions, 0 deletions
include/hpp/manipulation/path-planner/states-path-finder.hh
src/path-planner/states-path-finder.cc
+27
-9
27 additions, 9 deletions
src/path-planner/states-path-finder.cc
with
29 additions
and
9 deletions
include/hpp/manipulation/path-planner/states-path-finder.hh
+
2
−
0
View file @
8e78a62a
...
...
@@ -214,6 +214,8 @@ namespace hpp {
bool
skipColAnalysis_
;
// Constraints defining the goal
NumericalConstraints_t
goalConstraints_
;
// Variables used across several calls to oneStep
ConfigurationPtr_t
q1_
,
q2_
;
core
::
Configurations_t
configList_
;
...
...
This diff is collapsed.
Click to expand it.
src/path-planner/states-path-finder.cc
+
27
−
9
View file @
8e78a62a
...
...
@@ -42,7 +42,8 @@
#include
<hpp/core/configuration-shooter.hh>
#include
<hpp/core/collision-validation.hh>
#include
<hpp/core/collision-validation-report.hh>
#include
<hpp/core/problem-target.hh>
#include
<hpp/core/problem-target/task-target.hh>
#include
<hpp/core/problem-target/goal-configurations.hh>
#include
<hpp/core/path-optimization/random-shortcut.hh>
#include
<hpp/manipulation/constraint-set.hh>
...
...
@@ -69,6 +70,12 @@ namespace hpp {
using
graph
::
LockedJoints_t
;
using
graph
::
segments_t
;
using
core
::
ProblemTargetPtr_t
;
using
core
::
problemTarget
::
GoalConfigurations
;
using
core
::
problemTarget
::
GoalConfigurationsPtr_t
;
using
core
::
problemTarget
::
TaskTarget
;
using
core
::
problemTarget
::
TaskTargetPtr_t
;
static
void
displayRoadmap
(
const
core
::
RoadmapPtr_t
&
#ifdef HPP_DEBUG
roadmap
...
...
@@ -1126,15 +1133,26 @@ namespace hpp {
assert
(
problem_
);
q1_
=
problem_
->
initConfig
();
assert
(
q1_
);
core
::
Configurations_t
q2s
=
problem_
->
goalConfigs
();
if
(
q2s
.
size
()
!=
1
)
{
std
::
ostringstream
os
;
os
<<
"StatesPathFinder accept one and only one goal configuration, "
;
os
<<
q2s
.
size
()
<<
" provided."
;
throw
std
::
logic_error
(
os
.
str
().
c_str
());
// Detect whether the goal is defined by a configuration or by a
// set of constraints
ProblemTargetPtr_t
target
(
problem
()
->
target
());
GoalConfigurationsPtr_t
goalConfigs
(
HPP_DYNAMIC_PTR_CAST
(
GoalConfigurations
,
target
));
if
(
goalConfigs
){
core
::
Configurations_t
q2s
=
goalConfigs
->
configurations
();
if
(
q2s
.
size
()
!=
1
)
{
std
::
ostringstream
os
;
os
<<
"StatesPathFinder accept one and only one goal "
"configuration, "
;
os
<<
q2s
.
size
()
<<
" provided."
;
throw
std
::
logic_error
(
os
.
str
().
c_str
());
}
q2_
=
q2s
[
0
];
}
TaskTargetPtr_t
taskTarget
(
HPP_DYNAMIC_PTR_CAST
(
TaskTarget
,
target
));
if
(
taskTarget
){
goalConstraints_
=
taskTarget
->
constraints
();
}
q2_
=
q2s
[
0
];
reset
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment