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
746885fd
Commit
746885fd
authored
9 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Parametrizer in LevelSetEdge only uses extra constraints.
parent
8b5e7d98
No related branches found
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/graph/edge.hh
+2
-0
2 additions, 0 deletions
include/hpp/manipulation/graph/edge.hh
src/graph/edge.cc
+40
-7
40 additions, 7 deletions
src/graph/edge.cc
with
42 additions
and
7 deletions
include/hpp/manipulation/graph/edge.hh
+
2
−
0
View file @
746885fd
...
@@ -287,6 +287,8 @@ namespace hpp {
...
@@ -287,6 +287,8 @@ namespace hpp {
virtual
bool
applyConstraints
(
core
::
NodePtr_t
n_offset
,
ConfigurationOut_t
q
)
const
;
virtual
bool
applyConstraints
(
core
::
NodePtr_t
n_offset
,
ConfigurationOut_t
q
)
const
;
virtual
ConstraintSetPtr_t
buildConfigConstraint
()
const
;
void
buildHistogram
();
void
buildHistogram
();
LeafHistogramPtr_t
histogram
()
const
;
LeafHistogramPtr_t
histogram
()
const
;
...
...
This diff is collapsed.
Click to expand it.
src/graph/edge.cc
+
40
−
7
View file @
746885fd
...
@@ -521,9 +521,10 @@ namespace hpp {
...
@@ -521,9 +521,10 @@ namespace hpp {
ConfigurationIn_t
qlevelset
,
ConfigurationOut_t
q
)
const
ConfigurationIn_t
qlevelset
,
ConfigurationOut_t
q
)
const
{
{
// First, set the offset.
// First, set the offset.
ConstraintSetPtr_t
cs
=
hist_
->
foliation
().
parametrizer
();
ConstraintSetPtr_t
cs
=
configConstraint
();
const
ConfigProjectorPtr_t
cp
=
cs
->
configProjector
();
const
ConfigProjectorPtr_t
cp
=
cs
->
configProjector
();
assert
(
cp
);
assert
(
cp
);
cp
->
rightHandSideFromConfig
(
qoffset
);
cp
->
rightHandSideFromConfig
(
qoffset
);
for
(
NumericalConstraints_t
::
const_iterator
it
=
for
(
NumericalConstraints_t
::
const_iterator
it
=
paramNumericalConstraints_
.
begin
();
paramNumericalConstraints_
.
begin
();
...
@@ -585,7 +586,6 @@ namespace hpp {
...
@@ -585,7 +586,6 @@ namespace hpp {
ConstraintSetPtr_t
param
=
ConstraintSet
::
create
(
g
->
robot
(),
"Set "
+
n
);
ConstraintSetPtr_t
param
=
ConstraintSet
::
create
(
g
->
robot
(),
"Set "
+
n
);
ConfigProjectorPtr_t
proj
=
ConfigProjector
::
create
(
g
->
robot
(),
"projParam_"
+
n
,
g
->
errorThreshold
(),
g
->
maxIterations
());
ConfigProjectorPtr_t
proj
=
ConfigProjector
::
create
(
g
->
robot
(),
"projParam_"
+
n
,
g
->
errorThreshold
(),
g
->
maxIterations
());
g
->
insertNumericalConstraints
(
proj
);
IntervalsContainer_t
::
const_iterator
itpdof
=
paramPassiveDofs_
.
begin
();
IntervalsContainer_t
::
const_iterator
itpdof
=
paramPassiveDofs_
.
begin
();
for
(
NumericalConstraints_t
::
const_iterator
it
=
paramNumericalConstraints_
.
begin
();
for
(
NumericalConstraints_t
::
const_iterator
it
=
paramNumericalConstraints_
.
begin
();
it
!=
paramNumericalConstraints_
.
end
();
++
it
)
{
it
!=
paramNumericalConstraints_
.
end
();
++
it
)
{
...
@@ -594,22 +594,22 @@ namespace hpp {
...
@@ -594,22 +594,22 @@ namespace hpp {
}
}
assert
(
itpdof
==
paramPassiveDofs_
.
end
());
assert
(
itpdof
==
paramPassiveDofs_
.
end
());
insertNumericalConstraints
(
proj
);
to
()
->
insertNumericalConstraints
(
proj
);
param
->
addConstraint
(
proj
);
param
->
addConstraint
(
proj
);
param
->
edge
(
wkPtr_
.
lock
());
param
->
edge
(
wkPtr_
.
lock
());
g
->
insertLockedJoints
(
proj
);
for
(
LockedJoints_t
::
const_iterator
it
=
paramLockedJoints_
.
begin
();
for
(
LockedJoints_t
::
const_iterator
it
=
paramLockedJoints_
.
begin
();
it
!=
paramLockedJoints_
.
end
();
++
it
)
{
it
!=
paramLockedJoints_
.
end
();
++
it
)
{
proj
->
add
(
*
it
);
proj
->
add
(
*
it
);
}
}
insertLockedJoints
(
proj
);
to
()
->
insertLockedJoints
(
proj
);
f
.
parametrizer
(
param
);
f
.
parametrizer
(
param
);
// The codition
// The codition
// TODO: We assumed that this part of the code can only be reached by
// configurations that are valid.
// It would be wiser to make sure configurations are valid, for instance
// by considering only configurations in the destination node of this
// edge.
ConstraintSetPtr_t
cond
=
ConstraintSet
::
create
(
g
->
robot
(),
"Set "
+
n
);
ConstraintSetPtr_t
cond
=
ConstraintSet
::
create
(
g
->
robot
(),
"Set "
+
n
);
proj
=
ConfigProjector
::
create
(
g
->
robot
(),
"projCond_"
+
n
,
g
->
errorThreshold
(),
g
->
maxIterations
());
proj
=
ConfigProjector
::
create
(
g
->
robot
(),
"projCond_"
+
n
,
g
->
errorThreshold
(),
g
->
maxIterations
());
itpdof
=
condPassiveDofs_
.
begin
();
itpdof
=
condPassiveDofs_
.
begin
();
...
@@ -629,6 +629,39 @@ namespace hpp {
...
@@ -629,6 +629,39 @@ namespace hpp {
hist_
=
LeafHistogram
::
create
(
f
);
hist_
=
LeafHistogram
::
create
(
f
);
}
}
ConstraintSetPtr_t
LevelSetEdge
::
buildConfigConstraint
()
const
{
std
::
string
n
=
"("
+
name
()
+
")"
;
GraphPtr_t
g
=
graph_
.
lock
();
ConstraintSetPtr_t
constraint
=
ConstraintSet
::
create
(
g
->
robot
(),
"Set "
+
n
);
ConfigProjectorPtr_t
proj
=
ConfigProjector
::
create
(
g
->
robot
(),
"proj_"
+
n
,
g
->
errorThreshold
(),
g
->
maxIterations
());
g
->
insertNumericalConstraints
(
proj
);
IntervalsContainer_t
::
const_iterator
itpdof
=
paramPassiveDofs_
.
begin
();
for
(
NumericalConstraints_t
::
const_iterator
it
=
paramNumericalConstraints_
.
begin
();
it
!=
paramNumericalConstraints_
.
end
();
++
it
)
{
proj
->
add
(
*
it
,
*
itpdof
);
++
itpdof
;
}
assert
(
itpdof
==
paramPassiveDofs_
.
end
());
insertNumericalConstraints
(
proj
);
to
()
->
insertNumericalConstraints
(
proj
);
constraint
->
addConstraint
(
proj
);
g
->
insertLockedJoints
(
proj
);
for
(
LockedJoints_t
::
const_iterator
it
=
paramLockedJoints_
.
begin
();
it
!=
paramLockedJoints_
.
end
();
++
it
)
{
proj
->
add
(
*
it
);
}
insertLockedJoints
(
proj
);
to
()
->
insertLockedJoints
(
proj
);
constraint
->
edge
(
wkPtr_
.
lock
());
return
constraint
;
}
void
LevelSetEdge
::
insertParamConstraint
(
const
NumericalConstraintPtr_t
&
nm
,
void
LevelSetEdge
::
insertParamConstraint
(
const
NumericalConstraintPtr_t
&
nm
,
const
SizeIntervals_t
&
passiveDofs
)
const
SizeIntervals_t
&
passiveDofs
)
{
{
...
...
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