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
3b76cb80
Commit
3b76cb80
authored
10 years ago
by
Nicolas Mansard
Committed by
Valenza Florian
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Correction of the warning at CRBA compilation.
parent
6c609e48
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/spatial/force.hpp
+8
-5
8 additions, 5 deletions
src/spatial/force.hpp
src/spatial/motion.hpp
+10
-7
10 additions, 7 deletions
src/spatial/motion.hpp
with
18 additions
and
12 deletions
src/spatial/force.hpp
+
8
−
5
View file @
3b76cb80
...
...
@@ -28,15 +28,16 @@ namespace se3
ForceTpl
(
const
Eigen
::
MatrixBase
<
f3_t
>
&
f
,
const
Eigen
::
MatrixBase
<
n3_t
>
&
n
)
:
m_n
(
n
),
m_f
(
f
)
{}
template
<
typename
f6
>
ForceTpl
(
const
Eigen
::
MatrixBase
<
f6
>
&
f
)
:
m_n
(
f
.
template
segment
<
3
>(
ANGULAR
))
,
m_f
(
f
.
template
segment
<
3
>(
LINEAR
))
explicit
ForceTpl
(
const
Eigen
::
MatrixBase
<
f6
>
&
f
)
:
m_n
(
f
.
template
segment
<
3
>(
ANGULAR
))
,
m_f
(
f
.
template
segment
<
3
>(
LINEAR
))
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY
(
f6
);
assert
(
f
.
size
()
==
6
);
}
template
<
typename
S2
,
int
O2
>
ForceTpl
(
const
ForceTpl
<
S2
,
O2
>
&
clone
)
:
m_n
(
clone
.
angular
()),
m_f
(
clone
.
linear
())
{}
explicit
ForceTpl
(
const
ForceTpl
<
S2
,
O2
>
&
clone
)
:
m_n
(
clone
.
angular
()),
m_f
(
clone
.
linear
())
{}
// initializers
static
ForceTpl
Zero
()
{
return
ForceTpl
(
Vector3
::
Zero
(),
Vector3
::
Zero
());
}
...
...
@@ -58,8 +59,10 @@ namespace se3
void
angular
(
const
Vector3
&
n
)
{
m_n
=
n
;
}
// Arithmetic operators
ForceTpl
&
operator
=
(
const
Vector6
&
phi
)
template
<
typename
F6
>
ForceTpl
&
operator
=
(
const
Eigen
::
MatrixBase
<
F6
>
&
phi
)
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY
(
F6
);
assert
(
phi
.
size
()
==
6
);
m_n
=
phi
.
template
segment
<
3
>(
ANGULAR
);
m_f
=
phi
.
template
segment
<
3
>(
LINEAR
);
return
*
this
;
...
...
This diff is collapsed.
Click to expand it.
src/spatial/motion.hpp
+
10
−
7
View file @
3b76cb80
...
...
@@ -29,18 +29,21 @@ namespace se3
MotionTpl
(
const
Eigen
::
MatrixBase
<
v1
>
&
v
,
const
Eigen
::
MatrixBase
<
v2
>
&
w
)
:
m_w
(
w
),
m_v
(
v
)
{}
template
<
typename
v6
>
MotionTpl
(
const
Eigen
::
MatrixBase
<
v6
>
&
v
)
:
m_w
(
v
.
template
segment
<
3
>(
ANGULAR
))
,
m_v
(
v
.
template
segment
<
3
>(
LINEAR
))
explicit
MotionTpl
(
const
Eigen
::
MatrixBase
<
v6
>
&
v
)
:
m_w
(
v
.
template
segment
<
3
>(
ANGULAR
))
,
m_v
(
v
.
template
segment
<
3
>(
LINEAR
))
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY
(
v6
);
assert
(
v
.
size
()
==
6
);
}
template
<
typename
S2
,
int
O2
>
MotionTpl
(
const
MotionTpl
<
S2
,
O2
>
&
clone
)
:
m_w
(
clone
.
angular
()),
m_v
(
clone
.
linear
())
{}
explicit
MotionTpl
(
const
MotionTpl
<
S2
,
O2
>
&
clone
)
:
m_w
(
clone
.
angular
()),
m_v
(
clone
.
linear
())
{}
// initializers
static
MotionTpl
Zero
()
{
return
MotionTpl
(
Vector3
::
Zero
(),
Vector3
::
Zero
());
}
static
MotionTpl
Random
()
{
return
MotionTpl
(
Vector3
::
Random
(),
Vector3
::
Random
());
}
Vector6
toVector
()
const
{
Vector6
v
;
...
...
@@ -57,10 +60,10 @@ namespace se3
void
linear
(
const
Vector3
&
v
)
{
m_v
=
v
;
}
// Arithmetic operators
template
<
typename
D
>
MotionTpl
&
operator
=
(
const
Eigen
::
MatrixBase
<
D
>
&
v
)
template
<
typename
V6
>
MotionTpl
&
operator
=
(
const
Eigen
::
MatrixBase
<
V6
>
&
v
)
{
EIGEN_STATIC_ASSERT_VECTOR_
SPECIFIC_SIZE
(
D
,
6
);
EIGEN_STATIC_ASSERT_VECTOR_
ONLY
(
V6
);
assert
(
v
.
size
()
==
6
);
m_w
=
v
.
template
segment
<
3
>(
ANGULAR
);
m_v
=
v
.
template
segment
<
3
>(
LINEAR
);
return
*
this
;
...
...
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