Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
eigenpy
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
eigenpy
Commits
cfcc81e2
Commit
cfcc81e2
authored
8 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[Quaternion] Update API to follow old Eigen version API
parent
1870d4f2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/quaternion.hpp
+18
-4
18 additions, 4 deletions
src/quaternion.hpp
with
18 additions
and
4 deletions
src/quaternion.hpp
+
18
−
4
View file @
cfcc81e2
...
...
@@ -61,7 +61,7 @@ namespace eigenpy
.
def
(
bp
::
init
<
Matrix3
>
((
bp
::
arg
(
"matrixRotation"
)),
"Initialize from rotation matrix."
))
.
def
(
bp
::
init
<
AngleAxis
>
((
bp
::
arg
(
"angleaxis"
)),
"Initialize from angle axis."
))
.
def
(
bp
::
init
<
Quaternion
>
((
bp
::
arg
(
"clone"
)),
"Copy constructor."
))
.
def
(
"__init__"
,
bp
::
make_constructor
(
&
QuaternionVisitor
::
f
romTwoVectors
,
.
def
(
"__init__"
,
bp
::
make_constructor
(
&
QuaternionVisitor
::
F
romTwoVectors
,
bp
::
default_call_policies
(),
(
bp
::
arg
(
"u"
),
bp
::
arg
(
"v"
))),
"Initialize from two vector u,v"
)
.
def
(
bp
::
init
<
Scalar
,
Scalar
,
Scalar
,
Scalar
>
...
...
@@ -83,9 +83,13 @@ namespace eigenpy
(
Scalar
(
Quaternion
::*
)()
const
)
&
Quaternion
::
w
,
&
QuaternionVisitor
::
setCoeff
<
3
>
,
"The w coefficient."
)
.
def
(
"isApprox"
,(
bool
(
Quaternion
::*
)(
const
Quaternion
&
))
&
Quaternion
::
template
isApprox
<
Quaternion
>,
// .def("isApprox",(bool (Quaternion::*)(const Quaternion &))&Quaternion::template isApprox<Quaternion>,
// "Returns true if *this is approximately equal to other.")
// .def("isApprox",(bool (Quaternion::*)(const Quaternion &, const Scalar prec))&Quaternion::template isApprox<Quaternion>,
// "Returns true if *this is approximately equal to other, within the precision determined by prec..")
.
def
(
"isApprox"
,(
bool
(
*
)(
const
Quaternion
&
))
&
isApprox
,
"Returns true if *this is approximately equal to other."
)
.
def
(
"isApprox"
,(
bool
(
Quaternion
::
*
)(
const
Quaternion
&
,
const
Scalar
prec
))
&
Quaternion
::
template
isApprox
<
Quaternion
>
,
.
def
(
"isApprox"
,(
bool
(
*
)(
const
Quaternion
&
,
const
Scalar
prec
))
&
isApprox
,
"Returns true if *this is approximately equal to other, within the precision determined by prec.."
)
/* --- Methods --- */
...
...
@@ -131,6 +135,10 @@ namespace eigenpy
// .def("FromTwoVectors",&Quaternion::template FromTwoVectors<Vector3,Vector3>,
// bp::args("a","b"),
// "Returns the quaternion which transform a into b through a rotation.")
.
def
(
"FromTwoVectors"
,
&
FromTwoVectors
,
bp
::
args
(
"a"
,
"b"
),
"Returns the quaternion which transform a into b through a rotation."
,
bp
::
return_value_policy
<
bp
::
manage_new_object
>
())
.
staticmethod
(
"FromTwoVectors"
)
.
def
(
"Identity"
,
&
Quaternion
::
Identity
,
"Returns a quaternion representing an identity rotation."
)
.
staticmethod
(
"Identity"
)
...
...
@@ -150,11 +158,17 @@ namespace eigenpy
static
Quaternion
&
assign
(
Quaternion
&
self
,
const
OtherQuat
&
quat
)
{
return
self
=
quat
;
}
static
Quaternion
*
f
romTwoVectors
(
const
Vector3
&
u
,
const
Vector3
&
v
)
static
Quaternion
*
F
romTwoVectors
(
const
Vector3
&
u
,
const
Vector3
&
v
)
{
Quaternion
*
q
(
new
Quaternion
);
q
->
setFromTwoVectors
(
u
,
v
);
return
q
;
}
static
bool
isApprox
(
const
Quaternion
&
self
,
const
Quaternion
&
other
,
const
Scalar
prec
=
Eigen
::
NumTraits
<
Scalar
>::
dummy_precision
)
{
return
self
.
isApprox
(
other
,
prec
);
}
static
bool
__eq__
(
const
Quaternion
&
u
,
const
Quaternion
&
v
)
{
...
...
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