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
94a96feb
Commit
94a96feb
authored
8 years ago
by
Nicolas Mansard
Committed by
Nicolas Mansard
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[C++] IVIGIT algo/copy.
parent
f713ace4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
src/algorithm/copy.hpp
+71
-0
71 additions, 0 deletions
src/algorithm/copy.hpp
with
72 additions
and
0 deletions
CMakeLists.txt
+
1
−
0
View file @
94a96feb
...
...
@@ -186,6 +186,7 @@ SET(${PROJECT_NAME}_ALGORITHM_HEADERS
algorithm/energy.hpp
algorithm/frames.hpp
algorithm/compute-all-terms.hpp
algorithm/copy.hpp
)
...
...
This diff is collapsed.
Click to expand it.
src/algorithm/copy.hpp
0 → 100644
+
71
−
0
View file @
94a96feb
//
// Copyright (c) 2016 CNRS
//
// This file is part of Pinocchio
// Pinocchio is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later version.
//
// Pinocchio is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// Pinocchio If not, see
// <http://www.gnu.org/licenses/>.
#ifndef __se3_copy_hpp__
#define __se3_copy_hpp__
#include
"pinocchio/multibody/model.hpp"
namespace
se3
{
///
/// \brief Copy part of the data from <orig> to <dest>. Template parameter can be
/// used to select at which differential level the copy should occur.
///
/// \param[in] model The model structure of the rigid body system.
/// \param[in] orig Data from which the values are copied.
/// \param[in] dest Data to which the values are copied
/// \param[in] LEVEL if =0, copy oMi. If =1, also copy v. If =2, also copy a, a_gf and f.
///
template
<
int
level
>
inline
void
copy
(
const
Model
&
model
,
const
Data
&
origin
,
Data
&
dest
);
}
// namespace se3
/* --- Details -------------------------------------------------------------------- */
//#include "pinocchio/algorithm/copy.hxx"
namespace
se3
{
template
<
int
LEVEL
>
inline
void
copy
(
const
Model
&
model
,
const
Data
&
origin
,
Data
&
dest
)
{
for
(
se3
::
JointIndex
jid
=
1
;
int
(
jid
)
<
model
.
njoint
;
++
jid
)
{
assert
(
LEVEL
>=
0
);
dest
.
oMi
[
jid
]
=
origin
.
oMi
[
jid
];
if
(
LEVEL
>=
1
)
{
dest
.
v
[
jid
]
=
origin
.
v
[
jid
];
}
if
(
LEVEL
>=
2
)
{
dest
.
a
[
jid
]
=
origin
.
v
[
jid
];
dest
.
a_gf
[
jid
]
=
origin
.
a_gf
[
jid
];
dest
.
f
[
jid
]
=
origin
.
f
[
jid
];
}
}
}
}
// namespace se3
#endif // ifndef __se3_copy_hpp__
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