Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio
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
Stack Of Tasks
pinocchio
Commits
21aba98a
Commit
21aba98a
authored
8 years ago
by
Nicolas Mansard
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #279 from jcarpent/devel
Fix bug in SRDF parser
parents
c591058a
252b4c5d
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/parsers/srdf.hpp
+12
-5
12 additions, 5 deletions
src/parsers/srdf.hpp
with
12 additions
and
5 deletions
src/parsers/srdf.hpp
+
12
−
5
View file @
21aba98a
...
...
@@ -38,8 +38,11 @@ namespace se3
/// \brief Deactive all possible collision pairs mentioned in the SRDF file.
/// It throws if the SRDF file is incorrect.
///
/// \param[in] model Model of the kinematic tree.
/// \param[in] model_geom Model of the geometries.
/// \param[out] data_geom Data containing the active collision pairs.
/// \param[in] filename The complete path to the SRDF file.
/// \param[in] verbose Verbosity mode.
/// \param[in] verbose Verbosity mode
(print removed collision pairs and undefined link inside the model)
.
///
inline
void
removeCollisionPairsFromSrdf
(
const
Model
&
model
,
const
GeometryModel
&
model_geom
,
...
...
@@ -84,12 +87,14 @@ namespace se3
continue
;
}
const
Model
::
JointIndex
id1
=
model
.
getBodyId
(
link1
);
const
Model
::
JointIndex
id2
=
model
.
getBodyId
(
link2
);
const
Model
::
JointIndex
frame_id1
=
model
.
getBodyId
(
link1
);
const
Model
::
JointIndex
joint_id1
=
model
.
frames
[
frame_id1
].
parent
;
const
Model
::
JointIndex
frame_id2
=
model
.
getBodyId
(
link2
);
const
Model
::
JointIndex
joint_id2
=
model
.
frames
[
frame_id2
].
parent
;
typedef
GeometryModel
::
GeomIndexList
GeomIndexList
;
const
GeomIndexList
&
innerObject1
=
model_geom
.
innerObjects
.
at
(
id1
);
const
GeomIndexList
&
innerObject2
=
model_geom
.
innerObjects
.
at
(
id2
);
const
GeomIndexList
&
innerObject1
=
model_geom
.
innerObjects
.
at
(
joint_
id1
);
const
GeomIndexList
&
innerObject2
=
model_geom
.
innerObjects
.
at
(
joint_
id2
);
for
(
GeomIndexList
::
const_iterator
it1
=
innerObject1
.
begin
();
it1
!=
innerObject1
.
end
();
...
...
@@ -100,6 +105,8 @@ namespace se3
++
it2
)
{
data_geom
.
removeCollisionPair
(
CollisionPair
(
*
it1
,
*
it2
));
if
(
verbose
)
std
::
cout
<<
"Remove collision pair ("
<<
joint_id1
<<
","
<<
joint_id2
<<
")"
<<
std
::
endl
;
}
}
...
...
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