Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mobile_robotics
wolf_projects
wolf_lib
plugins
apriltag
Commits
a6e9948f
Commit
a6e9948f
authored
Jun 23, 2022
by
mederic_fourmy
Browse files
Change the order of FactorApriltagProj arguments
parent
4e83e7e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/apriltag/factor/factor_apriltag_proj.h
View file @
a6e9948f
...
...
@@ -48,13 +48,13 @@ class FactorApriltagProj : public FactorAutodiff<FactorApriltagProj, 8, 3, 4, 3,
/** \brief Class constructor
*/
FactorApriltagProj
(
const
FeatureApriltagProjPtr
&
_feature_ptr
,
const
SensorBasePtr
&
_sensor_ptr
,
const
FrameBasePtr
&
_frame_ptr
,
const
LandmarkBasePtr
&
_landmark_other_ptr
,
const
FeatureApriltagProjPtr
&
_feature_ptr
,
const
ProcessorBasePtr
&
_processor_ptr
,
bool
_apply_loss_function
,
FactorStatus
_status
);
FactorStatus
_status
=
FAC_ACTIVE
);
/** \brief Class Destructor
*/
...
...
@@ -110,10 +110,10 @@ namespace wolf
{
inline
FactorApriltagProj
::
FactorApriltagProj
(
const
FeatureApriltagProjPtr
&
_feature_ptr
,
const
SensorBasePtr
&
_sensor_ptr
,
const
FrameBasePtr
&
_frame_ptr
,
const
LandmarkBasePtr
&
_landmark_other_ptr
,
const
FeatureApriltagProjPtr
&
_feature_ptr
,
const
ProcessorBasePtr
&
_processor_ptr
,
bool
_apply_loss_function
,
FactorStatus
_status
)
:
...
...
test/gtest_factor_apriltag_proj.cpp
View file @
a6e9948f
...
...
@@ -237,13 +237,12 @@ TEST_F(FactorApriltagProj_class, Constructor)
{
f1
=
std
::
static_pointer_cast
<
FeatureApriltagProj
>
(
FeatureBase
::
emplace
<
FeatureApriltagProj
>
(
C1
,
meas1
,
meas_cov
,
1
,
tag_width
));
FactorApriltagProjPtr
factor
=
std
::
make_shared
<
FactorApriltagProj
>
(
f1
,
camera
,
F1
,
lmk1
,
f1
,
nullptr
,
false
,
FAC_ACTIVE
false
);
ASSERT_TRUE
(
factor
->
getType
()
==
"FactorApriltagProj"
);
...
...
@@ -256,7 +255,7 @@ TEST_F(FactorApriltagProj_class, problem_1KF)
f1
=
std
::
static_pointer_cast
<
FeatureApriltagProj
>
(
FeatureBase
::
emplace
<
FeatureApriltagProj
>
(
C1
,
meas1
,
meas_cov
,
1
,
tag_width
));
//emplace feature and landmark
auto
factor
=
FactorBase
::
emplace
<
FactorApriltagProj
>
(
f1
,
camera
,
F1
,
lmk1
,
f1
,
nullptr
,
false
,
FAC_ACTIVE
);
auto
factor
=
FactorBase
::
emplace
<
FactorApriltagProj
>
(
f1
,
f1
,
camera
,
F1
,
lmk1
,
nullptr
,
false
);
ASSERT_TRUE
(
problem
->
check
(
0
));
...
...
@@ -294,8 +293,8 @@ TEST_F(FactorApriltagProj_class, problem_2KF)
auto
f2
=
std
::
static_pointer_cast
<
FeatureApriltagProj
>
(
FeatureBase
::
emplace
<
FeatureApriltagProj
>
(
C2
,
meas2
,
meas_cov
,
2
,
tag_width
));
//emplace feature and landmark
auto
factor1
=
FactorBase
::
emplace
<
FactorApriltagProj
>
(
f1
,
camera
,
F1
,
lmk1
,
f1
,
nullptr
,
false
,
FAC_ACTIVE
);
auto
factor2
=
FactorBase
::
emplace
<
FactorApriltagProj
>
(
f2
,
camera
,
F2
,
lmk1
,
f2
,
nullptr
,
false
,
FAC_ACTIVE
);
auto
factor1
=
FactorBase
::
emplace
<
FactorApriltagProj
>
(
f1
,
f1
,
camera
,
F1
,
lmk1
,
nullptr
,
false
);
auto
factor2
=
FactorBase
::
emplace
<
FactorApriltagProj
>
(
f2
,
f2
,
camera
,
F2
,
lmk1
,
nullptr
,
false
);
ASSERT_TRUE
(
problem
->
check
(
0
));
...
...
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