Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2012-01-21 02:46:56 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2012-01-21 02:46:56 (GMT)
commit987045f0af674cd3b12897207bcf048b584b6df4 (patch)
tree163555dbb85c8372617902c505a28da448a1432e
parentebb46a2ddafc05595253ce3aa425539399b431bf (diff)
version 3
-rw-r--r--MANIFEST19
-rw-r--r--NEWS27
-rwxr-xr-xactivity.py98
-rwxr-xr-xactivity/activity.info4
-rwxr-xr-xbin/activity-followme10
-rwxr-xr-xfollowme.py200
-rw-r--r--icons/grid-icon.svg11
-rw-r--r--locale/de/LC_MESSAGES/uy.edu.fing.followme.mobin0 -> 1279 bytes
-rw-r--r--locale/de/activity.linfo2
-rw-r--r--locale/en/LC_MESSAGES/uy.edu.fing.followme.mobin0 -> 1228 bytes
-rw-r--r--locale/en/activity.linfo2
-rw-r--r--locale/es/LC_MESSAGES/uy.edu.fing.followme.mobin0 -> 1270 bytes
-rw-r--r--locale/es/activity.linfo2
-rw-r--r--locale/fr/LC_MESSAGES/uy.edu.fing.followme.mobin0 -> 1255 bytes
-rw-r--r--locale/fr/activity.linfo2
-rw-r--r--locale/it/LC_MESSAGES/uy.edu.fing.followme.mobin0 -> 1282 bytes
-rw-r--r--locale/it/activity.linfo2
-rw-r--r--po/FollowMe.pot91
-rw-r--r--po/de.po91
-rw-r--r--po/en.po91
-rw-r--r--po/es.po91
-rw-r--r--po/fr.po91
-rw-r--r--po/it.po91
-rwxr-xr-xpythonAPI/waitforbobot.py2
-rwxr-xr-xscriptlua.sh7
25 files changed, 824 insertions, 110 deletions
diff --git a/MANIFEST b/MANIFEST
index 1c4e56a..9e787e3 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,10 +1,16 @@
+NEWS
followme.py
activity.py
AUTHORS
setup.py
COPYING
butiaAPI.py
-scriptlua.sh
+po/de.po
+po/en.po
+po/es.po
+po/fr.po
+po/it.po
+po/FollowMe.pot
bin/activity-followme
lua/lua
lua/bobot.lua
@@ -80,6 +86,17 @@ lua/drivers/motor.lua
sugargame/event.py
sugargame/__init__.py
sugargame/canvas.py
+icons/grid-icon.svg
+locale/de/activity.linfo
+locale/de/LC_MESSAGES/uy.edu.fing.followme.mo
+locale/en/activity.linfo
+locale/en/LC_MESSAGES/uy.edu.fing.followme.mo
+locale/es/activity.linfo
+locale/es/LC_MESSAGES/uy.edu.fing.followme.mo
+locale/fr/activity.linfo
+locale/fr/LC_MESSAGES/uy.edu.fing.followme.mo
+locale/it/activity.linfo
+locale/it/LC_MESSAGES/uy.edu.fing.followme.mo
activity/followme.svg
activity/permissions.info
activity/activity.info
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..90bc591
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,27 @@
+3
+
+* Se agrega internacionalizacion del codigo. Ademas de Español, se traduce al Ingles,
+Frances, Aleman e Italiano. Se deja el archivo FollowMe.pot para agregar mas
+traducciones.
+* Se agrega opcion de mostrar lineas. Esta opcion muestra las lineas que delimitan las
+zonas que utiliza el codigo para mover al robot.
+* Se agrega opcion para ocultar/mostrar la captura en pantalla. Ocultando la captura en
+la pantalla mejora el rendimiento, con la desventaja de no ver como funciona el algoritmo
+de deteccion. En el modo calibrar no se oculta la captura.
+* Se corrige error en el modo seguir. Se logra funcionamiento usual con cualquier tamaño
+de muestra de captura en pantalla.
+
+2
+
+* Se agrega un sh para levantar el servidor LUA automaticamente con la actividad.
+* Se reduce el tiempo de espera del servidor de 20 segundos a 10 para que la actividad
+se inicie mas rapido.
+
+1
+
+* Version sugarizada con ayuda de sugargame
+* Se agregan opciones para modificar parametros en tiempo de ejecución
+
+0
+
+* Version inicial de prueba
diff --git a/activity.py b/activity.py
index 7e1c61f..4af70c3 100755
--- a/activity.py
+++ b/activity.py
@@ -34,10 +34,10 @@ import gtk
import pygame
import pygame.camera
from sugar.activity import activity
-import sugar.graphics.toolbutton
+from sugar.graphics.toolbutton import ToolButton
import sugargame.canvas
import followme
-
+from gettext import gettext as _
class Activity(activity.Activity):
@@ -49,7 +49,11 @@ class Activity(activity.Activity):
# guardo el umbral por defecto
self.umbral = (25, 25, 25)
# seteo el tamanio inicial de muestra
- self.tamaniom = (960, 720)
+ self.tamaniom = (960.0, 720.0)
+ # por defecto no se muestra la grilla
+ self.mostrar_grilla = False
+ # por defecto mostramos la captura en pantalla
+ self.mostrar = True
# creamos una isntancia del FollowMe
self.actividad = followme.FollowMe()
# construimos la barra
@@ -63,11 +67,11 @@ class Activity(activity.Activity):
def build_toolbar(self):
# ponemos un boton de parar de calibrar
- parar = sugar.graphics.toolbutton.ToolButton('media-playback-stop')
+ parar = ToolButton('media-playback-stop')
# ponemos como mensaje Parar
- parar.set_tooltip("Parar")
+ parar.set_tooltip(_('Parar'))
# ponemos la combinacion Ctrl + Espacio
- parar.set_accelerator(('<ctrl>space'))
+ parar.set_accelerator('<ctrl>space')
# conectamos el boton con el evento click
parar.connect('clicked', self.parar_ejecutar)
# obteenmos la barra
@@ -77,7 +81,7 @@ class Activity(activity.Activity):
# creamos la etiqueta para calibrar
self.etiqueta1 = gtk.Label()
# le ponemos el texto Calibrar
- self.etiqueta1.set_text(' Calibrar ')
+ self.etiqueta1.set_text(_(' Calibrar '))
# agrego la etiqueta al item
item1.add(self.etiqueta1)
# inserto el item en la barra
@@ -89,7 +93,7 @@ class Activity(activity.Activity):
# creo la etiqueta de los pixeles
self.etiqueta2 = gtk.Label()
# le coloco el texto Pixeles
- self.etiqueta2.set_text(' Pixeles ')
+ self.etiqueta2.set_text(_(' Pixeles '))
# agrego la etiqueta al item
item2.add(self.etiqueta2)
# coloco el item en la barra
@@ -123,7 +127,7 @@ class Activity(activity.Activity):
# creo la etiqueta para umbral
self.etiqueta5 = gtk.Label()
# le coloco el texto Umbral
- self.etiqueta5.set_text(' Umbral: Rojo ')
+ self.etiqueta5.set_text(_(' Umbral: Rojo '))
# agrego la etiqueta al item
item5.add(self.etiqueta5)
# inserto el item en la barra
@@ -149,7 +153,7 @@ class Activity(activity.Activity):
# creo la etiqueta para el verde
self.etiqueta7 = gtk.Label()
# le coloco G de verde
- self.etiqueta7.set_text(' Verde ')
+ self.etiqueta7.set_text(_(' Verde '))
# coloco la etiqueta en el item
item7.add(self.etiqueta7)
# coloco el item en la barra
@@ -175,7 +179,7 @@ class Activity(activity.Activity):
# creo la etiqueta para el azul
self.etiqueta9 = gtk.Label()
# coloco el texto B
- self.etiqueta9.set_text(' Azul ')
+ self.etiqueta9.set_text(_(' Azul '))
# inserto la etiqueta en el item
item9.add(self.etiqueta9)
# inserto el item en la barra
@@ -197,7 +201,7 @@ class Activity(activity.Activity):
# inserto el item en la barra
barra.insert(item10, 10)
# obtengo la caja de la actividad
- caja = sugar.activity.activity.ActivityToolbox(self)
+ caja = activity.ActivityToolbox(self)
# obtengo la barra de Actividad
barra_actividad = caja.get_activity_toolbar()
# le saco la opcion guardar
@@ -209,7 +213,7 @@ class Activity(activity.Activity):
# le coloco none
barra_actividad.share = None
# alacaja le agregamos nuestra barra de Opciones
- caja.add_toolbar("Opciones", barra)
+ caja.add_toolbar(_('Opciones'), barra)
# obteenmos la barra
barra2 = gtk.Toolbar()
# creamos el primer item
@@ -217,7 +221,7 @@ class Activity(activity.Activity):
# creamos la etiqueta para calibrar
self.et1 = gtk.Label()
# le ponemos el texto Calibrar
- self.et1.set_text(' Tamaño muestra ')
+ self.et1.set_text(_(' Tamanio de muestra '))
# agrego la etiqueta al item
it1.add(self.et1)
# inserto el item en la barra
@@ -264,8 +268,42 @@ class Activity(activity.Activity):
it4.add(self.tmy)
# inserto el item a la barra
barra2.insert(it4, 3)
+ # creamos el quinto item
+ it5 = gtk.ToolItem()
+ # creamos la etiqueta para mostrar lineas
+ self.et5 = gtk.Label()
+ # le ponemos el texto
+ self.et5.set_text(_(' Mostrar lineas'))
+ # agrego la etiqueta al item
+ it5.add(self.et5)
+ # inserto el item en la barra
+ barra2.insert(it5, 4)
+ # creo un boton para la grilla
+ self.grilla = ToolButton('grid-icon')
+ # conecto el evento click y el procedimiento
+ self.grilla_handler = self.grilla.connect('clicked', self.grilla_click)
+ # inserto el boton grilla en la barra 2
+ barra2.insert(self.grilla, 5)
+ # creamos el sexto item
+ it6 = gtk.ToolItem()
+ # creamos la etiqueta para mostrar en pantalla
+ self.et6 = gtk.Label()
+ # le ponemos el texto
+ self.et6.set_text(_(' Mostrar en pantalla'))
+ # agrego la etiqueta al item
+ it6.add(self.et6)
+ # inserto el item en la barra
+ barra2.insert(it6, 6)
+ # ponemos un boton de parar de mostrar captura
+ parar2 = ToolButton('media-playback-stop')
+ # conectamos el boton con el evento click
+ parar2.connect('clicked', self.parar_muestra)
+ # ponemos como mensaje Ocultar
+ parar2.set_tooltip(_('Ocultar'))
+ # insertamos el boton en la barra
+ barra2.insert(parar2, 7)
# agrego la barra2 a la caja (toolbar)
- caja.add_toolbar("Resolución", barra2)
+ caja.add_toolbar(_('Resolucion'), barra2)
# la mostramos
caja.show_all()
# le ponemos la caja
@@ -318,17 +356,17 @@ class Activity(activity.Activity):
def tmx_mod(self, tmx, value):
# guardo el valor del cuadro
- x = int(tmx.props.value)
+ x = float(tmx.props.value)
# actualizo el tamanio m
- self.tamaniom = (x, self.tamaniom[1])
+ self.tamaniom = (x, float(self.tamaniom[1]))
# cambio en FollowMe el valor del tamanio
self.actividad.poner_tamaniom(self.tamaniom)
def tmy_mod(self, tmy, value):
# guardo el valor del cuadro
- y = int(tmy.props.value)
+ y = float(tmy.props.value)
# actualizo el tamanio m
- self.tamaniom = (self.tamaniom[0], y)
+ self.tamaniom = (float(self.tamaniom[0]), y)
# cambio en FollowMe el valor del tamanio
self.actividad.poner_tamaniom(self.tamaniom)
@@ -342,9 +380,27 @@ class Activity(activity.Activity):
# ponemos ejecutar
boton.set_icon('media-playback-start')
# con el tolltip Empezar
- boton.set_tooltip("Empezar")
+ boton.set_tooltip(_('Empezar'))
else:
# ponemos parar
boton.set_icon('media-playback-stop')
# con el tolltip Detener
- boton.set_tooltip("Detener")
+ boton.set_tooltip(_('Detener'))
+
+ def grilla_click(self, widget):
+ self.mostrar_grilla = not self.mostrar_grilla
+ self.actividad.poner_grilla(self.mostrar_grilla)
+
+ def parar_muestra(self, boton):
+ self.mostrar = not self.mostrar
+ if not self.mostrar:
+ # ponemos mostrar
+ boton.set_icon('media-playback-start')
+ # ponemos como mensaje Mostrar
+ boton.set_tooltip(_('Mostrar'))
+ else:
+ # ponemos ocultar
+ boton.set_icon('media-playback-stop')
+ # ponemos como mensaje Ocultar
+ boton.set_tooltip(_('Ocultar'))
+ self.actividad.poner_muestra(self.mostrar)
diff --git a/activity/activity.info b/activity/activity.info
index a1fc222..a102ac6 100755
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,7 +1,7 @@
[Activity]
name = FollowMe
-activity_version = 2
-host_version = 2
+activity_version = 3
+host_version = 3
bundle_id = uy.edu.fing.followme
service_name = uy.edu.fing.followme
exec = activity-followme
diff --git a/bin/activity-followme b/bin/activity-followme
index 6272d8c..e078639 100755
--- a/bin/activity-followme
+++ b/bin/activity-followme
@@ -11,6 +11,12 @@ while [ -n "$2" ] ; do
shift;shift
done
-export LUA_SCRIPT="/home/olpc/Activities/FollowMe.activity/scriptlua.sh"
+cd lua
+./lua bobot-server.lua&
+cd ../pythonAPI
+./waitforbobot.py
+cd ..
-$LUA_SCRIPT
+sugar-activity -a $SUGAR_ACTIVITY_ID activity.Activity
+
+kill `ps ax | grep bobot-server | grep -v grep | awk '{print $1}'`
diff --git a/followme.py b/followme.py
index 2070bd6..e29f346 100755
--- a/followme.py
+++ b/followme.py
@@ -31,13 +31,14 @@ import pygame
import gtk
import butiaAPI
import time
+from gettext import gettext as _
# seteamos el tamaño de captura
tamanioc = (320, 240)
class Captura(object):
- def __init__(self, tamaniom):
+ def __init__(self, tamanio):
# creamos una superfcie para usarla de pantalla
self.pantalla = pygame.display.get_surface()
# creamos una superficie para la captura
@@ -49,29 +50,38 @@ class Captura(object):
# si no hay ninguna camara
if not self.lcamaras:
# mandamos el error correspondiente
- raise ValueError("No se encontro ninguna camara.")
+ print _('No se encontro ninguna camara.')
else:
# creamos la camara, con tamanio y modo color RGB
self.cam = pygame.camera.Camera(self.lcamaras[0], tamanioc, 'RGB')
# iniciamos la camara
self.cam.start()
- self.calc(tamaniom)
+ # calculamos las proporciones
+ self.calc(tamanio)
+ # por defecto no mostramos la grilla
+ self.mostrar_grilla = False
- def calc(self, tamaniom):
+ def calc(self, tamanio):
+ # guardo tamanio en self.tamaniom
+ self.tamaniom = tamanio
# calculamos la proporcion en x
- self.c1 = tamaniom[0] / 320
+ self.c1 = (self.tamaniom[0] / tamanioc[0])
# calculamos la proporcion en y
- self.c2 = tamaniom[1] / 240
+ self.c2 = (self.tamaniom[1] / tamanioc[1])
# coordenada x calibrar
self.xc = (tamanioc[0] - 50) / 2
# coordenada y calibrar
self.yc = (tamanioc[1] - 50) / 2
# posicion desde el borde izquierdo en la pantalla
- self.xblit = (1200 - tamaniom[0]) / 2
+ self.xblit = (1200 - self.tamaniom[0]) / 2
# posicion desde el borde superior de la pantalla
- self.yblit = (780 - tamaniom[1]) / 2
+ self.yblit = (780 - self.tamaniom[1]) / 2
+ # calculamos las divisiones en x
+ self.txd = self.tamaniom[0] / 16
+ # calculamos las divisiones en y
+ self.tyd = self.tamaniom[1] / 3
- def calibrar(self, tamaniom):
+ def calibrar(self):
# guardamos una captura
self.captura = self.cam.get_image(self.captura)
# giramos la captura, en el horizontal
@@ -85,7 +95,7 @@ class Captura(object):
# rellenamos la pantalla con un color homogeneo
self.pantalla.fill((84,185,72))
# escalamos captura al tamanio tamaniom
- self.captura2 = pygame.transform.scale(self.captura, tamaniom)
+ self.captura2 = pygame.transform.scale(self.captura, (int(self.tamaniom[0]), int(self.tamaniom[1])))
# colocamos la captura 2 en la pantalla
self.pantalla.blit(self.captura2, (self.xblit, self.yblit))
# dibujamos un rectangulo en el centro de la pantalla
@@ -112,17 +122,21 @@ class Captura(object):
# sino devolvemos un centro ficticio
return (-1,-1)
- def mostrar_posicion(self, pos, tamaniom):
+ def mostrar_posicion(self, pos):
# guardo en x e y la posicion
x, y = pos
# escalo la captura para mostrar
- self.captura2 = pygame.transform.scale(self.captura, tamaniom)
+ self.captura2 = pygame.transform.scale(self.captura, (int(self.tamaniom[0]), int(self.tamaniom[1])))
# si es una posicion valida
if (x != -1):
# creo un punto para mostrar la posicion
rect = pygame.draw.rect(self.captura2, (255,0,0), (x*self.c1, y*self.c2, 20, 20), 16)
# rellenamos la pantalla con un color homogeneo
self.pantalla.fill((84,185,72))
+ # si hay que mostrar la grilla
+ if (self.mostrar_grilla == True):
+ # dibujo la grilla
+ self.dibujar_grilla()
# muestro la captura en pantalla
self.pantalla.blit(self.captura2, (self.xblit, self.yblit))
# rellenamos la esquina superior con el color calibrado
@@ -130,6 +144,22 @@ class Captura(object):
# recuadramos el color para resaltarlo
rect = pygame.draw.rect(self.pantalla, (0,0,0), (0,0,120,120), 4)
+ def dibujar_grilla(self):
+ # dibujo las zonas verticales
+ r0 = pygame.draw.line(self.captura2, (250, 40, 40), (0, self.tyd), (self.tamaniom[0],self.tyd), 3)
+ r1 = pygame.draw.line(self.captura2, (250, 40, 40), (0, 2*self.tyd), (self.tamaniom[0], 2*self.tyd), 3)
+ # dibujo las zonas horizontales
+ r2 = pygame.draw.line(self.captura2, (250, 40, 40), (2*self.txd, 0), (2*self.txd, self.tamaniom[1]), 3)
+ r3 = pygame.draw.line(self.captura2, (250, 40, 40), (4*self.txd, 0), (4*self.txd, self.tamaniom[1]), 3)
+ r4 = pygame.draw.line(self.captura2, (250, 40, 40), (7*self.txd, 0), (7*self.txd, self.tamaniom[1]), 3)
+ r5 = pygame.draw.line(self.captura2, (250, 40, 40), (9*self.txd, 0), (9*self.txd, self.tamaniom[1]), 3)
+ r6 = pygame.draw.line(self.captura2, (250, 40, 40), (12*self.txd, 0), (12*self.txd, self.tamaniom[1]), 3)
+ r7 = pygame.draw.line(self.captura2, (250, 40, 40), (14*self.txd, 0), (14*self.txd, self.tamaniom[1]), 3)
+
+ def limpiar(self):
+ # relleno la pantalla con un color homogeneo
+ self.pantalla.fill((84, 185, 72))
+
class Robot(object):
@@ -152,67 +182,65 @@ class Robot(object):
self.butiabot.abrirMotores()
else:
# sino se encuentra
- print "No se detecto al Butia."
+ print _('No se detecto al robot Butia.')
def mover_robot(self, pos):
# asigno las coordenadas
x,y = pos
- # si el robot se encuentra
- if (self.modulos != -1):
- # por defecto espero
- espera = True
- # si esta ligeramente a la izquierda
- if (x > (4*self.z1)) and (x <= (7*self.z1)):
- # me muevo a la derecha v = 300
- self.butiabot.setVelocidadMotores("1","300", "0", "300")
- # si esta bastante hacia la izquierda
- elif (x > (2*self.z1)) and (x <= (4*self.z1)):
- # me muevo a la derecha v = 600
- self.butiabot.setVelocidadMotores("1","600", "0", "600")
- # si esta a la iquierda
- elif (x <= (2*self.z1)) and (x >= 0):
- # me muevo a la derecha v = 900
- self.butiabot.setVelocidadMotores("1","900", "0", "900")
- # si esta ligeramente a la derecha
- elif (x >= (9*self.z1)) and (x < (12*self.z1)):
- # me muevo a la izquierda v = 300
- self.butiabot.setVelocidadMotores("0","300", "1", "300")
- # si esta bastante hacia la derecha
- elif (x >= 12*self.z1) and (x < 14*self.z1):
- # me muevo a la izquierda v = 600
- self.butiabot.setVelocidadMotores("0","600", "1", "600")
- # si esta a la derecha
- elif (x >= (14*self.z1)):
- # me muevo a la izquierda v = 900
- self.butiabot.setVelocidadMotores("0","900", "1", "900")
- # si esta en la zona muerta
- elif (x > 7*self.z1) and (x < 9*self.z1):
- # no espero
- espera = False
- # si hay espera
- if (espera == True):
- # giro durante 0.1 segundos
- time.sleep(0.1)
- # devuelvo el valor de espera
- espera = True
- # si esta abajo
- if (y <= self.z2) and (y >= 0):
- # me muevo hacia adelante
- self.butiabot.setVelocidadMotores("1","500", "1", "500")
- # si esta ariba
- elif (y >= 2*self.z2):
- # me muevo hacia atras
- self.butiabot.setVelocidadMotores("0","500", "0", "500")
- # si esta en la zona muerta
- elif (y > self.z2) and (y < 2*self.z2):
- # no espero
- espera = False
- # si hay espera
- if (espera == True):
- # me muevo durante 0.1 segundos
- time.sleep(0.1)
- # detengo al robot
- self.butiabot.setVelocidadMotores("0","0", "0", "0")
+ # por defecto espero
+ espera = True
+ # si esta ligeramente a la izquierda
+ if (x > (4*self.z1)) and (x <= (7*self.z1)):
+ # me muevo a la derecha v = 300
+ self.butiabot.setVelocidadMotores("1","300", "0", "300")
+ # si esta bastante hacia la izquierda
+ elif (x > (2*self.z1)) and (x <= (4*self.z1)):
+ # me muevo a la derecha v = 600
+ self.butiabot.setVelocidadMotores("1","600", "0", "600")
+ # si esta a la iquierda
+ elif (x <= (2*self.z1)) and (x >= 0):
+ # me muevo a la derecha v = 900
+ self.butiabot.setVelocidadMotores("1","900", "0", "900")
+ # si esta ligeramente a la derecha
+ elif (x >= (9*self.z1)) and (x < (12*self.z1)):
+ # me muevo a la izquierda v = 300
+ self.butiabot.setVelocidadMotores("0","300", "1", "300")
+ # si esta bastante hacia la derecha
+ elif (x >= 12*self.z1) and (x < 14*self.z1):
+ # me muevo a la izquierda v = 600
+ self.butiabot.setVelocidadMotores("0","600", "1", "600")
+ # si esta a la derecha
+ elif (x >= (14*self.z1)):
+ # me muevo a la izquierda v = 900
+ self.butiabot.setVelocidadMotores("0","900", "1", "900")
+ # si esta en la zona muerta
+ elif (x > 7*self.z1) and (x < 9*self.z1):
+ # no espero
+ espera = False
+ # si hay espera
+ if (espera == True):
+ # giro durante 0.1 segundos
+ time.sleep(0.1)
+ # devuelvo el valor de espera
+ espera = True
+ # si esta abajo
+ if (y <= self.z2) and (y >= 0):
+ # me muevo hacia adelante
+ self.butiabot.setVelocidadMotores("1","500", "1", "500")
+ # si esta ariba
+ elif (y >= 2*self.z2):
+ # me muevo hacia atras
+ self.butiabot.setVelocidadMotores("0","500", "0", "500")
+ # si esta en la zona muerta
+ elif (y > self.z2) and (y < 2*self.z2):
+ # no espero
+ espera = False
+ # si hay espera
+ if (espera == True):
+ # me muevo durante 0.1 segundos
+ time.sleep(0.1)
+ # detengo al robot
+ self.butiabot.setVelocidadMotores("0","0", "0", "0")
class FollowMe:
@@ -226,6 +254,10 @@ class FollowMe:
def modocalibrando(self, calibrando):
# seteo el calibrando local
self.calibrando = calibrando
+ # si no hay que mostrar
+ if (self.mostrar == False):
+ # limpio la pantalla
+ self.c.limpiar()
def poner_umbral(self, umbral):
# guardo el umbral en el local
@@ -240,6 +272,18 @@ class FollowMe:
self.tamaniom = tam
self.c.calc(tam)
+ def poner_grilla(self, grilla):
+ # seteo la variable local
+ self.c.mostrar_grilla = grilla
+
+ def poner_muestra(self, muestra):
+ # seteo la variable local
+ self.mostrar = muestra
+ # si no hay que mostrar
+ if (self.mostrar == False):
+ # limpio la pantalla
+ self.c.limpiar()
+
def run(self):
# creamos el robot
r = Robot()
@@ -248,9 +292,10 @@ class FollowMe:
# establezco un numero de pixeles inicial
self.pixeles = 10
# establezco un tamaño incial
- self.tamaniom = (960, 720)
+ self.tamanioi = (960.0, 720.0)
+ self.mostrar = True
# creamos una captura
- self.c = Captura(self.tamaniom)
+ self.c = Captura(self.tamanioi)
# obligamos a que se ejecute el while
ejecutar = True
# mientras ejecutar
@@ -268,14 +313,17 @@ class FollowMe:
# si es calibrar
if (self.calibrando):
# calibro la camara
- self.c.calibrar(self.tamaniom)
+ self.c.calibrar()
else:
# obtengo la posicion
pos = self.c.obtener_posicion(self.umbral, self.pixeles)
- # muestro la posicion en pantalla
- self.c.mostrar_posicion(pos, self.tamaniom)
- # movemos el robot
- r.mover_robot(pos)
+ if self.mostrar:
+ # muestro la posicion en pantalla
+ self.c.mostrar_posicion(pos)
+ # si esta el butia conectado
+ if (r.modulos != -1):
+ # movemos el robot
+ r.mover_robot(pos)
# actualizo la pantalla
pygame.display.flip()
# seteo a 10 CPS (CuadrosPorSegundo)
diff --git a/icons/grid-icon.svg b/icons/grid-icon.svg
new file mode 100644
index 0000000..75c269f
--- /dev/null
+++ b/icons/grid-icon.svg
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY fill_color "#000000">
+ <!ENTITY stroke_color "#FFFFFF">
+]>
+<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50">
+ <line x1="15" y1="4" x2="15" y2="46" stroke-width="3.0" stroke="&stroke_color;" />
+ <line x1="35" y1="4" x2="35" y2="46" stroke-width="3.0" stroke="&stroke_color;" />
+ <line x1="4" y1="15" x2="46" y2="15" stroke-width="3.0" stroke="&stroke_color;" />
+ <line x1="4" y1="35" x2="46" y2="35" stroke-width="3.0" stroke="&stroke_color;" />
+</svg>
diff --git a/locale/de/LC_MESSAGES/uy.edu.fing.followme.mo b/locale/de/LC_MESSAGES/uy.edu.fing.followme.mo
new file mode 100644
index 0000000..3e8aa24
--- /dev/null
+++ b/locale/de/LC_MESSAGES/uy.edu.fing.followme.mo
Binary files differ
diff --git a/locale/de/activity.linfo b/locale/de/activity.linfo
new file mode 100644
index 0000000..310ab1a
--- /dev/null
+++ b/locale/de/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = FollowMe
diff --git a/locale/en/LC_MESSAGES/uy.edu.fing.followme.mo b/locale/en/LC_MESSAGES/uy.edu.fing.followme.mo
new file mode 100644
index 0000000..1ac899c
--- /dev/null
+++ b/locale/en/LC_MESSAGES/uy.edu.fing.followme.mo
Binary files differ
diff --git a/locale/en/activity.linfo b/locale/en/activity.linfo
new file mode 100644
index 0000000..310ab1a
--- /dev/null
+++ b/locale/en/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = FollowMe
diff --git a/locale/es/LC_MESSAGES/uy.edu.fing.followme.mo b/locale/es/LC_MESSAGES/uy.edu.fing.followme.mo
new file mode 100644
index 0000000..a3571e7
--- /dev/null
+++ b/locale/es/LC_MESSAGES/uy.edu.fing.followme.mo
Binary files differ
diff --git a/locale/es/activity.linfo b/locale/es/activity.linfo
new file mode 100644
index 0000000..310ab1a
--- /dev/null
+++ b/locale/es/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = FollowMe
diff --git a/locale/fr/LC_MESSAGES/uy.edu.fing.followme.mo b/locale/fr/LC_MESSAGES/uy.edu.fing.followme.mo
new file mode 100644
index 0000000..e10e522
--- /dev/null
+++ b/locale/fr/LC_MESSAGES/uy.edu.fing.followme.mo
Binary files differ
diff --git a/locale/fr/activity.linfo b/locale/fr/activity.linfo
new file mode 100644
index 0000000..310ab1a
--- /dev/null
+++ b/locale/fr/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = FollowMe
diff --git a/locale/it/LC_MESSAGES/uy.edu.fing.followme.mo b/locale/it/LC_MESSAGES/uy.edu.fing.followme.mo
new file mode 100644
index 0000000..301fbbd
--- /dev/null
+++ b/locale/it/LC_MESSAGES/uy.edu.fing.followme.mo
Binary files differ
diff --git a/locale/it/activity.linfo b/locale/it/activity.linfo
new file mode 100644
index 0000000..310ab1a
--- /dev/null
+++ b/locale/it/activity.linfo
@@ -0,0 +1,2 @@
+[Activity]
+name = FollowMe
diff --git a/po/FollowMe.pot b/po/FollowMe.pot
new file mode 100644
index 0000000..341f6b5
--- /dev/null
+++ b/po/FollowMe.pot
@@ -0,0 +1,91 @@
+# FollowMe translation
+# Copyright (C) 2010, Alan Aguiar, Ayleen Ricca, Rodrigo Dearmas
+# This file is distributed under GPL license.
+# Alan Aguiar <alanjas@gmail.com>, 2010.
+# Aylen Ricca <ar18_90@hotmail.com>, 2010.
+# Rodrigo Dearmas <piegrande46@hotmail.com>, 2010.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: 3\n"
+"Report-Msgid-Bugs-To: alanjas@gmail.com\n"
+"POT-Creation-Date: 2010-11-25 19:55-0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Alan Aguiar <alanjas@gmail.com>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: activity/activity.info:2
+msgid "FollowMe"
+msgstr "FollowMe"
+
+#: followme.py:53
+msgid "No se encontro ninguna camara."
+msgstr ""
+
+#: followme.py:185
+msgid "No se detecto al robot Butia."
+msgstr ""
+
+#: activity.py:72
+msgid "Parar"
+msgstr ""
+
+#: activity.py:84
+msgid " Calibrar "
+msgstr ""
+
+#: activity.py:96
+msgid " Pixeles "
+msgstr ""
+
+#: activity.py:130
+msgid " Umbral: Rojo "
+msgstr ""
+
+#: activity.py:156
+msgid " Verde "
+msgstr ""
+
+#: activity.py:182
+msgid " Azul "
+msgstr ""
+
+#: activity.py:216
+msgid "Opciones"
+msgstr ""
+
+#: activity.py:224
+msgid " Tamanio de muestra "
+msgstr ""
+
+#: activity.py:276
+msgid " Mostrar lineas"
+msgstr ""
+
+#: activity.py:292
+msgid " Mostrar en pantalla"
+msgstr ""
+
+#: activity.py:302 activity.py:405
+msgid "Ocultar"
+msgstr ""
+
+#: activity.py:306
+msgid "Resolucion"
+msgstr ""
+
+#: activity.py:383
+msgid "Empezar"
+msgstr ""
+
+#: activity.py:388
+msgid "Detener"
+msgstr ""
+
+#: activity.py:400
+msgid "Mostrar"
+msgstr ""
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..074b6b2
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,91 @@
+# FollowMe translation
+# Copyright (C) 2010, Alan Aguiar, Ayleen Ricca, Rodrigo Dearmas
+# This file is distributed under GPL license.
+# Alan Aguiar <alanjas@gmail.com>, 2010.
+# Aylen Ricca <ar18_90@hotmail.com>, 2010.
+# Rodrigo Dearmas <piegrande46@hotmail.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 3\n"
+"Report-Msgid-Bugs-To: alanjas@gmail.com\n"
+"POT-Creation-Date: 2010-11-25 19:55-0200\n"
+"PO-Revision-Date: 2010-11-25 20:01-0200\n"
+"Last-Translator: <alanjas@gmail.com>\n"
+"Language-Team: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: activity/activity.info:2
+msgid "FollowMe"
+msgstr "FollowMe"
+
+#: followme.py:53
+msgid "No se encontro ninguna camara."
+msgstr "Nein auffinden kein Kammer"
+
+#: followme.py:185
+msgid "No se detecto al robot Butia."
+msgstr "Robot Butia nein auffinden"
+
+#: activity.py:72
+msgid "Parar"
+msgstr "Anhalten"
+
+#: activity.py:84
+msgid " Calibrar "
+msgstr " Kalibrieren "
+
+#: activity.py:96
+msgid " Pixeles "
+msgstr " Pixels "
+
+#: activity.py:130
+msgid " Umbral: Rojo "
+msgstr " Schwelle: Rot "
+
+#: activity.py:156
+msgid " Verde "
+msgstr " Grün "
+
+#: activity.py:182
+msgid " Azul "
+msgstr " Blau "
+
+#: activity.py:216
+msgid "Opciones"
+msgstr "Wahl"
+
+#: activity.py:224
+msgid " Tamanio de muestra "
+msgstr " Grösse von vorzeigen "
+
+#: activity.py:276
+msgid " Mostrar lineas"
+msgstr " Vorzeigen Linie"
+
+#: activity.py:292
+msgid " Mostrar en pantalla"
+msgstr " Vorzeigen auf Lichtschirm"
+
+#: activity.py:302 activity.py:405
+msgid "Ocultar"
+msgstr "Verbergen"
+
+#: activity.py:306
+msgid "Resolucion"
+msgstr "Beschluss"
+
+#: activity.py:383
+msgid "Empezar"
+msgstr "Beginnen"
+
+#: activity.py:388
+msgid "Detener"
+msgstr "Aufhalten"
+
+#: activity.py:400
+msgid "Mostrar"
+msgstr "Vorzeigen"
diff --git a/po/en.po b/po/en.po
new file mode 100644
index 0000000..42aea97
--- /dev/null
+++ b/po/en.po
@@ -0,0 +1,91 @@
+# FollowMe translation
+# Copyright (C) 2010, Alan Aguiar, Ayleen Ricca, Rodrigo Dearmas
+# This file is distributed under GPL license.
+# Alan Aguiar <alanjas@gmail.com>, 2010.
+# Aylen Ricca <ar18_90@hotmail.com>, 2010.
+# Rodrigo Dearmas <piegrande46@hotmail.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 3\n"
+"Report-Msgid-Bugs-To: alanjas@gmail.com\n"
+"POT-Creation-Date: 2010-11-25 19:55-0200\n"
+"PO-Revision-Date: 2010-11-25 20:02-0200\n"
+"Last-Translator: <alanjas@gmail.com>\n"
+"Language-Team: English\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: activity/activity.info:2
+msgid "FollowMe"
+msgstr "FollowMe"
+
+#: followme.py:53
+msgid "No se encontro ninguna camara."
+msgstr "Not found any camera."
+
+#: followme.py:185
+msgid "No se detecto al robot Butia."
+msgstr "Butia robot not detected."
+
+#: activity.py:72
+msgid "Parar"
+msgstr "Stop"
+
+#: activity.py:84
+msgid " Calibrar "
+msgstr " Calibrate "
+
+#: activity.py:96
+msgid " Pixeles "
+msgstr " Pixels "
+
+#: activity.py:130
+msgid " Umbral: Rojo "
+msgstr " Threshold: Red "
+
+#: activity.py:156
+msgid " Verde "
+msgstr " Green "
+
+#: activity.py:182
+msgid " Azul "
+msgstr " Blue "
+
+#: activity.py:216
+msgid "Opciones"
+msgstr "Options"
+
+#: activity.py:224
+msgid " Tamanio de muestra "
+msgstr " Size show "
+
+#: activity.py:276
+msgid " Mostrar lineas"
+msgstr " Show lines"
+
+#: activity.py:292
+msgid " Mostrar en pantalla"
+msgstr " Show in display"
+
+#: activity.py:302 activity.py:405
+msgid "Ocultar"
+msgstr "Hide"
+
+#: activity.py:306
+msgid "Resolucion"
+msgstr "Resolution"
+
+#: activity.py:383
+msgid "Empezar"
+msgstr "Start"
+
+#: activity.py:388
+msgid "Detener"
+msgstr "Stop"
+
+#: activity.py:400
+msgid "Mostrar"
+msgstr "Show"
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..09f3755
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,91 @@
+# FollowMe translation
+# Copyright (C) 2010, Alan Aguiar, Ayleen Ricca, Rodrigo Dearmas
+# This file is distributed under GPL license.
+# Alan Aguiar <alanjas@gmail.com>, 2010.
+# Aylen Ricca <ar18_90@hotmail.com>, 2010.
+# Rodrigo Dearmas <piegrande46@hotmail.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 3\n"
+"Report-Msgid-Bugs-To: alanjas@gmail.com\n"
+"POT-Creation-Date: 2010-11-25 19:55-0200\n"
+"PO-Revision-Date: 2010-11-25 20:02-0200\n"
+"Last-Translator: <alanjas@gmail.com>\n"
+"Language-Team: Spanish\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: activity/activity.info:2
+msgid "FollowMe"
+msgstr "FollowMe"
+
+#: followme.py:53
+msgid "No se encontro ninguna camara."
+msgstr "No se encontró ninguna cámara"
+
+#: followme.py:185
+msgid "No se detecto al robot Butia."
+msgstr "No se detectó al robot Butia"
+
+#: activity.py:72
+msgid "Parar"
+msgstr "Parar"
+
+#: activity.py:84
+msgid " Calibrar "
+msgstr " Calibrar "
+
+#: activity.py:96
+msgid " Pixeles "
+msgstr " Pixeles "
+
+#: activity.py:130
+msgid " Umbral: Rojo "
+msgstr " Umbral: Rojo "
+
+#: activity.py:156
+msgid " Verde "
+msgstr " Verde "
+
+#: activity.py:182
+msgid " Azul "
+msgstr " Azul "
+
+#: activity.py:216
+msgid "Opciones"
+msgstr "Opciones"
+
+#: activity.py:224
+msgid " Tamanio de muestra "
+msgstr " Tamaño de muestra "
+
+#: activity.py:276
+msgid " Mostrar lineas"
+msgstr " Mostrar lineas"
+
+#: activity.py:292
+msgid " Mostrar en pantalla"
+msgstr " Mostrar en pantalla"
+
+#: activity.py:302 activity.py:405
+msgid "Ocultar"
+msgstr "Ocultar"
+
+#: activity.py:306
+msgid "Resolucion"
+msgstr "Resolución"
+
+#: activity.py:383
+msgid "Empezar"
+msgstr "Empezar"
+
+#: activity.py:388
+msgid "Detener"
+msgstr "Detener"
+
+#: activity.py:400
+msgid "Mostrar"
+msgstr "Mostrar"
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..e1732c3
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,91 @@
+# FollowMe translation
+# Copyright (C) 2010, Alan Aguiar, Ayleen Ricca, Rodrigo Dearmas
+# This file is distributed under GPL license.
+# Alan Aguiar <alanjas@gmail.com>, 2010.
+# Aylen Ricca <ar18_90@hotmail.com>, 2010.
+# Rodrigo Dearmas <piegrande46@hotmail.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 3\n"
+"Report-Msgid-Bugs-To: alanjas@gmail.com\n"
+"POT-Creation-Date: 2010-11-25 19:55-0200\n"
+"PO-Revision-Date: 2010-11-25 20:02-0200\n"
+"Last-Translator: <alanjas@gmail.com>\n"
+"Language-Team: French\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: activity/activity.info:2
+msgid "FollowMe"
+msgstr "FollowMe"
+
+#: followme.py:53
+msgid "No se encontro ninguna camara."
+msgstr "Ne trouver aucun chambre"
+
+#: followme.py:185
+msgid "No se detecto al robot Butia."
+msgstr "Robot Butia ne trouver"
+
+#: activity.py:72
+msgid "Parar"
+msgstr "Arreter"
+
+#: activity.py:84
+msgid " Calibrar "
+msgstr " Calibrer "
+
+#: activity.py:96
+msgid " Pixeles "
+msgstr " Pixels "
+
+#: activity.py:130
+msgid " Umbral: Rojo "
+msgstr " Seuil: Rouge "
+
+#: activity.py:156
+msgid " Verde "
+msgstr " Vert "
+
+#: activity.py:182
+msgid " Azul "
+msgstr " Bleu "
+
+#: activity.py:216
+msgid "Opciones"
+msgstr "Option"
+
+#: activity.py:224
+msgid " Tamanio de muestra "
+msgstr " Grandeur de enchantillon "
+
+#: activity.py:276
+msgid " Mostrar lineas"
+msgstr " Montrer ligne"
+
+#: activity.py:292
+msgid " Mostrar en pantalla"
+msgstr " Montrer en ecran"
+
+#: activity.py:302 activity.py:405
+msgid "Ocultar"
+msgstr "Cacher"
+
+#: activity.py:306
+msgid "Resolucion"
+msgstr "Resolution"
+
+#: activity.py:383
+msgid "Empezar"
+msgstr "Commencer"
+
+#: activity.py:388
+msgid "Detener"
+msgstr "Arreter"
+
+#: activity.py:400
+msgid "Mostrar"
+msgstr "Montrer"
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..06286a9
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,91 @@
+# FollowMe translation
+# Copyright (C) 2010, Alan Aguiar, Ayleen Ricca, Rodrigo Dearmas
+# This file is distributed under GPL license.
+# Alan Aguiar <alanjas@gmail.com>, 2010.
+# Aylen Ricca <ar18_90@hotmail.com>, 2010.
+# Rodrigo Dearmas <piegrande46@hotmail.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 3\n"
+"Report-Msgid-Bugs-To: alanjas@gmail.com\n"
+"POT-Creation-Date: 2010-11-25 19:55-0200\n"
+"PO-Revision-Date: 2010-11-25 20:02-0200\n"
+"Last-Translator: <alanjas@gmail.com>\n"
+"Language-Team: Italian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: activity/activity.info:2
+msgid "FollowMe"
+msgstr "FollowMe"
+
+#: followme.py:53
+msgid "No se encontro ninguna camara."
+msgstr "Non incontrare nessuna camera"
+
+#: followme.py:185
+msgid "No se detecto al robot Butia."
+msgstr "Robot Butia non incontrare"
+
+#: activity.py:72
+msgid "Parar"
+msgstr "Fermare"
+
+#: activity.py:84
+msgid " Calibrar "
+msgstr " Calibrare "
+
+#: activity.py:96
+msgid " Pixeles "
+msgstr " Pixels "
+
+#: activity.py:130
+msgid " Umbral: Rojo "
+msgstr " Soglia: Rosso "
+
+#: activity.py:156
+msgid " Verde "
+msgstr " Verde "
+
+#: activity.py:182
+msgid " Azul "
+msgstr " Azzurro "
+
+#: activity.py:216
+msgid "Opciones"
+msgstr "Opzione"
+
+#: activity.py:224
+msgid " Tamanio de muestra "
+msgstr " Grandezza de campione "
+
+#: activity.py:276
+msgid " Mostrar lineas"
+msgstr " Mostrare linea"
+
+#: activity.py:292
+msgid " Mostrar en pantalla"
+msgstr " Mostrare in paralume"
+
+#: activity.py:302 activity.py:405
+msgid "Ocultar"
+msgstr "Occultare"
+
+#: activity.py:306
+msgid "Resolucion"
+msgstr "Risoluzione"
+
+#: activity.py:383
+msgid "Empezar"
+msgstr "Cominciare"
+
+#: activity.py:388
+msgid "Detener"
+msgstr "Ritenere"
+
+#: activity.py:400
+msgid "Mostrar"
+msgstr "Mostrare"
diff --git a/pythonAPI/waitforbobot.py b/pythonAPI/waitforbobot.py
index f8fede4..bcd4e27 100755
--- a/pythonAPI/waitforbobot.py
+++ b/pythonAPI/waitforbobot.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
###########################################
# This program is part of butiaAPI Toolkit
-# License: bla bla bla
+# License: GPL
#
# wait a litles seconds for bobot to connect correctly to butia
#
diff --git a/scriptlua.sh b/scriptlua.sh
deleted file mode 100755
index 87cf948..0000000
--- a/scriptlua.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-cd lua
-./lua bobot-server.lua&
-cd ../pythonAPI
-./waitforbobot.py
-sugar-activity -a $SUGAR_ACTIVITY_ID activity.Activity
-kill `ps ax | grep bobot-server | grep -v grep | awk '{print $1}'`