Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Absolute Encoder Calibration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Software
Absolute Encoder Calibration
Commits
7a9b7b8b
Commit
7a9b7b8b
authored
2 years ago
by
ARMAR-DE User
Browse files
Options
Downloads
Patches
Plain Diff
tests: Additional unit test exemplarily for Wri1 (L)
parent
fa048642
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#9240
passed
2 years ago
Stage: lint
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_calibration.py
+40
-0
40 additions, 0 deletions
tests/test_calibration.py
with
40 additions
and
0 deletions
tests/test_calibration.py
+
40
−
0
View file @
7a9b7b8b
...
...
@@ -351,6 +351,46 @@ def test_calibration_armar_de_elb2_l():
assert
abs
(
cvt_rad
-
util
.
degree_to_rad
(
180
))
<
util
.
degree_to_rad
(
9
)
# TODO: Tolerance way too high
def
test_calibration_armar_de_wri1_l
():
lo_lim_92
=
470086
lo_45
=
594240
zero
=
732608
hi_45
=
856752
hi_lim_92
=
1000644
joint
=
Calibration
(
name
=
"
Wri1_L
"
,
measured_limits_ticks
=
(
470086
,
1000644
),
measured_zero_ticks
=
732608
,
discontinuity_offset
=
"
0
"
,
joint_offset_degree
=
0
,
joint_limits_degree
=
(
-
91
,
91
),
method
=
"
hard_stop
"
,
**
ctx
)
zero_offset
=
joint
.
get_zero_offset
()
cvt_args
=
{
"
joint
"
:
joint
,
"
zero_offset
"
:
zero_offset
}
cvt_rad
=
util
.
convert_value
(
raw_value
=
lo_lim_92
,
**
cvt_args
)
assert
abs
(
cvt_rad
-
util
.
degree_to_rad
(
-
92
))
<
util
.
degree_to_rad
(
1
)
cvt_rad
=
util
.
convert_value
(
raw_value
=
lo_45
,
**
cvt_args
)
assert
abs
(
cvt_rad
-
util
.
degree_to_rad
(
-
45
))
<
util
.
degree_to_rad
(
4
)
cvt_rad
=
util
.
convert_value
(
raw_value
=
zero
,
**
cvt_args
)
assert
abs
(
cvt_rad
-
util
.
degree_to_rad
(
0
))
<
util
.
degree_to_rad
(
1
)
cvt_rad
=
util
.
convert_value
(
raw_value
=
hi_45
,
**
cvt_args
)
assert
abs
(
cvt_rad
-
util
.
degree_to_rad
(
45
))
<
util
.
degree_to_rad
(
3.5
)
cvt_rad
=
util
.
convert_value
(
raw_value
=
hi_lim_92
,
**
cvt_args
)
assert
abs
(
cvt_rad
-
util
.
degree_to_rad
(
92
))
<
util
.
degree_to_rad
(
1
)
def
test_calibration_armar_de_sho2_r
():
return
# TODO: Broken for some reason...
...
...
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