Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
mobile_robotics
wolf_projects
wolf_lib
plugins
gnss
Commits
caf9167d
Commit
caf9167d
authored
9 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Rename WolfConstants --> Constants
parent
b0e63c5f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/local_parametrization_homogeneous.cpp
+1
-1
1 addition, 1 deletion
src/local_parametrization_homogeneous.cpp
src/local_parametrization_quaternion.cpp
+2
-2
2 additions, 2 deletions
src/local_parametrization_quaternion.cpp
src/wolf.h
+3
-3
3 additions, 3 deletions
src/wolf.h
with
6 additions
and
6 deletions
src/local_parametrization_homogeneous.cpp
+
1
−
1
View file @
caf9167d
...
...
@@ -31,7 +31,7 @@ bool LocalParametrizationHomogeneous::plus(const Eigen::Map<const Eigen::VectorX
using
namespace
Eigen
;
double
norm_delta
=
_delta
.
norm
();
if
(
norm_delta
>
Wolf
Constants
::
EPS
)
if
(
norm_delta
>
Constants
::
EPS
)
{
// compute rotation axis -- this guarantees unity norm
Vector3s
axis
=
_delta
/
norm_delta
;
...
...
This diff is collapsed.
Click to expand it.
src/local_parametrization_quaternion.cpp
+
2
−
2
View file @
caf9167d
...
...
@@ -21,12 +21,12 @@ bool LocalParametrizationQuaternion::plus(const Eigen::Map<const Eigen::VectorXs
assert
(
_delta_theta
.
size
()
==
local_size_
&&
"Wrong size of input delta_theta."
);
assert
(
_q_plus_delta_theta
.
size
()
==
global_size_
&&
"Wrong size of output quaternion."
);
assert
(
fabs
(
1.0
-
_q
.
norm
())
<
Wolf
Constants
::
EPS
&&
"Quaternion not normalized."
);
assert
(
fabs
(
1.0
-
_q
.
norm
())
<
Constants
::
EPS
&&
"Quaternion not normalized."
);
using
namespace
Eigen
;
double
angle
=
_delta_theta
.
norm
();
if
(
angle
>
Wolf
Constants
::
EPS
)
if
(
angle
>
Constants
::
EPS
)
{
// compute rotation axis -- this guarantees unity norm
Vector3s
axis
=
_delta_theta
/
angle
;
...
...
This diff is collapsed.
Click to expand it.
src/wolf.h
+
3
−
3
View file @
caf9167d
...
...
@@ -37,7 +37,7 @@ namespace wolf {
typedef
double
WolfScalar
;
// Use this for double, 64 bit precision
//typedef long double WolfScalar; // Use this for long double, 128 bit precision
namespace
Wolf
Constants
{
namespace
Constants
{
// Wolf standard tolerance
const
double
EPS
=
1e-8
;
...
...
@@ -348,7 +348,7 @@ inline WolfScalar pi2pi(const WolfScalar& angle)
namespace
Eigen
{
inline
void
v2q
(
const
Eigen
::
VectorXs
&
_v
,
Eigen
::
Quaternions
&
_q
){
wolf
::
WolfScalar
angle
=
_v
.
norm
();
if
(
angle
<
wolf
::
Wolf
Constants
::
EPS
)
if
(
angle
<
wolf
::
Constants
::
EPS
)
_q
=
Eigen
::
Quaternions
::
Identity
();
else
{
...
...
@@ -358,7 +358,7 @@ inline void v2q(const Eigen::VectorXs& _v, Eigen::Quaternions& _q){
inline
void
v2q
(
const
Eigen
::
VectorXs
&
_v
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_q
){
wolf
::
WolfScalar
angle
=
_v
.
norm
();
if
(
angle
<
wolf
::
Wolf
Constants
::
EPS
)
if
(
angle
<
wolf
::
Constants
::
EPS
)
_q
=
Eigen
::
Quaternions
::
Identity
();
else
{
...
...
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