Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base-intersemestre-jedi
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JEDI team3
base-intersemestre-jedi
Commits
0e93333c
Commit
0e93333c
authored
2 years ago
by
ROUE Simon, Claude, Yves
Browse files
Options
Downloads
Patches
Plain Diff
Update controller.py, droids.py
parent
7141ccb6
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
controller.py
+9
-1
9 additions, 1 deletion
controller.py
droids.py
+2
-1
2 additions, 1 deletion
droids.py
with
11 additions
and
2 deletions
controller.py
+
9
−
1
View file @
0e93333c
...
@@ -160,6 +160,14 @@ class Controller:
...
@@ -160,6 +160,14 @@ class Controller:
else
:
else
:
return
sum
([
i
for
i
in
measures
if
i
!=
"
inf
"
])
/
100
return
sum
([
i
for
i
in
measures
if
i
!=
"
inf
"
])
/
100
###TESTING
def
_get_sensor
(
name
:
int
):
if
name
==
0
:
return
self
.
left_sensor
elif
name
==
1
:
return
self
.
front_sensor
else
:
return
self
.
right_sensor
class
PIDController
(
Controller
):
class
PIDController
(
Controller
):
"""
"""
...
...
This diff is collapsed.
Click to expand it.
droids.py
+
2
−
1
View file @
0e93333c
...
@@ -225,9 +225,10 @@ class Droid3Sensors(Droid):
...
@@ -225,9 +225,10 @@ class Droid3Sensors(Droid):
#TODO : Implement the maze exploration
#TODO : Implement the maze exploration
import
threading
import
threading
import
time
def
print_distance_and_state
(
self
):
def
print_distance_and_state
(
self
):
while
True
:
while
True
:
print
(
"
yo
"
,
end
=
""
)
print
(
self
.
controller
.
_get_robust_distance
(
self
.
controller
.
left_sensor
))
print
(
self
.
controller
.
_get_robust_distance
(
self
.
controller
.
left_sensor
))
print
(
self
.
controller
.
_get_robust_distance
(
self
.
controller
.
right_sensor
))
print
(
self
.
controller
.
_get_robust_distance
(
self
.
controller
.
right_sensor
))
print
(
self
.
controller
.
_get_robust_distance
(
self
.
controller
.
front_sensor
))
print
(
self
.
controller
.
_get_robust_distance
(
self
.
controller
.
front_sensor
))
...
...
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