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
845c1b50
Commit
845c1b50
authored
8 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Graph helper: detect object with no placement information.
parent
c675e2b8
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/graph/helper.cc
+12
-2
12 additions, 2 deletions
src/graph/helper.cc
with
12 additions
and
2 deletions
src/graph/helper.cc
+
12
−
2
View file @
845c1b50
...
...
@@ -670,6 +670,12 @@ namespace hpp {
throw
std
::
out_of_range
(
"Handle index"
);
}
/// Check if an object can be placed
bool
objectCanBePlaced
(
const
Object_t
&
o
)
const
{
return
o
.
get
<
0
>
().
get
<
0
>
();
}
/// Check is an object is grasped by the GraspV_t
bool
isObjectGrasped
(
const
GraspV_t
&
idxOH
,
const
Object_t
&
o
)
const
...
...
@@ -764,6 +770,7 @@ namespace hpp {
}
index_t
iOH
=
0
;
BOOST_FOREACH
(
const
Object_t
&
o
,
r
.
ohs
)
{
if
(
!
r
.
objectCanBePlaced
(
o
))
continue
;
bool
oIsGrasped
=
false
;
// TODO: use the fact that the set is sorted.
// BOOST_FOREACH (const HandlePtr_t& h, o.get<1>())
...
...
@@ -804,8 +811,10 @@ namespace hpp {
to
=
makeNode
(
r
,
gTo
,
priority
+
1
);
const
Object_t
&
o
=
r
.
object
(
gTo
[
iG
]);
/// Detect when grasping an object already grasped.
bool
noPlace
=
r
.
isObjectGrasped
(
gFrom
,
o
);
// Detect when grasping an object already grasped.
// or when there is no placement information for it.
bool
noPlace
=
!
r
.
objectCanBePlaced
(
o
)
||
r
.
isObjectGrasped
(
gFrom
,
o
);
FoliatedManifold
grasp
,
pregrasp
,
place
,
preplace
,
submanifold
;
...
...
@@ -829,6 +838,7 @@ namespace hpp {
}
index_t
iOH
=
0
;
BOOST_FOREACH
(
const
Object_t
&
o
,
r
.
ohs
)
{
if
(
!
r
.
objectCanBePlaced
(
o
))
continue
;
bool
oIsGrasped
=
false
;
const
index_t
iOHstart
=
iOH
;
for
(;
iOH
<
iOHstart
+
o
.
get
<
1
>
().
size
();
++
iOH
)
{
...
...
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