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
10205b21
Verified
Commit
10205b21
authored
4 years ago
by
Gabriele Buondonno
Committed by
Justin Carpentier
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[multibody] [addFrame] Change return type to FrameIndex
parent
b1596234
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/multibody/model.hpp
+1
-2
1 addition, 2 deletions
src/multibody/model.hpp
src/multibody/model.hxx
+4
-4
4 additions, 4 deletions
src/multibody/model.hxx
with
5 additions
and
6 deletions
src/multibody/model.hpp
+
1
−
2
View file @
10205b21
...
...
@@ -508,9 +508,8 @@ namespace pinocchio
/// \param[in] frame The frame to add to the kinematic tree.
///
/// \return Returns the index of the frame if it has been successfully added or if it already exists in the kinematic tree.
/// The function returns -1 when the frame.type did not match with the existing frame in the kinematic having the same name.
///
int
addFrame
(
const
Frame
&
frame
);
FrameIndex
addFrame
(
const
Frame
&
frame
);
///
/// \brief Check the validity of the attributes of Model with respect to the specification of some
...
...
This diff is collapsed.
Click to expand it.
src/multibody/model.hxx
+
4
−
4
View file @
10205b21
...
...
@@ -248,19 +248,19 @@ namespace pinocchio
}
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
>
inline
int
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
inline
typename
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
FrameIndex
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
addFrame
(
const
Frame
&
frame
)
{
// Check if the frame.name exists with the same type
if
(
existFrame
(
frame
.
name
,
frame
.
type
))
{
FrameIndex
frame_id
=
getFrameId
(
frame
.
name
,
frame
.
type
);
return
(
int
)
frame_id
;
return
getFrameId
(
frame
.
name
,
frame
.
type
);
}
// else: we must add a new frames to the current stack
frames
.
push_back
(
frame
);
nframes
++
;
return
nframes
-
1
;
return
FrameIndex
(
nframes
-
1
)
;
}
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
>
...
...
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