Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs598mp-fall2021-proj
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
chsieh16
cs598mp-fall2021-proj
Commits
2ce48fb6
Commit
2ce48fb6
authored
2 years ago
by
chsieh16
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug on agbot teacher and config
parent
7fcaf2ba
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
agbot_stanley_teacher.py
+1
-3
1 addition, 3 deletions
agbot_stanley_teacher.py
dtree_synth_agbot.py
+12
-3
12 additions, 3 deletions
dtree_synth_agbot.py
with
13 additions
and
6 deletions
agbot_stanley_teacher.py
+
1
−
3
View file @
2ce48fb6
...
...
@@ -123,10 +123,8 @@ class DTreeAgBotStanleyGurobiTeacher(DTreeGurobiTeacherBase):
sin_yaw
=
m
.
addVar
(
name
=
"
sinθ
"
,
**
self
.
TRIGVAR
)
m
.
addGenConstrSin
(
old_yaw
,
sin_yaw
)
new_x
=
old_x
+
FORWARD_VEL
*
CYCLE_TIME
*
cos_yaw
new_y
=
m
.
addVar
(
name
=
"
y
'"
,
**
self
.
FREEVAR
)
m
.
addConstr
(
new_x
==
old_x
+
FORWARD_VEL
*
CYCLE_TIME
*
cos_yaw
)
m
.
addConstr
(
new_y
==
old_y
+
FORWARD_VEL
*
CYCLE_TIME
*
sin_yaw
)
new_yaw
=
m
.
addVar
(
name
=
"
θ
'"
,
**
self
.
FREEVAR
)
m
.
addConstr
(
new_yaw
==
old_yaw
+
ang_vel
*
CYCLE_TIME
)
m
.
update
()
...
...
This diff is collapsed.
Click to expand it.
dtree_synth_agbot.py
+
12
−
3
View file @
2ce48fb6
...
...
@@ -60,7 +60,7 @@ def main(dom: Literal["concat", "diff"], ult_bound: float):
NUM_MAX_ITER
=
500
FEATURE_DOMAIN
=
dom
ULT_BOUND
=
ult_bound
NORM_ORD
=
1
NORM_ORD
=
2
teacher
=
DTreeAgBotStanleyGurobiTeacher
(
norm_ord
=
NORM_ORD
,
ultimate_bound
=
ULT_BOUND
)
part_to_examples
=
load_examples_from_numpy_array
(
data_5d
,
teacher
,
PARTITION
)
...
...
@@ -104,7 +104,16 @@ if __name__ == "__main__":
# NOTE To ensure safety (Stay in corn row),
# ult_bound should be smaller than 33/32 = 1.03125
from
dtree_synth_gem_stanley
import
clean_out_dir
# main("diff", 0.0)
# main("diff", 1.03125)
# clean_out_dir("out-agbot-stability-diff-ult_bound=0.0")
# main("diff", 1.0)
# clean_out_dir("out-agbot-stability-diff-ult_bound=1.0")
# main("concat", 0.0)
main
(
"
concat
"
,
1.03125
)
# clean_out_dir("out-agbot-stability-concat-ult_bound=0.0")
main
(
"
concat
"
,
1.0
)
clean_out_dir
(
"
out-agbot-stability-concat-ult_bound=1.0
"
)
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