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
98024387
Commit
98024387
authored
9 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update to modifications in hpp-constraints
* StaticStabilityGravity -> ConvexShapeContact
parent
c395a8ea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/problem-solver.cc
+15
-14
15 additions, 14 deletions
src/problem-solver.cc
with
15 additions
and
14 deletions
src/problem-solver.cc
+
15
−
14
View file @
98024387
...
...
@@ -22,7 +22,7 @@
#include
<hpp/model/gripper.hh>
#include
<hpp/constraints/
static-stability
.hh>
#include
<hpp/constraints/
convex-shape-contact
.hh>
#include
<hpp/core/random-shortcut.hh>
#include
<hpp/core/discretized-collision-checking.hh>
...
...
@@ -140,32 +140,33 @@ namespace hpp {
const
std
::
string
&
surface2
)
{
if
(
!
robot_
)
throw
std
::
runtime_error
(
"No robot loaded"
);
using
constraints
::
StaticStabilityGravityPtr_t
;
using
constraints
::
StaticStabilityGravityComplement
;
using
constraints
::
StaticStabilityGravityComplementPtr_t
;
using
constraints
::
ConvexShape
;
using
constraints
::
ConvexShapeContactPtr_t
;
using
constraints
::
ConvexShapeContactComplement
;
using
constraints
::
ConvexShapeContactComplementPtr_t
;
std
::
string
complementName
(
name
+
"/complement"
);
std
::
pair
<
StaticStabilityGravity
Ptr_t
,
StaticStabilityGravity
ComplementPtr_t
>
constraints
(
StaticStabilityGravity
Complement
::
createPair
std
::
pair
<
ConvexShapeContact
Ptr_t
,
ConvexShapeContact
ComplementPtr_t
>
constraints
(
ConvexShapeContact
Complement
::
createPair
(
name
,
complementName
,
robot_
));
JointAnd
Triangl
es_t
l
=
robot_
->
get
<
JointAnd
Triangl
es_t
>
(
surface1
);
JointAnd
Shap
es_t
l
=
robot_
->
get
<
JointAnd
Shap
es_t
>
(
surface1
);
if
(
l
.
empty
())
throw
std
::
runtime_error
(
"First list of triangles not found."
);
for
(
JointAnd
Triangl
es_t
::
const_iterator
it
=
l
.
begin
();
for
(
JointAnd
Shap
es_t
::
const_iterator
it
=
l
.
begin
();
it
!=
l
.
end
();
++
it
)
{
constraints
.
first
->
addObject
Triangl
e
(
it
->
second
,
it
->
first
);
constraints
.
first
->
addObject
(
ConvexShap
e
(
it
->
second
,
it
->
first
)
)
;
}
// Search first robot triangles
l
=
robot_
->
get
<
JointAnd
Triangl
es_t
>
(
surface2
);
l
=
robot_
->
get
<
JointAnd
Shap
es_t
>
(
surface2
);
if
(
l
.
empty
())
{
// and then environment triangles.
l
=
get
<
JointAnd
Triangl
es_t
>
(
surface2
);
l
=
get
<
JointAnd
Shap
es_t
>
(
surface2
);
if
(
l
.
empty
())
throw
std
::
runtime_error
(
"Second list of triangles not found."
);
}
for
(
JointAnd
Triangl
es_t
::
const_iterator
it
=
l
.
begin
();
for
(
JointAnd
Shap
es_t
::
const_iterator
it
=
l
.
begin
();
it
!=
l
.
end
();
++
it
)
{
constraints
.
first
->
addFloor
Triangl
e
(
it
->
second
,
it
->
first
);
constraints
.
first
->
addFloor
(
ConvexShap
e
(
it
->
second
,
it
->
first
)
)
;
}
addNumericalConstraint
(
name
,
constraints
.
first
);
...
...
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