\r
@define CELDAS_MAX_VELOCITY 30.\r
@define CELDAS_TURNO 100.\r
+@define CELDAS_SENSOR_THRESHOLD 9.\r
\r
PhysicalControl : CeldasControl {\r
% This class is used for building simple vehicle \r
bodyLink (object).\r
\r
wheels (list).\r
- sensors (list).\r
\r
+ to init:\r
bodyShape = new Shape.\r
sa update-datos-finales with datos-finales.\r
\r
+to iterate:\r
- fl, fr(float).\r
-\r
self update-entorno.\r
\r
if (0): # TODO posicion_final == posicion_actual\r
{\r
print "Llegamos al FINAL!!!".\r
+ self set-global-velocity to 0.\r
return.\r
}\r
\r
\r
if (iterate == 0):\r
{\r
- print "iteracion 0".\r
if (sa has-next-theory):\r
{\r
- print "hay teoria".\r
teoria = sa get-next-theory.\r
if ((teoria get-accion) == "adelante"):\r
{\r
# TODO if (posicion_actual == posicion_inicial): movido = false. else movido = true.\r
if (sa validate theory teoria):\r
{\r
- print "valida".\r
}\r
else\r
{\r
- print "Teoria no valida".\r
plan_finished = 1.\r
}\r
}\r
val (float).\r
\r
val = self get-data.\r
- if (val > 10): return 0.\r
+ if (val > CELDAS_SENSOR_THRESHOLD): return 0.\r
else return 1.\r
\r
#+ to iterate:\r
i (object).\r
min,dist (float).\r
v,obs(vector).\r
- aux(float).\r
j (int).\r
des2,des3(int).\r
wallBegin,wallEnd,wallCenter (float).\r
- \r
- toObstacle(vector).\r
- largeWall (float).\r
- \r
obsLoc (vector). \r
- location (vector).\r
posObstacle,destiny,yo(vector).\r
\r
draw clear.\r