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
fb49d238
Commit
fb49d238
authored
6 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
replace Affine --> Isometry
parent
6a377906
No related branches found
No related tags found
1 merge request
!2
replace Affine --> Isometry
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hello_wolf/factor_bearing.h
+1
-1
1 addition, 1 deletion
hello_wolf/factor_bearing.h
hello_wolf/factor_range_bearing.h
+3
-3
3 additions, 3 deletions
hello_wolf/factor_range_bearing.h
hello_wolf/processor_range_bearing.h
+1
-1
1 addition, 1 deletion
hello_wolf/processor_range_bearing.h
with
5 additions
and
5 deletions
hello_wolf/factor_bearing.h
+
1
−
1
View file @
fb49d238
...
@@ -57,7 +57,7 @@ inline bool FactorBearing::operator ()(const T* const _p1, const T* const _o1,
...
@@ -57,7 +57,7 @@ inline bool FactorBearing::operator ()(const T* const _p1, const T* const _o1,
{
{
// 1. produce a transformation matrix to transform from robot frame to world frame
// 1. produce a transformation matrix to transform from robot frame to world frame
Transform
<
T
,
2
,
Affine
>
H_w_r
=
Translation
<
T
,
2
>
(
_p1
[
0
],
_p1
[
1
])
*
Rotation2D
<
T
>
(
*
_o1
)
;
// Robot frame = robot-to-world transform
Transform
<
T
,
2
,
Isometry
>
H_w_r
=
Translation
<
T
,
2
>
(
_p1
[
0
],
_p1
[
1
])
*
Rotation2D
<
T
>
(
*
_o1
)
;
// Robot frame = robot-to-world transform
// Map input pointers into meaningful Eigen elements
// Map input pointers into meaningful Eigen elements
Map
<
const
Matrix
<
T
,
2
,
1
>>
point_w
(
_p2
);
Map
<
const
Matrix
<
T
,
2
,
1
>>
point_w
(
_p2
);
Map
<
const
Matrix
<
T
,
1
,
1
>>
res
(
_res
);
Map
<
const
Matrix
<
T
,
1
,
1
>>
res
(
_res
);
...
...
This diff is collapsed.
Click to expand it.
hello_wolf/factor_range_bearing.h
+
3
−
3
View file @
fb49d238
...
@@ -97,11 +97,11 @@ inline bool FactorRangeBearing::operator ()(const T* const _p_w_r, // robot posi
...
@@ -97,11 +97,11 @@ inline bool FactorRangeBearing::operator ()(const T* const _p_w_r, // robot posi
Map
<
Matrix
<
T
,
2
,
1
>>
res
(
_res
);
// residual
Map
<
Matrix
<
T
,
2
,
1
>>
res
(
_res
);
// residual
// 1. produce transformation matrices to transform from sensor frame --> to robot frame --> to world frame
// 1. produce transformation matrices to transform from sensor frame --> to robot frame --> to world frame
Transform
<
T
,
2
,
Affine
>
H_w_r
=
Translation
<
T
,
2
>
(
_p_w_r
[
0
],
_p_w_r
[
1
])
*
Rotation2D
<
T
>
(
*
_o_w_r
)
;
// Robot frame = robot-to-world transform
Transform
<
T
,
2
,
Isometry
>
H_w_r
=
Translation
<
T
,
2
>
(
_p_w_r
[
0
],
_p_w_r
[
1
])
*
Rotation2D
<
T
>
(
*
_o_w_r
)
;
// Robot frame = robot-to-world transform
Transform
<
T
,
2
,
Affine
>
H_r_s
=
Translation
<
T
,
2
>
(
_p_r_s
[
0
],
_p_r_s
[
1
])
*
Rotation2D
<
T
>
(
*
_o_r_s
)
;
// Sensor frame = sensor-to-robot transform
Transform
<
T
,
2
,
Isometry
>
H_r_s
=
Translation
<
T
,
2
>
(
_p_r_s
[
0
],
_p_r_s
[
1
])
*
Rotation2D
<
T
>
(
*
_o_r_s
)
;
// Sensor frame = sensor-to-robot transform
// 2. Transform world-referenced landmark point to sensor-referenced point
// 2. Transform world-referenced landmark point to sensor-referenced point
Transform
<
T
,
2
,
Affine
>
H_w_s
=
H_w_r
*
H_r_s
;
// world-to-sensor transform
Transform
<
T
,
2
,
Isometry
>
H_w_s
=
H_w_r
*
H_r_s
;
// world-to-sensor transform
Matrix
<
T
,
2
,
1
>
lmk_s
=
H_w_s
.
inverse
()
*
lmk
;
// point in sensor frame
Matrix
<
T
,
2
,
1
>
lmk_s
=
H_w_s
.
inverse
()
*
lmk
;
// point in sensor frame
// 3. Get the expected range-and-bearing of the point
// 3. Get the expected range-and-bearing of the point
...
...
This diff is collapsed.
Click to expand it.
hello_wolf/processor_range_bearing.h
+
1
−
1
View file @
fb49d238
...
@@ -30,7 +30,7 @@ WOLF_PTR_TYPEDEFS(ProcessorRangeBearing);
...
@@ -30,7 +30,7 @@ WOLF_PTR_TYPEDEFS(ProcessorRangeBearing);
class
ProcessorRangeBearing
:
public
ProcessorBase
class
ProcessorRangeBearing
:
public
ProcessorBase
{
{
public:
public:
typedef
Eigen
::
Transform
<
Scalar
,
2
,
Eigen
::
Affine
>
Trf
;
typedef
Eigen
::
Transform
<
Scalar
,
2
,
Eigen
::
Isometry
>
Trf
;
ProcessorRangeBearing
(
const
SensorRangeBearingPtr
_sensor_ptr
,
ProcessorParamsBasePtr
_params
);
ProcessorRangeBearing
(
const
SensorRangeBearingPtr
_sensor_ptr
,
ProcessorParamsBasePtr
_params
);
virtual
~
ProcessorRangeBearing
()
{
/* empty */
}
virtual
~
ProcessorRangeBearing
()
{
/* empty */
}
...
...
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