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
4392a2f3
Commit
4392a2f3
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Fix bugs after conflicting merge
parent
181c3e16
No related branches found
No related tags found
1 merge request
!362
WIP: Resolve "std::set and std::map instead of std::list in wolf nodes"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/gtest_processor_motion.cpp
+4
-1
4 additions, 1 deletion
test/gtest_processor_motion.cpp
test/gtest_trajectory.cpp
+6
-6
6 additions, 6 deletions
test/gtest_trajectory.cpp
with
10 additions
and
7 deletions
test/gtest_processor_motion.cpp
+
4
−
1
View file @
4392a2f3
...
@@ -63,7 +63,7 @@ class ProcessorMotion_test : public testing::Test{
...
@@ -63,7 +63,7 @@ class ProcessorMotion_test : public testing::Test{
problem
=
Problem
::
create
(
"PO"
,
2
);
problem
=
Problem
::
create
(
"PO"
,
2
);
sensor
=
static_pointer_cast
<
SensorOdom2d
>
(
problem
->
installSensor
(
"SensorOdom2d"
,
"odom"
,
Vector3d
(
0
,
0
,
0
),
wolf_root
+
"/test/yaml/sensor_odom_2d.yaml"
));
sensor
=
static_pointer_cast
<
SensorOdom2d
>
(
problem
->
installSensor
(
"SensorOdom2d"
,
"odom"
,
Vector3d
(
0
,
0
,
0
),
wolf_root
+
"/test/yaml/sensor_odom_2d.yaml"
));
ParamsProcessorOdom2dPtr
params
(
std
::
make_shared
<
ParamsProcessorOdom2d
>
());
ParamsProcessorOdom2dPtr
params
(
std
::
make_shared
<
ParamsProcessorOdom2d
>
());
params
->
time_tolerance
=
0.
2
5
;
params
->
time_tolerance
=
0.5
;
params
->
dist_traveled
=
100
;
params
->
dist_traveled
=
100
;
params
->
angle_turned
=
6.28
;
params
->
angle_turned
=
6.28
;
params
->
max_time_span
=
2.5
*
dt
;
// force KF at every third process()
params
->
max_time_span
=
2.5
*
dt
;
// force KF at every third process()
...
@@ -146,10 +146,13 @@ TEST_F(ProcessorMotion_test, getState_time_structure)
...
@@ -146,10 +146,13 @@ TEST_F(ProcessorMotion_test, getState_time_structure)
capture
->
setTimeStamp
(
t
);
capture
->
setTimeStamp
(
t
);
capture
->
setData
(
data
);
capture
->
setData
(
data
);
capture
->
setDataCovariance
(
data_cov
);
capture
->
setDataCovariance
(
data_cov
);
// capture->process();
processor
->
captureCallback
(
capture
);
processor
->
captureCallback
(
capture
);
WOLF_DEBUG
(
"t: "
,
t
,
" x: "
,
problem
->
getState
().
vector
(
"PO"
).
transpose
());
WOLF_DEBUG
(
"t: "
,
t
,
" x: "
,
problem
->
getState
().
vector
(
"PO"
).
transpose
());
}
}
problem
->
print
(
2
,
1
,
1
,
1
);
ASSERT_TRUE
(
processor
->
getState
(
7
,
"P"
).
count
(
'P'
));
ASSERT_TRUE
(
processor
->
getState
(
7
,
"P"
).
count
(
'P'
));
ASSERT_FALSE
(
processor
->
getState
(
7
,
"P"
).
count
(
'O'
));
ASSERT_FALSE
(
processor
->
getState
(
7
,
"P"
).
count
(
'O'
));
ASSERT_FALSE
(
processor
->
getState
(
7
,
"O"
).
count
(
'P'
));
ASSERT_FALSE
(
processor
->
getState
(
7
,
"O"
).
count
(
'P'
));
...
...
This diff is collapsed.
Click to expand it.
test/gtest_trajectory.cpp
+
6
−
6
View file @
4392a2f3
...
@@ -36,11 +36,11 @@ TEST(TrajectoryBase, ClosestKeyFrame)
...
@@ -36,11 +36,11 @@ TEST(TrajectoryBase, ClosestKeyFrame)
FrameBasePtr
F2
=
P
->
emplaceKeyFrame
(
2
,
Eigen
::
Vector3d
::
Zero
()
);
FrameBasePtr
F2
=
P
->
emplaceKeyFrame
(
2
,
Eigen
::
Vector3d
::
Zero
()
);
// FrameBasePtr F3 = P->emplaceFrame(AUXILIARY, 3, Eigen::Vector3d::Zero() );
// FrameBasePtr F3 = P->emplaceFrame(AUXILIARY, 3, Eigen::Vector3d::Zero() );
FrameBasePtr
F3
=
FrameBase
::
createNonKeyFrame
<
FrameBase
>
(
3
,
P
->
getFrameStructure
(),
FrameBasePtr
F3
=
FrameBase
::
createNonKeyFrame
<
FrameBase
>
(
3
,
P
->
getFrameStructure
(),
P
->
getDim
(),
//
P->getDim(),
Eigen
::
Vector3
d
::
Zero
()
);
std
::
list
<
VectorXd
>
({
Eigen
::
Vector2d
::
Zero
(),
Eigen
::
Vector1
d
::
Zero
()
})
);
FrameBasePtr
F4
=
FrameBase
::
createNonKeyFrame
<
FrameBase
>
(
4
,
P
->
getFrameStructure
(),
FrameBasePtr
F4
=
FrameBase
::
createNonKeyFrame
<
FrameBase
>
(
4
,
P
->
getFrameStructure
(),
P
->
getDim
(),
//
P->getDim(),
Eigen
::
Vector3
d
::
Zero
()
);
std
::
list
<
VectorXd
>
({
Eigen
::
Vector2d
::
Zero
(),
Eigen
::
Vector1
d
::
Zero
()
})
);
FrameBasePtr
KF
;
// closest key-frame queried
FrameBasePtr
KF
;
// closest key-frame queried
...
@@ -95,8 +95,8 @@ TEST(TrajectoryBase, Add_Remove_Frame)
...
@@ -95,8 +95,8 @@ TEST(TrajectoryBase, Add_Remove_Frame)
// add F3
// add F3
FrameBasePtr
F3
=
FrameBase
::
createNonKeyFrame
<
FrameBase
>
(
3
,
P
->
getFrameStructure
(),
FrameBasePtr
F3
=
FrameBase
::
createNonKeyFrame
<
FrameBase
>
(
3
,
P
->
getFrameStructure
(),
P
->
getDim
(),
//
P->getDim(),
Eigen
::
Vector3
d
::
Zero
());
std
::
list
<
VectorXd
>
({
Eigen
::
Vector2d
::
Zero
(),
Eigen
::
Vector1
d
::
Zero
()
})
);
if
(
debug
)
P
->
print
(
2
,
0
,
0
,
0
);
if
(
debug
)
P
->
print
(
2
,
0
,
0
,
0
);
ASSERT_EQ
(
T
->
getFrameList
().
size
(),
(
SizeStd
)
2
);
ASSERT_EQ
(
T
->
getFrameList
().
size
(),
(
SizeStd
)
2
);
ASSERT_EQ
(
P
->
getStateBlockNotificationMapSize
(),
(
SizeStd
)
4
);
ASSERT_EQ
(
P
->
getStateBlockNotificationMapSize
(),
(
SizeStd
)
4
);
...
...
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