Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Robobin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
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
plw1g21
Robobin
Commits
14511861
Commit
14511861
authored
6 months ago
by
Ziyuan Chang
Browse files
Options
Downloads
Patches
Plain Diff
Update main__1_.py
parent
ce3c5fb4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main__1_.py
+23
-23
23 additions, 23 deletions
main__1_.py
with
23 additions
and
23 deletions
main__1_.py
+
23
−
23
View file @
14511861
...
...
@@ -63,29 +63,29 @@ d_measured = 8000 # Example measured distance (in cm)
e_measured
=
8994.27
f_measured
=
5590.17
# Check if calculated distances match measured distances within ±10 cm
assert
np
.
isclose
(
a_calculated
,
a_measured
,
atol
=
10
),
f
"
a_calculated
{
a_calculated
}
differs from a_measured
{
a_measured
}
"
assert
np
.
isclose
(
b_calculated
,
b_measured
,
atol
=
10
),
f
"
b_calculated
{
b_calculated
}
differs from b_measured
{
b_measured
}
"
assert
np
.
isclose
(
c_calculated
,
c_measured
,
atol
=
10
),
f
"
c_calculated
{
c_calculated
}
differs from c_measured
{
c_measured
}
"
assert
np
.
isclose
(
d_calculated
,
d_measured
,
atol
=
10
),
f
"
d_calculated
{
d_calculated
}
differs from d_measured
{
d_measured
}
"
assert
np
.
isclose
(
e_calculated
,
e_measured
,
atol
=
10
),
f
"
e_calculated
{
e_calculated
}
differs from e_measured
{
e_measured
}
"
assert
np
.
isclose
(
f_calculated
,
f_measured
,
atol
=
10
),
f
"
f_calculated
{
f_calculated
}
differs from f_measured
{
f_measured
}
"
print
(
"
All calculated distances are within the acceptable tolerance of the measured distances.
"
)
#
# Check if calculated distances match measured distances within ±10 cm
#
assert np.isclose(
#
a_calculated, a_measured, atol=10
#
), f"a_calculated {a_calculated} differs from a_measured {a_measured}"
#
assert np.isclose(
#
b_calculated, b_measured, atol=10
#
), f"b_calculated {b_calculated} differs from b_measured {b_measured}"
#
assert np.isclose(
#
c_calculated, c_measured, atol=10
#
), f"c_calculated {c_calculated} differs from c_measured {c_measured}"
#
assert np.isclose(
#
d_calculated, d_measured, atol=10
#
), f"d_calculated {d_calculated} differs from d_measured {d_measured}"
#
assert np.isclose(
#
e_calculated, e_measured, atol=10
#
), f"e_calculated {e_calculated} differs from e_measured {e_measured}"
#
assert np.isclose(
#
f_calculated, f_measured, atol=10
#
), f"f_calculated {f_calculated} differs from f_measured {f_measured}"
#
print(
#
"All calculated distances are within the acceptable tolerance of the measured distances."
#
)
# Calculate and print the residuals after optimization
residuals_after_optimization
=
error_function
(
optimized_coords
,
...
...
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