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
Humanoid Path Planner
hpp-manipulation
Commits
245670f5
Commit
245670f5
authored
7 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
GraphSteeringMethod is built with a const Problem& (not a ProblemPtr_t)
parent
a3cce3b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/hpp/manipulation/graph-steering-method.hh
+7
-7
7 additions, 7 deletions
include/hpp/manipulation/graph-steering-method.hh
src/graph-steering-method.cc
+6
-7
6 additions, 7 deletions
src/graph-steering-method.cc
src/problem.cc
+1
-1
1 addition, 1 deletion
src/problem.cc
with
14 additions
and
15 deletions
include/hpp/manipulation/graph-steering-method.hh
+
7
−
7
View file @
245670f5
...
@@ -38,16 +38,16 @@ namespace hpp {
...
@@ -38,16 +38,16 @@ namespace hpp {
public:
public:
/// Create instance and return shared pointer
/// Create instance and return shared pointer
/// \warning core::Problem
Ptr_t
will be casted to Problem
Ptr_t
/// \warning core::Problem will be casted to Problem
static
GraphSteeringMethodPtr_t
create
static
GraphSteeringMethodPtr_t
create
(
const
core
::
Problem
Ptr_t
&
problem
);
(
const
core
::
Problem
&
problem
);
template
<
typename
T
>
template
<
typename
T
>
static
GraphSteeringMethodPtr_t
create
static
GraphSteeringMethodPtr_t
create
(
const
core
::
Problem
Ptr_t
&
problem
);
(
const
core
::
Problem
&
problem
);
/// Create instance and return shared pointer
/// Create instance and return shared pointer
static
GraphSteeringMethodPtr_t
create
(
const
Problem
Ptr_t
&
problem
);
static
GraphSteeringMethodPtr_t
create
(
const
Problem
&
problem
);
/// Create copy and return shared pointer
/// Create copy and return shared pointer
static
GraphSteeringMethodPtr_t
createCopy
static
GraphSteeringMethodPtr_t
createCopy
...
@@ -71,7 +71,7 @@ namespace hpp {
...
@@ -71,7 +71,7 @@ namespace hpp {
protected
:
protected
:
/// Constructor
/// Constructor
GraphSteeringMethod
(
const
Problem
Ptr_t
&
problem
);
GraphSteeringMethod
(
const
Problem
&
problem
);
/// Copy constructor
/// Copy constructor
GraphSteeringMethod
(
const
GraphSteeringMethod
&
);
GraphSteeringMethod
(
const
GraphSteeringMethod
&
);
...
@@ -86,7 +86,7 @@ namespace hpp {
...
@@ -86,7 +86,7 @@ namespace hpp {
private
:
private
:
/// A pointer to the problem
/// A pointer to the problem
Problem
Ptr_t
problem_
;
const
Problem
&
problem_
;
/// Weak pointer to itself
/// Weak pointer to itself
GraphSteeringMethodWkPtr_t
weak_
;
GraphSteeringMethodWkPtr_t
weak_
;
/// The encapsulated steering method
/// The encapsulated steering method
...
@@ -95,7 +95,7 @@ namespace hpp {
...
@@ -95,7 +95,7 @@ namespace hpp {
template
<
typename
T
>
template
<
typename
T
>
GraphSteeringMethodPtr_t
GraphSteeringMethod
::
create
GraphSteeringMethodPtr_t
GraphSteeringMethod
::
create
(
const
core
::
Problem
Ptr_t
&
problem
)
(
const
core
::
Problem
&
problem
)
{
{
GraphSteeringMethodPtr_t
gsm
=
GraphSteeringMethod
::
create
(
problem
);
GraphSteeringMethodPtr_t
gsm
=
GraphSteeringMethod
::
create
(
problem
);
gsm
->
innerSteeringMethod
(
T
::
create
(
problem
));
gsm
->
innerSteeringMethod
(
T
::
create
(
problem
));
...
...
This diff is collapsed.
Click to expand it.
src/graph-steering-method.cc
+
6
−
7
View file @
245670f5
...
@@ -27,16 +27,15 @@
...
@@ -27,16 +27,15 @@
namespace
hpp
{
namespace
hpp
{
namespace
manipulation
{
namespace
manipulation
{
GraphSteeringMethodPtr_t
GraphSteeringMethod
::
create
GraphSteeringMethodPtr_t
GraphSteeringMethod
::
create
(
const
core
::
Problem
Ptr_t
&
problem
)
(
const
core
::
Problem
&
problem
)
{
{
assert
(
dynamic_cast
<
const
ProblemPtr_t
>
(
problem
)
!=
NULL
dynamic_cast
<
const
Problem
&>
(
problem
);
&&
"Cast to const ProblemPtr_t failed"
);
const
Problem
&
p
=
static_cast
<
const
Problem
&>
(
problem
);
const
ProblemPtr_t
&
p
=
static_cast
<
const
ProblemPtr_t
>
(
problem
);
return
create
(
p
);
return
create
(
p
);
}
}
GraphSteeringMethodPtr_t
GraphSteeringMethod
::
create
GraphSteeringMethodPtr_t
GraphSteeringMethod
::
create
(
const
Problem
Ptr_t
&
problem
)
(
const
Problem
&
problem
)
{
{
GraphSteeringMethod
*
ptr
=
new
GraphSteeringMethod
(
problem
);
GraphSteeringMethod
*
ptr
=
new
GraphSteeringMethod
(
problem
);
GraphSteeringMethodPtr_t
shPtr
(
ptr
);
GraphSteeringMethodPtr_t
shPtr
(
ptr
);
...
@@ -53,7 +52,7 @@ namespace hpp {
...
@@ -53,7 +52,7 @@ namespace hpp {
return
shPtr
;
return
shPtr
;
}
}
GraphSteeringMethod
::
GraphSteeringMethod
(
const
Problem
Ptr_t
&
problem
)
:
GraphSteeringMethod
::
GraphSteeringMethod
(
const
Problem
&
problem
)
:
SteeringMethod
(
problem
),
problem_
(
problem
),
weak_
()
SteeringMethod
(
problem
),
problem_
(
problem
),
weak_
()
{
{
}
}
...
@@ -66,7 +65,7 @@ namespace hpp {
...
@@ -66,7 +65,7 @@ namespace hpp {
PathPtr_t
GraphSteeringMethod
::
impl_compute
(
ConfigurationIn_t
q1
,
ConfigurationIn_t
q2
)
const
PathPtr_t
GraphSteeringMethod
::
impl_compute
(
ConfigurationIn_t
q1
,
ConfigurationIn_t
q2
)
const
{
{
graph
::
Edges_t
possibleEdges
;
graph
::
Edges_t
possibleEdges
;
graph
::
Graph
&
graph
=
*
problem_
->
constraintGraph
();
const
graph
::
Graph
&
graph
=
*
problem_
.
constraintGraph
();
try
{
try
{
possibleEdges
=
graph
.
getEdges
possibleEdges
=
graph
.
getEdges
(
graph
.
getState
(
q1
),
graph
.
getState
(
q2
));
(
graph
.
getState
(
q1
),
graph
.
getState
(
q2
));
...
...
This diff is collapsed.
Click to expand it.
src/problem.cc
+
1
−
1
View file @
245670f5
...
@@ -27,7 +27,7 @@ namespace hpp {
...
@@ -27,7 +27,7 @@ namespace hpp {
Problem
::
Problem
(
DevicePtr_t
robot
)
Problem
::
Problem
(
DevicePtr_t
robot
)
:
Parent
(
robot
),
graph_
()
:
Parent
(
robot
),
graph_
()
{
{
Parent
::
steeringMethod
(
GraphSteeringMethod
::
create
(
this
));
Parent
::
steeringMethod
(
GraphSteeringMethod
::
create
(
*
this
));
distance
(
WeighedDistance
::
create
(
robot
,
graph_
));
distance
(
WeighedDistance
::
create
(
robot
,
graph_
));
setPathValidationFactory
(
core
::
DiscretizedCollisionChecking
::
create
,
0.05
);
setPathValidationFactory
(
core
::
DiscretizedCollisionChecking
::
create
,
0.05
);
...
...
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