robocup_knowledge
reo2016/challenge_person_recognition.py
Go to the documentation of this file.
1 ''' colors from printing on screen '''
2 from __future__ import print_function
3 
4 
5 class bcolors:
6  HEADER = '\033[95m'
7  OKBLUE = '\033[94m'
8  OKGREEN = '\033[92m'
9  WARNING = '\033[93m'
10  FAIL = '\033[91m'
11  ENDC = '\033[0m'
12  BOLD = '\033[1m'
13  UNDERLINE = '\033[4m'
14 
15 ''' pose "enum" '''
16 class Pose:
17  Standing = 0
18  Sitting_down = 1
19 
20 ''' gender "enum" '''
21 class Gender:
22  Male = 0
23  Female = 1
24 
25 ''' printing shortcuts '''
26 def printOk(sentence):
27  print(prefix + bcolors.OKBLUE + sentence + bcolors.ENDC)
28 
29 def printError(sentence):
30  print(prefix + bcolors.FAIL + sentence + bcolors.ENDC)
31 
32 def printWarning(sentence):
33  print(prefix + bcolors.WARNING + sentence + bcolors.ENDC)
34 
35 
36 prefix = bcolors.HEADER + "[Person Recognition] " + bcolors.ENDC
37 
38 
39 ''' minimum number of faces found fo proceed with the challenge '''
40 min_faces_found = 2
41 
42 
43 ''' determines if a face is discarded for being too close to another already tracked (in meters, as far as i know)'''
44 face_proximity_treshold = 0.2
45 
46 
47 ''' threshold to consider a person standing up or sitting down, in meters '''
48 sitting_height_treshold = 0.8
49 
50 
51 ''' waypoint that the robot will visit to find people '''
52 waypoint_learning = "person_rec_learning"
53 waypoint_living_room_1 = "person_rec_living_room_1"
54 waypoint_living_room_2 = "person_rec_living_room_2"
55 waypoint_living_room_3 = "person_rec_living_room_3"
56 
57 
58 ''' point in the center of the living room, to filter location of humans '''
59 room_center = {'x':1.365, 'y':0.978, 'z':0.0, 'frame_id':"map"}
60 
61 
62 '''Object types that can be recognized'''
63 object_types=['human']
challenge_person_recognition.printOk
def printOk(sentence)
Definition: reo2016/challenge_person_recognition.py:26
challenge_person_recognition.printError
def printError(sentence)
Definition: reo2016/challenge_person_recognition.py:29
challenge_person_recognition.bcolors
Definition: reo2016/challenge_person_recognition.py:5
challenge_person_recognition.Gender
Definition: reo2016/challenge_person_recognition.py:21
challenge_person_recognition.Pose
Definition: reo2016/challenge_person_recognition.py:16
challenge_person_recognition.printWarning
def printWarning(sentence)
Definition: reo2016/challenge_person_recognition.py:32