Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bodydynamics
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
bodydynamics
Commits
baa6b127
Commit
baa6b127
authored
2 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
add asserts and pass
parent
c818341e
No related branches found
No related tags found
2 merge requests
!31
devel->main
,
!30
Complete UAV identification setup
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/gtest_solve_problem_force_torque_inertial_dynamics.cpp
+21
-16
21 additions, 16 deletions
test/gtest_solve_problem_force_torque_inertial_dynamics.cpp
with
21 additions
and
16 deletions
test/gtest_solve_problem_force_torque_inertial_dynamics.cpp
+
21
−
16
View file @
baa6b127
...
...
@@ -764,33 +764,38 @@ TEST_F(Test_SolveProblemForceTorqueInertialDynamics_yaml, rotation_test_unfixing
report
=
solver
->
solve
(
wolf
::
SolverManager
::
ReportVerbosity
::
FULL
);
WOLF_INFO
(
"Total angle turned: "
,
angle_true
.
transpose
(),
" rad."
);
WOLF_INFO
(
"Estimated IMU bias: "
,
S
->
getStateBlock
(
'I'
)
->
getState
().
transpose
(),
" m/s2 | rad/s."
);
WOLF_INFO
(
"Total angle turned
: "
,
angle_true
.
transpose
(),
" rad."
);
WOLF_INFO
(
"Estimated IMU bias
: "
,
S
->
getStateBlock
(
'I'
)
->
getState
().
transpose
(),
" m/s2 | rad/s."
);
WOLF_INFO
(
"Estimated center of mass: "
,
S
->
getStateBlock
(
'C'
)
->
getState
().
transpose
(),
" m."
);
WOLF_INFO
(
"Estimated inertia: "
,
S
->
getStateBlock
(
'i'
)
->
getState
().
transpose
(),
" m^2 Kg."
);
WOLF_INFO
(
"Estimated mass: "
,
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
),
" Kg."
);
WOLF_INFO
(
"Estimated inertia
: "
,
S
->
getStateBlock
(
'i'
)
->
getState
().
transpose
(),
" m^2 Kg."
);
WOLF_INFO
(
"Estimated mass
: "
,
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
),
" Kg."
);
WOLF_INFO
(
"-----------------------------"
);
}
}
WOLF_INFO
(
"True IMU bias : "
,
bias_true
.
transpose
(),
" m/s2 | rad/s."
);
WOLF_INFO
(
"Guess IMU bias : "
,
bias_guess
.
transpose
(),
" m/s2 | rad/s."
);
WOLF_INFO
(
"Estimated IMU bias: "
,
S
->
getStateBlock
(
'I'
)
->
getState
().
transpose
(),
" m/s2 | rad/s."
);
WOLF_INFO
(
"True IMU bias
: "
,
bias_true
.
transpose
(),
" m/s2 | rad/s."
);
WOLF_INFO
(
"Guess IMU bias
: "
,
bias_guess
.
transpose
(),
" m/s2 | rad/s."
);
WOLF_INFO
(
"Estimated IMU bias
: "
,
S
->
getStateBlock
(
'I'
)
->
getState
().
transpose
(),
" m/s2 | rad/s."
);
WOLF_INFO
(
"True center of mass : "
,
cdm_true
.
transpose
(),
" m."
);
WOLF_INFO
(
"Guess center of mass : "
,
cdm_guess
.
transpose
(),
" m."
);
WOLF_INFO
(
"Estimated cneter of mass: "
,
S
->
getStateBlock
(
'C'
)
->
getState
().
transpose
(),
" m."
);
WOLF_INFO
(
"True inertia : "
,
inertia_true
.
transpose
(),
" m^2 Kg."
);
WOLF_INFO
(
"Guess inertia : "
,
inertia_guess
.
transpose
(),
" m^2 Kg."
);
WOLF_INFO
(
"Estimated inertia: "
,
S
->
getStateBlock
(
'i'
)
->
getState
().
transpose
(),
" m^2 Kg."
);
WOLF_INFO
(
"True mass : "
,
mass_true
,
" Kg."
);
WOLF_INFO
(
"Guess mass : "
,
mass_guess
,
" Kg."
);
WOLF_INFO
(
"Estimated mass: "
,
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
),
" Kg."
);
WOLF_INFO
(
"True inertia
: "
,
inertia_true
.
transpose
(),
" m^2 Kg."
);
WOLF_INFO
(
"Guess inertia
: "
,
inertia_guess
.
transpose
(),
" m^2 Kg."
);
WOLF_INFO
(
"Estimated inertia
: "
,
S
->
getStateBlock
(
'i'
)
->
getState
().
transpose
(),
" m^2 Kg."
);
WOLF_INFO
(
"True mass
: "
,
mass_true
,
" Kg."
);
WOLF_INFO
(
"Guess mass
: "
,
mass_guess
,
" Kg."
);
WOLF_INFO
(
"Estimated mass
: "
,
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
),
" Kg."
);
WOLF_INFO
(
"-----------------------------"
);
// P->print(2,1,1,1
);
auto
bias_estimated
=
S
->
getStateBlock
(
'I'
)
->
getState
(
);
auto
cdm_estimated
=
S
->
getStateBlock
(
'C'
)
->
getState
();
auto
inertia_estimated
=
S
->
getStateBlock
(
'i'
)
->
getState
();
ASSERT_NEAR
(
inertia_estimated
(
2
),
inertia_true
(
2
),
1e-6
);
auto
mass_estimated
=
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
);
ASSERT_MATRIX_APPROX
(
bias_estimated
,
bias_true
,
1e-4
);
ASSERT_MATRIX_APPROX
(
cdm_estimated
.
head
(
2
),
cdm_true
.
head
(
2
),
1e-6
);
// cdm_z is not observable while hovering
ASSERT_NEAR
(
inertia_estimated
(
2
),
inertia_true
(
2
),
1e-6
);
// Ix and Iy not observable in this test
ASSERT_NEAR
(
mass_estimated
,
mass_true
,
1e-5
);
}
int
main
(
int
argc
,
char
**
argv
)
...
...
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