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
3c029ada
Commit
3c029ada
authored
8 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[C++] Fix issues related to frame "universe"
parent
1d53aec9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/multibody/model.hpp
+3
-0
3 additions, 0 deletions
src/multibody/model.hpp
src/multibody/model.hxx
+7
-4
7 additions, 4 deletions
src/multibody/model.hxx
with
10 additions
and
4 deletions
src/multibody/model.hpp
+
3
−
0
View file @
3c029ada
...
...
@@ -124,6 +124,9 @@ namespace se3
,
gravity
(
gravity981
,
Eigen
::
Vector3d
::
Zero
()
)
{
names
[
0
]
=
"universe"
;
// Should be "universe joint (trivial)"
// FIXME Should the universe joint be a FIXED_JOINT even if it is
// in the list of joints ? See comment in definition of
// Model::addJointFrame and Model::addBodyFrame
addFrame
(
Frame
(
"universe"
,
0
,
0
,
SE3
::
Identity
(),
FIXED_JOINT
));
// Inertia of universe has no sense.
inertias
[
0
].
mass
()
=
std
::
numeric_limits
<
double
>::
quiet_NaN
();
...
...
This diff is collapsed.
Click to expand it.
src/multibody/model.hxx
+
7
−
4
View file @
3c029ada
...
...
@@ -103,10 +103,11 @@ namespace se3
int
fidx
)
{
if
(
fidx
<
0
)
{
fidx
=
getFrameId
(
names
[
parents
[
jidx
]],
JOINT
);
// FIXED_JOINT is required because the parent can be the universe and its
// type is FIXED_JOINT
fidx
=
getFrameId
(
names
[
parents
[
jidx
]],
(
FrameType
)(
JOINT
|
FIXED_JOINT
));
}
if
(
fidx
>=
frames
.
size
())
throw
std
::
invalid_argument
(
"Frame not found"
);
assert
(
fidx
<
frames
.
size
()
&&
"Frame index out of bound"
);
// Add a the joint frame attached to itself to the frame vector - redundant information but useful.
return
addFrame
(
Frame
(
names
[
jidx
],
jidx
,
fidx
,
SE3
::
Identity
(),
JOINT
));
}
...
...
@@ -126,7 +127,9 @@ namespace se3
int
previousFrame
)
{
if
(
previousFrame
<
0
)
{
previousFrame
=
getFrameId
(
names
[
parentJoint
],
JOINT
);
// FIXED_JOINT is required because the parent can be the universe and its
// type is FIXED_JOINT
previousFrame
=
getFrameId
(
names
[
parentJoint
],
(
FrameType
)(
JOINT
|
FIXED_JOINT
));
}
assert
(
previousFrame
<
frames
.
size
()
&&
"Frame index out of bound"
);
return
addFrame
(
Frame
(
body_name
,
parentJoint
,
previousFrame
,
body_placement
,
BODY
));
...
...
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