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
185428e4
Commit
185428e4
authored
2 years ago
by
Víctor Sainz Ubide
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
4cc2ccb6
No related branches found
No related tags found
1 merge request
!41
Draft: Resolve "New branch laser 3d"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/CMakeLists.txt
+1
-0
1 addition, 0 deletions
test/CMakeLists.txt
test/gtest_processor_odom_icp_3d.cpp
+15
-9
15 additions, 9 deletions
test/gtest_processor_odom_icp_3d.cpp
test/yaml/processor_odom_icp_3d.yaml
+34
-0
34 additions, 0 deletions
test/yaml/processor_odom_icp_3d.yaml
with
50 additions
and
9 deletions
test/CMakeLists.txt
+
1
−
0
View file @
185428e4
...
@@ -27,4 +27,5 @@ endif(falkolib_FOUND)
...
@@ -27,4 +27,5 @@ endif(falkolib_FOUND)
if
(
PCL_FOUND
)
if
(
PCL_FOUND
)
wolf_add_gtest
(
gtest_laser3d_tools gtest_laser3d_tools.cpp
)
wolf_add_gtest
(
gtest_laser3d_tools gtest_laser3d_tools.cpp
)
wolf_add_gtest
(
gtest_processor_odom_icp_3d gtest_processor_odom_icp_3d.cpp
)
endif
(
PCL_FOUND
)
endif
(
PCL_FOUND
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test/gtest_processor_odom_icp_3d.cpp
+
15
−
9
View file @
185428e4
// wolf
// wolf
#include
"laser/processor/processor_odom_icp_3d.h"
#include
"laser/processor/processor_odom_icp_3d.h"
#include
"core/processor/factory_processor.h"
#include
"core/processor/factory_processor.h"
#include
"core/common/wolf.h"
// wolf yaml
// wolf yaml
#include
<core/utils/params_server.h>
#include
<core/utils/params_server.h>
...
@@ -16,16 +17,16 @@ using namespace laser;
...
@@ -16,16 +17,16 @@ using namespace laser;
WOLF_REGISTER_STATEBLOCK_WITH_KEY
(
L
,
StateVector3d
);
WOLF_REGISTER_STATEBLOCK_WITH_KEY
(
L
,
StateVector3d
);
class
Test_
FactorForceTorqueInertialDynamics
_yaml
:
public
testing
::
Test
class
Test_
ProcessorOdomIcp3D
_yaml
:
public
testing
::
Test
{
{
public:
public:
ProblemPtr
P
;
ProblemPtr
P
;
SensorLaser3dPtr
S
;
SensorLaser3dPtr
S
;
ProcessorOdomIcp3dPtr
p
;
ProcessorOdomIcp3dPtr
p
;
FrameBasePtr
F0
,
F1
,
F
;
FrameBasePtr
F0
,
F1
,
F
;
CaptureLaser3dPtr
C0
,
C1
,
C
;
CaptureLaser3dPtr
C0
,
C1
,
C
2
;
FeatureBasePtr
f1
;
FeatureBasePtr
f1
,
f2
,
f3
;
FactorBasePtr
c1
;
FactorBasePtr
c1
,
c2
;
VectorXd
data
;
VectorXd
data
;
MatrixXd
data_cov
;
MatrixXd
data_cov
;
...
@@ -37,14 +38,18 @@ class Test_FactorForceTorqueInertialDynamics_yaml : public testing::Test
...
@@ -37,14 +38,18 @@ class Test_FactorForceTorqueInertialDynamics_yaml : public testing::Test
protected:
protected:
void
SetUp
()
override
void
SetUp
()
override
{
{
std
::
string
wolf_root
=
_WOLF_BODYDYNAMICS_ROOT_DIR
;
std
::
string
laser_root_dir
=
_WOLF_LASER_ROOT_DIR
;
ParserYaml
parser
=
ParserYaml
(
"processor_odom_icp_3d.yaml"
,
wolf_root
+
"/test/yaml/"
);
ParserYaml
parser
=
ParserYaml
(
"processor_odom_icp_3d.yaml"
,
laser_root_dir
+
"/test/yaml/"
);
ParamsServer
server
=
ParamsServer
(
parser
.
getParams
());
ParamsServer
server
=
ParamsServer
(
parser
.
getParams
());
P
=
Problem
::
autoSetup
(
server
);
P
=
Problem
::
autoSetup
(
server
);
S
=
std
::
static_pointer_cast
<
SensorForceTorqueInertial
>
(
P
->
getHardware
()
->
getSensorList
().
front
());
S
=
std
::
static_pointer_cast
<
SensorLaser3d
>
(
P
->
getHardware
()
->
getSensorList
().
front
());
p
=
std
::
static_pointer_cast
<
ProcessorForceTorqueInertialPreintDynamics
>
(
S
->
getProcessorList
().
front
());
p
=
std
::
static_pointer_cast
<
ProcessorOdomIcp3d
>
(
S
->
getProcessorList
().
front
());
P
->
print
(
4
,
1
,
1
,
1
);
/*
data = VectorXd::Zero(12); // [ a, w, f, t ]
data = VectorXd::Zero(12); // [ a, w, f, t ]
data_cov = MatrixXd::Identity(12, 12);
data_cov = MatrixXd::Identity(12, 12);
C = std::make_shared<CaptureMotion>("CaptureMotion", 0.0, S, data, data_cov, nullptr);
C = std::make_shared<CaptureMotion>("CaptureMotion", 0.0, S, data, data_cov, nullptr);
...
@@ -83,10 +88,11 @@ class Test_FactorForceTorqueInertialDynamics_yaml : public testing::Test
...
@@ -83,10 +88,11 @@ class Test_FactorForceTorqueInertialDynamics_yaml : public testing::Test
F1->getStateBlock('V')->setState(Vector3d(0, 0, 0));
F1->getStateBlock('V')->setState(Vector3d(0, 0, 0));
F1->getStateBlock('O')->setState(Vector4d(0, 0, 0, 1));
F1->getStateBlock('O')->setState(Vector4d(0, 0, 0, 1));
F1->getStateBlock('L')->setState(Vector3d(0, 0, 0));
F1->getStateBlock('L')->setState(Vector3d(0, 0, 0));
*/
}
}
};
};
class
Test_
FactorForceTorqueInertialDynamics
:
public
testing
::
Test
class
Test_
ProcessorOdomIcp3D
:
public
testing
::
Test
{
{
public:
public:
ProblemPtr
P
;
ProblemPtr
P
;
...
...
This diff is collapsed.
Click to expand it.
test/yaml/processor_odom_icp_3d.yaml
+
34
−
0
View file @
185428e4
config
:
problem
:
frame_structure
:
"
PO"
dimension
:
3
prior
:
mode
:
"
factor"
$state
:
P
:
[
0
,
0
,
0
]
O
:
[
0
,
0
,
0
,
1
]
time_tolerance
:
0.05
tree_manager
:
type
:
"
None"
map
:
type
:
"
MapBase"
plugin
:
"
core"
sensors
:
-
name
:
"
Lidar"
type
:
"
SensorLaser3d"
# No
plugin
:
"
laser"
extrinsic
:
pose
:
[
0.5
,
0
,
0
,
0
,
0
,
0
,
1
]
processors
:
-
name
:
"
Odometry
ICP
3d"
type
:
"
ProcessorOdomIcp3d"
sensor_name
:
"
Lidar"
plugin
:
"
laser"
time_tolerance
:
0.05
icp_max_iterations
:
20
icp_transformation_rotation_epsilon
:
0.99
icp_transformation_translation_epsilon
:
1e-6
icp_max_correspondence_distance
:
0.5
\ No newline at end of file
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