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
37299a3c
Commit
37299a3c
authored
2 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Add (loose) asserts to pass tests
parent
fb4d8183
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_simulation_problem_force_torque_inertial_dynamics.cpp
+10
-0
10 additions, 0 deletions
...est_simulation_problem_force_torque_inertial_dynamics.cpp
with
10 additions
and
0 deletions
test/gtest_simulation_problem_force_torque_inertial_dynamics.cpp
+
10
−
0
View file @
37299a3c
...
...
@@ -453,6 +453,11 @@ TEST_F(Test_SimulationProblemForceTorqueInertialDynamics_yaml, simulation_online
WOLF_INFO
(
"Guess mass : "
,
mass_guess
,
" Kg."
);
WOLF_INFO
(
"Estimated mass : "
,
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
),
" Kg."
);
WOLF_INFO
(
"-----------------------------"
);
ASSERT_MATRIX_APPROX
(
bias_true
,
S
->
getStateBlock
(
'I'
)
->
getState
(),
0.11
);
ASSERT_MATRIX_APPROX
(
cdm_true
,
S
->
getStateBlock
(
'C'
)
->
getState
(),
1e-3
);
ASSERT_MATRIX_APPROX
(
inertia_true
,
S
->
getStateBlock
(
'i'
)
->
getState
(),
1e-2
);
ASSERT_NEAR
(
mass_true
,
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
),
2e-2
);
}
TEST_F
(
Test_SimulationProblemForceTorqueInertialDynamics_yaml
,
simulation_batch
)
...
...
@@ -556,6 +561,11 @@ TEST_F(Test_SimulationProblemForceTorqueInertialDynamics_yaml, simulation_batch)
WOLF_INFO
(
"Guess mass : "
,
mass_guess
,
" Kg."
);
WOLF_INFO
(
"Estimated mass : "
,
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
),
" Kg."
);
WOLF_INFO
(
"-----------------------------"
);
ASSERT_MATRIX_APPROX
(
bias_true
,
S
->
getStateBlock
(
'I'
)
->
getState
(),
0.21
);
ASSERT_MATRIX_APPROX
(
cdm_true
,
S
->
getStateBlock
(
'C'
)
->
getState
(),
2e-3
);
ASSERT_MATRIX_APPROX
(
inertia_true
,
S
->
getStateBlock
(
'i'
)
->
getState
(),
1e-2
);
ASSERT_NEAR
(
mass_true
,
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
),
3e-2
);
}
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