Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Vicente Castellano Gómez
/
robotAmbientales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ef89b60e
authored
Apr 29, 2024
by
Vicente Castellano Gómez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Añadido cola de ruta
parent
fe93374e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
robot.py
robot.py
View file @
ef89b60e
...
...
@@ -50,6 +50,11 @@ class Robot:
return
True
return
False
# Recogemos la lista de movimientos del algoritmo
def
recogeListaMovimientosPedido
(
self
,
lMovimientos
):
for
movimiento
in
lMovimientos
:
self
.
colaMovimientos
.
put
(
movimiento
)
#Metodos para el movimiento
def
giro
(
self
,
grados
):
self
.
robot
.
reset
()
...
...
@@ -91,9 +96,9 @@ class Robot:
else
:
self
.
robot
.
drive
(
0
,
50
)
# Recogemos la lista de movimientos del algoritmo
def
recogeListaMovimientosPedido
(
self
,
lMovimientos
):
for
movimiento
in
lMovimientos
:
self
.
colaMovimientos
.
put
(
movimiento
)
#Deficnición y realización de la ruta
def
rutaPedido
(
self
):
while
self
.
colaMovimientos
.
not_empty
():
movimientoAct
=
self
.
colaMovimientos
.
get
()
#Aqui faltan los if correspondientes a cada tipo de movimiento
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment