Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
ccc7e345
Commit
ccc7e345
authored
4 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Rename FactorAutodiffDistance3d -> FactorDistance3d
parent
0474b075
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!406
Resolve "Factors renaming"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
include/core/factor/factor_distance_3d.h
+7
-7
7 additions, 7 deletions
include/core/factor/factor_distance_3d.h
test/gtest_factor_autodiff_distance_3d.cpp
+5
-5
5 additions, 5 deletions
test/gtest_factor_autodiff_distance_3d.cpp
with
13 additions
and
13 deletions
CMakeLists.txt
+
1
−
1
View file @
ccc7e345
...
@@ -216,12 +216,12 @@ SET(HDRS_CAPTURE
...
@@ -216,12 +216,12 @@ SET(HDRS_CAPTURE
SET
(
HDRS_FACTOR
SET
(
HDRS_FACTOR
include/core/factor/factor_analytic.h
include/core/factor/factor_analytic.h
include/core/factor/factor_autodiff.h
include/core/factor/factor_autodiff.h
include/core/factor/factor_autodiff_distance_3d.h
include/core/factor/factor_base.h
include/core/factor/factor_base.h
include/core/factor/factor_block_absolute.h
include/core/factor/factor_block_absolute.h
include/core/factor/factor_block_difference.h
include/core/factor/factor_block_difference.h
include/core/factor/factor_diff_drive.h
include/core/factor/factor_diff_drive.h
include/core/factor/factor_odom_2d.h
include/core/factor/factor_odom_2d.h
include/core/factor/factor_distance_3d.h
include/core/factor/factor_odom_2d_closeloop.h
include/core/factor/factor_odom_2d_closeloop.h
include/core/factor/factor_odom_2d_analytic.h
include/core/factor/factor_odom_2d_analytic.h
include/core/factor/factor_odom_3d.h
include/core/factor/factor_odom_3d.h
...
...
This diff is collapsed.
Click to expand it.
include/core/factor/factor_
autodiff_
distance_3d.h
→
include/core/factor/factor_distance_3d.h
+
7
−
7
View file @
ccc7e345
...
@@ -5,20 +5,20 @@
...
@@ -5,20 +5,20 @@
* \author: jsola
* \author: jsola
*/
*/
#ifndef FACTOR_
AUTODIFF_
DISTANCE_3d_H_
#ifndef FACTOR_DISTANCE_3d_H_
#define FACTOR_
AUTODIFF_
DISTANCE_3d_H_
#define FACTOR_DISTANCE_3d_H_
#include
"core/factor/factor_autodiff.h"
#include
"core/factor/factor_autodiff.h"
namespace
wolf
namespace
wolf
{
{
WOLF_PTR_TYPEDEFS
(
Factor
Autodiff
Distance3d
);
WOLF_PTR_TYPEDEFS
(
FactorDistance3d
);
class
Factor
Autodiff
Distance3d
:
public
FactorAutodiff
<
Factor
Autodiff
Distance3d
,
1
,
3
,
3
>
class
FactorDistance3d
:
public
FactorAutodiff
<
FactorDistance3d
,
1
,
3
,
3
>
{
{
public:
public:
Factor
Autodiff
Distance3d
(
const
FeatureBasePtr
&
_feat
,
FactorDistance3d
(
const
FeatureBasePtr
&
_feat
,
const
FrameBasePtr
&
_frm_other
,
const
FrameBasePtr
&
_frm_other
,
const
ProcessorBasePtr
&
_processor_ptr
,
const
ProcessorBasePtr
&
_processor_ptr
,
bool
_apply_loss_function
,
bool
_apply_loss_function
,
...
@@ -37,7 +37,7 @@ class FactorAutodiffDistance3d : public FactorAutodiff<FactorAutodiffDistance3d,
...
@@ -37,7 +37,7 @@ class FactorAutodiffDistance3d : public FactorAutodiff<FactorAutodiffDistance3d,
{
{
}
}
~
Factor
Autodiff
Distance3d
()
override
{
/* nothing */
}
~
FactorDistance3d
()
override
{
/* nothing */
}
std
::
string
getTopology
()
const
override
std
::
string
getTopology
()
const
override
{
{
...
@@ -74,4 +74,4 @@ class FactorAutodiffDistance3d : public FactorAutodiff<FactorAutodiffDistance3d,
...
@@ -74,4 +74,4 @@ class FactorAutodiffDistance3d : public FactorAutodiff<FactorAutodiffDistance3d,
}
/* namespace wolf */
}
/* namespace wolf */
#endif
/* FACTOR_
AUTODIFF_
DISTANCE_3d_H_ */
#endif
/* FACTOR_DISTANCE_3d_H_ */
This diff is collapsed.
Click to expand it.
test/gtest_factor_autodiff_distance_3d.cpp
+
5
−
5
View file @
ccc7e345
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
* \author: jsola
* \author: jsola
*/
*/
#include
<core/factor/factor_distance_3d.h>
#include
"../include/core/ceres_wrapper/solver_ceres.h"
#include
"../include/core/ceres_wrapper/solver_ceres.h"
#include
"core/factor/factor_autodiff_distance_3d.h"
#include
"core/problem/problem.h"
#include
"core/problem/problem.h"
#include
"core/math/rotations.h"
#include
"core/math/rotations.h"
...
@@ -28,7 +28,7 @@ class FactorAutodiffDistance3d_Test : public testing::Test
...
@@ -28,7 +28,7 @@ class FactorAutodiffDistance3d_Test : public testing::Test
FrameBasePtr
F1
,
F2
;
FrameBasePtr
F1
,
F2
;
CaptureBasePtr
C2
;
CaptureBasePtr
C2
;
FeatureBasePtr
f2
;
FeatureBasePtr
f2
;
Factor
Autodiff
Distance3dPtr
c2
;
FactorDistance3dPtr
c2
;
Vector1d
dist
;
Vector1d
dist
;
Matrix1d
dist_cov
;
Matrix1d
dist_cov
;
...
@@ -68,7 +68,7 @@ TEST_F(FactorAutodiffDistance3d_Test, ground_truth)
...
@@ -68,7 +68,7 @@ TEST_F(FactorAutodiffDistance3d_Test, ground_truth)
double
res
;
double
res
;
f2
=
FeatureBase
::
emplace
<
FeatureBase
>
(
C2
,
"Dist"
,
dist
,
dist_cov
);
f2
=
FeatureBase
::
emplace
<
FeatureBase
>
(
C2
,
"Dist"
,
dist
,
dist_cov
);
c2
=
FactorBase
::
emplace
<
Factor
Autodiff
Distance3d
>
(
f2
,
f2
,
F1
,
nullptr
,
false
,
FAC_ACTIVE
);
c2
=
FactorBase
::
emplace
<
FactorDistance3d
>
(
f2
,
f2
,
F1
,
nullptr
,
false
,
FAC_ACTIVE
);
c2
->
operator
()(
pos1
.
data
(),
pos2
.
data
(),
&
res
);
c2
->
operator
()(
pos1
.
data
(),
pos2
.
data
(),
&
res
);
ASSERT_NEAR
(
res
,
0.0
,
1e-5
);
ASSERT_NEAR
(
res
,
0.0
,
1e-5
);
...
@@ -79,7 +79,7 @@ TEST_F(FactorAutodiffDistance3d_Test, expected_residual)
...
@@ -79,7 +79,7 @@ TEST_F(FactorAutodiffDistance3d_Test, expected_residual)
double
measurement
=
1.400
;
double
measurement
=
1.400
;
f2
=
FeatureBase
::
emplace
<
FeatureBase
>
(
C2
,
"Dist"
,
Vector1d
(
measurement
),
dist_cov
);
f2
=
FeatureBase
::
emplace
<
FeatureBase
>
(
C2
,
"Dist"
,
Vector1d
(
measurement
),
dist_cov
);
c2
=
FactorBase
::
emplace
<
Factor
Autodiff
Distance3d
>
(
f2
,
f2
,
F1
,
nullptr
,
false
,
FAC_ACTIVE
);
c2
=
FactorBase
::
emplace
<
FactorDistance3d
>
(
f2
,
f2
,
F1
,
nullptr
,
false
,
FAC_ACTIVE
);
double
res_expected
=
(
measurement
-
(
pos2
-
pos1
).
norm
())
*
c2
->
getMeasurementSquareRootInformationUpper
()(
0
,
0
);
double
res_expected
=
(
measurement
-
(
pos2
-
pos1
).
norm
())
*
c2
->
getMeasurementSquareRootInformationUpper
()(
0
,
0
);
...
@@ -94,7 +94,7 @@ TEST_F(FactorAutodiffDistance3d_Test, solve)
...
@@ -94,7 +94,7 @@ TEST_F(FactorAutodiffDistance3d_Test, solve)
double
measurement
=
1.400
;
double
measurement
=
1.400
;
f2
=
FeatureBase
::
emplace
<
FeatureBase
>
(
C2
,
"Dist"
,
Vector1d
(
measurement
),
dist_cov
);
f2
=
FeatureBase
::
emplace
<
FeatureBase
>
(
C2
,
"Dist"
,
Vector1d
(
measurement
),
dist_cov
);
c2
=
FactorBase
::
emplace
<
Factor
Autodiff
Distance3d
>
(
f2
,
f2
,
F1
,
nullptr
,
false
,
FAC_ACTIVE
);
c2
=
FactorBase
::
emplace
<
FactorDistance3d
>
(
f2
,
f2
,
F1
,
nullptr
,
false
,
FAC_ACTIVE
);
std
::
string
report
=
solver
->
solve
(
SolverManager
::
ReportVerbosity
::
QUIET
);
std
::
string
report
=
solver
->
solve
(
SolverManager
::
ReportVerbosity
::
QUIET
);
...
...
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