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
a7159916
Commit
a7159916
authored
9 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix bugs related to empty LockedJointPtr_t and NumericalConstraintPtr_t
parent
ce4be08d
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
src/graph/helper.cc
+30
-19
30 additions, 19 deletions
src/graph/helper.cc
src/graph/statistics.cc
+3
-2
3 additions, 2 deletions
src/graph/statistics.cc
with
33 additions
and
21 deletions
src/graph/helper.cc
+
30
−
19
View file @
a7159916
...
...
@@ -49,8 +49,10 @@ namespace hpp {
NumericalConstraints_t
::
const_iterator
it
;
IntervalsContainer_t
::
const_iterator
itpdof
=
pdof
.
begin
();
for
(
it
=
nc
.
begin
();
it
!=
nc
.
end
();
++
it
)
{
if
(
forPath
)
n
->
addNumericalConstraintForPath
(
*
it
,
*
itpdof
);
else
comp
->
addNumericalConstraint
(
*
it
,
*
itpdof
);
if
(
*
it
)
{
if
(
forPath
)
n
->
addNumericalConstraintForPath
(
*
it
,
*
itpdof
);
else
comp
->
addNumericalConstraint
(
*
it
,
*
itpdof
);
}
++
itpdof
;
}
assert
(
itpdof
==
pdof
.
end
());
...
...
@@ -63,8 +65,10 @@ namespace hpp {
NumericalConstraints_t
::
const_iterator
it
;
IntervalsContainer_t
::
const_iterator
itpdof
=
pdof
.
begin
();
for
(
it
=
nc
.
begin
();
it
!=
nc
.
end
();
++
it
)
{
if
(
param
)
lse
->
insertParamConstraint
(
*
it
,
*
itpdof
);
else
lse
->
insertConditionConstraint
(
*
it
,
*
itpdof
);
if
(
*
it
)
{
if
(
param
)
lse
->
insertParamConstraint
(
*
it
,
*
itpdof
);
else
lse
->
insertConditionConstraint
(
*
it
,
*
itpdof
);
}
++
itpdof
;
}
assert
(
itpdof
==
pdof
.
end
());
...
...
@@ -75,7 +79,8 @@ namespace hpp {
nc
.
addToComp
<
false
>
(
comp
);
for
(
LockedJoints_t
::
const_iterator
it
=
lj
.
begin
();
it
!=
lj
.
end
();
++
it
)
comp
->
addLockedJointConstraint
(
*
it
);
if
(
*
it
&&
(
*
it
)
->
numberDof
()
>
0
)
comp
->
addLockedJointConstraint
(
*
it
);
nc_path
.
addToComp
<
true
>
(
comp
);
}
...
...
@@ -84,7 +89,8 @@ namespace hpp {
nc_fol
.
addToComp
<
false
>
(
comp
);
for
(
LockedJoints_t
::
const_iterator
it
=
lj_fol
.
begin
();
it
!=
lj_fol
.
end
();
++
it
)
comp
->
addLockedJointConstraint
(
*
it
);
if
(
*
it
&&
(
*
it
)
->
numberDof
()
>
0
)
(
*
it
)
comp
->
addLockedJointConstraint
(
*
it
);
}
void
FoliatedManifold
::
specifyFoliation
(
LevelSetEdgePtr_t
lse
)
const
...
...
@@ -92,7 +98,8 @@ namespace hpp {
nc
.
specifyFoliation
<
false
>
(
lse
);
for
(
LockedJoints_t
::
const_iterator
it
=
lj
.
begin
();
it
!=
lj
.
end
();
++
it
)
lse
->
insertConditionConstraint
(
*
it
);
if
(
*
it
&&
(
*
it
)
->
numberDof
()
>
0
)
lse
->
insertConditionConstraint
(
*
it
);
nc_fol
.
specifyFoliation
<
true
>
(
lse
);
for
(
LockedJoints_t
::
const_iterator
it
=
lj_fol
.
begin
();
...
...
@@ -468,20 +475,24 @@ namespace hpp {
const
LockedJoints_t
objectLocks
,
FoliatedManifold
&
place
,
FoliatedManifold
&
preplace
)
{
place
.
nc
.
nc
.
push_back
(
placement
);
place
.
nc
.
pdof
.
push_back
(
SizeIntervals_t
());
// The placement constraints are not required in the path, as long as
// they are satisfied at both ends and the object does not move. The
// former condition is ensured by the placement constraints on both
// ends and the latter is ensure by the LockedJoint constraints.
// place.nc_path.nc.push_back (placement);
// place.nc_path.pdof.push_back (SizeIntervals_t());
if
(
placement
)
{
place
.
nc
.
nc
.
push_back
(
placement
);
place
.
nc
.
pdof
.
push_back
(
SizeIntervals_t
());
// The placement constraints are not required in the path, as long as
// they are satisfied at both ends and the object does not move. The
// former condition is ensured by the placement constraints on both
// ends and the latter is ensure by the LockedJoint constraints.
// place.nc_path.nc.push_back (placement);
// place.nc_path.pdof.push_back (SizeIntervals_t());
}
std
::
copy
(
objectLocks
.
begin
(),
objectLocks
.
end
(),
std
::
back_inserter
(
place
.
lj_fol
));
preplace
.
nc
.
nc
.
push_back
(
preplacement
);
preplace
.
nc
.
pdof
.
push_back
(
SizeIntervals_t
());
preplace
.
nc_path
.
nc
.
push_back
(
preplacement
);
preplace
.
nc_path
.
pdof
.
push_back
(
SizeIntervals_t
());
if
(
placement
&&
preplacement
)
{
preplace
.
nc
.
nc
.
push_back
(
preplacement
);
preplace
.
nc
.
pdof
.
push_back
(
SizeIntervals_t
());
// preplace.nc_path.nc.push_back (preplacement);
// preplace.nc_path.pdof.push_back (SizeIntervals_t());
}
}
namespace
{
...
...
This diff is collapsed.
Click to expand it.
src/graph/statistics.cc
+
3
−
2
View file @
a7159916
...
...
@@ -165,8 +165,9 @@ namespace hpp {
{
ConfigProjectorPtr_t
p
=
f_
.
parametrizer
()
->
configProjector
();
if
(
p
)
{
threshold_
=
p
->
errorThreshold
()
/
sqrt
((
double
)
p
->
rightHandSide
().
size
());
if
(
p
->
rightHandSide
().
size
()
>
0
)
threshold_
=
p
->
errorThreshold
()
/
sqrt
((
double
)
p
->
rightHandSide
().
size
());
}
}
...
...
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