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
8108ce6a
Commit
8108ce6a
authored
10 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update LevelSetEdge::applyConstraints to NumericalConstraint class
parent
9baeed85
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/graph/edge.cc
+4
-13
4 additions, 13 deletions
src/graph/edge.cc
with
4 additions
and
13 deletions
src/graph/edge.cc
+
4
−
13
View file @
8108ce6a
...
@@ -341,26 +341,17 @@ namespace hpp {
...
@@ -341,26 +341,17 @@ namespace hpp {
ConstraintSetPtr_t
cs
=
extraConfigConstraint
();
ConstraintSetPtr_t
cs
=
extraConfigConstraint
();
const
ConfigProjectorPtr_t
cp
=
cs
->
configProjector
();
const
ConfigProjectorPtr_t
cp
=
cs
->
configProjector
();
assert
(
cp
);
assert
(
cp
);
vector_t
offset
=
cp
->
rightHandSideFromConfig
(
q_offset
);
cp
->
rightHandSideFromConfig
(
q_offset
);
size_t
row
=
0
,
nbRows
=
0
;
for
(
NumericalConstraints_t
::
const_iterator
it
=
for
(
NumericalConstraints_t
::
const_iterator
it
=
extraNumericalConstraints_
.
begin
();
extraNumericalConstraints_
.
begin
();
it
!=
extraNumericalConstraints_
.
end
();
++
it
)
{
it
!=
extraNumericalConstraints_
.
end
();
++
it
)
{
const
core
::
DifferentiableFunction
&
f
=
(
*
it
)
->
function
();
(
*
it
)
->
rightHandSideFromConfig
(
levelsetTarget
);
nbRows
=
f
.
outputSize
();
}
vector_t
value
=
vector_t
::
Zero
(
nbRows
);
// TODO: fix this function
if
(
!
(
*
it
)
->
comparisonType
()
->
constantRightHandSide
())
{
f
(
value
,
levelsetTarget
);
offset
.
segment
(
row
,
nbRows
)
=
value
;
row
+=
nbRows
;
}
}
cp
->
rightHandSide
(
offset
);
for
(
LockedJoints_t
::
const_iterator
it
=
extraLockedJoints_
.
begin
();
for
(
LockedJoints_t
::
const_iterator
it
=
extraLockedJoints_
.
begin
();
it
!=
extraLockedJoints_
.
end
();
++
it
)
{
it
!=
extraLockedJoints_
.
end
();
++
it
)
{
(
*
it
)
->
rightHandSideFromConfig
(
levelsetTarget
);
(
*
it
)
->
rightHandSideFromConfig
(
levelsetTarget
);
}
}
cp
->
updateRightHandSide
();
// Eventually, do the projection.
// Eventually, do the projection.
if
(
cs
->
apply
(
q
))
if
(
cs
->
apply
(
q
))
...
...
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