Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
laser
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
laser
Commits
b9d39987
Commit
b9d39987
authored
2 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Use more KFs in gtest
parent
ae25ee89
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!41
Draft: Resolve "New branch laser 3d"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/gtest_processor_odom_icp_3d.cpp
+26
-13
26 additions, 13 deletions
test/gtest_processor_odom_icp_3d.cpp
with
26 additions
and
13 deletions
test/gtest_processor_odom_icp_3d.cpp
+
26
−
13
View file @
b9d39987
...
@@ -64,7 +64,7 @@ class Test_ProcessorOdomIcp3D_yaml : public testing::Test
...
@@ -64,7 +64,7 @@ class Test_ProcessorOdomIcp3D_yaml : public testing::Test
SensorLaser3dPtr
S
;
SensorLaser3dPtr
S
;
ProcessorOdomIcp3dPtr
p
;
ProcessorOdomIcp3dPtr
p
;
FrameBasePtr
F0
,
F1
,
F
;
FrameBasePtr
F0
,
F1
,
F
;
CaptureLaser3dPtr
C0
,
C1
,
C2
;
CaptureLaser3dPtr
C0
,
C1
,
C2
,
C3
;
VectorXd
data
;
VectorXd
data
;
MatrixXd
data_cov
;
MatrixXd
data_cov
;
...
@@ -137,31 +137,44 @@ AutoConfFactoryProcessor::registerCreator("ProcessorOdomIcp3d", ProcessorOdomIcp
...
@@ -137,31 +137,44 @@ AutoConfFactoryProcessor::registerCreator("ProcessorOdomIcp3d", ProcessorOdomIcp
}
}
TEST_F
(
Test_ProcessorOdomIcp3D_yaml
,
construct
or
)
TEST_F
(
Test_ProcessorOdomIcp3D_yaml
,
align_known_transf
or
m
)
{
{
// Load data
// Load data
pcl
::
PointCloud
<
pcl
::
PointXYZ
>::
Ptr
pcl_ref
1
=
pcl
::
make_shared
<
pcl
::
PointCloud
<
pcl
::
PointXYZ
>>
();
pcl
::
PointCloud
<
pcl
::
PointXYZ
>::
Ptr
pcl_ref
0
=
pcl
::
make_shared
<
pcl
::
PointCloud
<
pcl
::
PointXYZ
>>
();
loadData
(
laser_root_dir
+
"/test/data/1.pcd"
,
*
pcl_ref
1
);
loadData
(
laser_root_dir
+
"/test/data/1.pcd"
,
*
pcl_ref
0
);
C0
=
std
::
make_shared
<
CaptureLaser3d
>
(
0.0
,
S
,
pcl_ref
1
);
C0
=
std
::
make_shared
<
CaptureLaser3d
>
(
0.0
,
S
,
pcl_ref
0
);
C0
->
process
();
C0
->
process
();
P
->
print
(
4
,
1
,
1
,
1
);
VectorComposite
x0
=
P
->
getState
();
// Load data
pcl
::
PointCloud
<
pcl
::
PointXYZ
>::
Ptr
pcl_ref1
=
pcl
::
make_shared
<
pcl
::
PointCloud
<
pcl
::
PointXYZ
>>
();
loadData
(
laser_root_dir
+
"/test/data/2.pcd"
,
*
pcl_ref1
);
C1
=
std
::
make_shared
<
CaptureLaser3d
>
(
1.0
,
S
,
pcl_ref1
);
C1
->
process
();
VectorComposite
x1
=
P
->
getState
();
// Load data
// Load data
pcl
::
PointCloud
<
pcl
::
PointXYZ
>::
Ptr
pcl_ref2
=
pcl
::
make_shared
<
pcl
::
PointCloud
<
pcl
::
PointXYZ
>>
();
pcl
::
PointCloud
<
pcl
::
PointXYZ
>::
Ptr
pcl_ref2
=
pcl
::
make_shared
<
pcl
::
PointCloud
<
pcl
::
PointXYZ
>>
();
loadData
(
laser_root_dir
+
"/test/data/2.pcd"
,
*
pcl_ref2
);
loadData
(
laser_root_dir
+
"/test/data/2.pcd"
,
*
pcl_ref2
);
C1
=
std
::
make_shared
<
CaptureLaser3d
>
(
1.0
,
S
,
pcl_ref2
);
C2
=
std
::
make_shared
<
CaptureLaser3d
>
(
2.0
,
S
,
pcl_ref2
);
C1
->
process
();
C2
->
process
();
P
->
print
(
4
,
1
,
1
,
1
);
VectorComposite
x2
=
P
->
getState
();
// Load data
// Load data
pcl
::
PointCloud
<
pcl
::
PointXYZ
>::
Ptr
pcl_ref3
=
pcl
::
make_shared
<
pcl
::
PointCloud
<
pcl
::
PointXYZ
>>
();
pcl
::
PointCloud
<
pcl
::
PointXYZ
>::
Ptr
pcl_ref3
=
pcl
::
make_shared
<
pcl
::
PointCloud
<
pcl
::
PointXYZ
>>
();
loadData
(
laser_root_dir
+
"/test/data/2.pcd"
,
*
pcl_ref3
);
loadData
(
laser_root_dir
+
"/test/data/2.pcd"
,
*
pcl_ref3
);
C2
=
std
::
make_shared
<
CaptureLaser3d
>
(
2.0
,
S
,
pcl_ref3
);
C3
=
std
::
make_shared
<
CaptureLaser3d
>
(
3.0
,
S
,
pcl_ref3
);
C2
->
process
();
C3
->
process
();
P
->
print
(
4
,
1
,
1
,
1
);
VectorComposite
x3
=
P
->
getState
();
ASSERT_MATRIX_APPROX
(
x1
.
vector
(
"PO"
),
x2
.
vector
(
"PO"
),
1e-8
);
// pointclouds 1 and 2 are the same
ASSERT_MATRIX_APPROX
(
x2
.
vector
(
"PO"
),
x3
.
vector
(
"PO"
),
1e-8
);
// pointclouds 2 and 3 are the same
P
->
print
(
4
,
1
,
1
,
1
);
}
}
// // Test to see if the constructor works (not yaml files)
// // Test to see if the constructor works (not yaml files)
...
...
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