Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OUTDATED Verse-library
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
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
AutonomyCourse_ECEIllinois
OUTDATED Verse-library
Commits
a2d8f0c9
Commit
a2d8f0c9
authored
2 years ago
by
sayanmitracode
Browse files
Options
Downloads
Patches
Plain Diff
ball collision checks
parent
bf1d4b0d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
demo/ball_bounces.py
+7
-0
7 additions, 0 deletions
demo/ball_bounces.py
with
7 additions
and
0 deletions
demo/ball_bounces.py
+
7
−
0
View file @
a2d8f0c9
...
@@ -40,11 +40,18 @@ def controller(ego:State, others:State):
...
@@ -40,11 +40,18 @@ def controller(ego:State, others:State):
output
.
vy
=
-
ego
.
vy
output
.
vy
=
-
ego
.
vy
output
.
y
=
0
output
.
y
=
0
if
ego
.
x
>
20
:
if
ego
.
x
>
20
:
# Q. If I change this to ego.x >= 20 then the model does not work.
# I suspect this is because the same transition can be take many, many times.
# We need to figure out a clean solution
output
.
vx
=
-
ego
.
vx
output
.
vx
=
-
ego
.
vx
output
.
x
=
20
output
.
x
=
20
if
ego
.
y
>
20
:
if
ego
.
y
>
20
:
output
.
vy
=
-
ego
.
vy
output
.
vy
=
-
ego
.
vy
output
.
y
=
20
output
.
y
=
20
'''
if ego.x - others[1].x < 1 and ego.y - others[1].y < 1:
output.vy = -ego.vy
output.vx = -ego.vx
'''
# We would like to be able to write something like this, but currently not allowed.
return
output
return
output
...
...
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