Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
eigenpy
Commits
ed6518c8
Unverified
Commit
ed6518c8
authored
Jan 19, 2021
by
Justin Carpentier
Committed by
GitHub
Jan 19, 2021
Browse files
Merge pull request #221 from jcarpent/devel
Fix init call order
parents
6e74d285
424595ce
Pipeline
#12892
failed with stage
in 11 minutes and 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
include/eigenpy/quaternion.hpp
View file @
ed6518c8
/*
* Copyright 2014-202
0
CNRS INRIA
* Copyright 2014-202
1
CNRS INRIA
*/
#ifndef __eigenpy_quaternion_hpp__
...
...
@@ -111,12 +111,12 @@ namespace eigenpy
{
cl
.
def
(
bp
::
init
<>
(
bp
::
arg
(
"self"
),
"Default constructor"
))
.
def
(
bp
::
init
<
Vector4
>
((
bp
::
arg
(
"self"
),
bp
::
arg
(
"vec4"
)),
"Initialize from a vector 4D.
\n
"
"
\t
vec4 : a 4D vector representing quaternion coefficients in the order xyzw."
))
.
def
(
bp
::
init
<
Matrix3
>
((
bp
::
arg
(
"self"
),
bp
::
arg
(
"R"
)),
"Initialize from rotation matrix.
\n
"
"
\t
R : a rotation matrix 3x3."
))
.
def
(
bp
::
init
<
Vector4
>
((
bp
::
arg
(
"self"
),
bp
::
arg
(
"vec4"
)),
"Initialize from a vector 4D.
\n
"
"
\t
vec4 : a 4D vector representing quaternion coefficients in the order xyzw."
))
.
def
(
bp
::
init
<
AngleAxis
>
((
bp
::
arg
(
"self"
),
bp
::
arg
(
"aa"
)),
"Initialize from an angle axis.
\n
"
"
\t
aa: angle axis object."
))
...
...
unittest/python/test_geometry.py
View file @
ed6518c8
...
...
@@ -18,6 +18,10 @@ q.normalize()
assert
(
isapprox
(
np
.
linalg
.
norm
(
q
.
coeffs
()),
q
.
norm
()))
assert
(
isapprox
(
np
.
linalg
.
norm
(
q
.
coeffs
()),
1
))
v
=
np
.
array
([
0.5
,
-
0.5
,
0.5
,
0.5
])
qv
=
Quaternion
(
v
)
assert
(
isapprox
(
qv
.
coeffs
(),
v
))
r
=
AngleAxis
(
q
)
q2
=
Quaternion
(
r
)
assert
(
q
==
q
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment