Skynet is Tracking 16 Bogeys
Incoming!
http://www.youtube.com/watch?v=dXiubArqPQk&feature=digest_wed
The Terminator will surely rise from ExDiv's workshop.
http://www.youtube.com/watch?v=dXiubArqPQk&feature=digest_wed
The Terminator will surely rise from ExDiv's workshop.


Comments
Route training and navigation by map:
See also: AVM Navigator help page, Using of AVM plugin in RoboRealm
Notification:
*What your robot see and how it affect to navigation?
In our case the robot uses only limited sequence of images from camera for
navigation. The AVM Navigator application just tries to recognize images so
that be able to understand robot location. And if you show in route training
process of some image sequence (just lead your robot in "Marker mode")
then in automatic navigation mode the robot should have possibility to see
the same sequence of images without anyone changes. Otherwise AVM Navigator
will not be able to recognize images and it will cause to fail in
localization and navigation.
First in video the robot has received command: "go to the checkpoint" and when robot arrived to the checkpoint then I brought robot back (several times) in different position of learned route. When robot noticed the changes then it indicated that robot was displaced because any commands were not given by robot to his motors however changes were seen in the input image.
Then robot started looking around and localized his current position. Further the robot just calculated path from current position to the checkpoint and went there (and so forth).
-Tommy
See VBScript program and diagram below for more details:
' Get turret control variables flt_base = 10000 rate_v = GetVariable("RATE_V")/flt_base turret_v = GetVariable("TURRET_V")/flt_base turret_Sv = GetVariable("TURRET_V_SPEED") rate_h = GetVariable("RATE_H")/flt_base turret_h = GetVariable("TURRET_H")/flt_base turret_Sh = GetVariable("TURRET_H_SPEED") turret_f = GetVariable("TURRET_FIRE") step_counter = GetVariable("STEP_COUNTER") dX = 0 dY = 0 status = "" turret_v_initial = -80 nvObjectsTotal = GetVariable("NV_OBJECTS_TOTAL") if nvObjectsTotal>0 then ' If any object was found ' Get image size img_w = GetVariable("IMAGE_WIDTH") img_h = GetVariable("IMAGE_HEIGHT") ' Get array variables of recognized objects nvArrObjRectX = GetArrayVariable("NV_ARR_OBJ_RECT_X") nvArrObjRectY = GetArrayVariable("NV_ARR_OBJ_RECT_Y") nvArrObjRectW = GetArrayVariable("NV_ARR_OBJ_RECT_W") nvArrObjRectH = GetArrayVariable("NV_ARR_OBJ_RECT_H") ' Get center coordinates of first object from array obj_x = nvArrObjRectX(0) + nvArrObjRectW(0)/2 obj_y = nvArrObjRectY(0) - nvArrObjRectH(0)/2 ' Get difference between object and screen centers dX = img_w/2 - obj_x dY = img_h/2 - obj_y dXr = 1 - abs(dX*4/img_w) if dXr < 0 then dXr = 0 dYr = 1 - abs(dY*4/img_h) if dYr < 0 then dYr = 0 turret_min = -100 turret_max = 100 reaction = 7 speed_min = 1 speed_max = 100 filtering = 0.7 decay = 0.1 threshold = round(img_w*0.03) sRateH = exp(-dXr*reaction) sRateV = exp(-dYr*reaction) rate_h = rate_h + (sRateH - rate_h)*filtering rate_v = rate_v + (sRateV - rate_v)*filtering turret_Sh = round(speed_min + rate_h*(speed_max - speed_min)) turret_Sv = round(speed_min + rate_v*(speed_max - speed_min)) delta_h = (img_w/8)*rate_h delta_v = (img_h/8)*rate_v if step_counter =< 0 then step_counter = round(exp(-(dXr*dYr)*reaction*0.7)*15) if dX > threshold then ' The object is at left side turret_h = turret_h - delta_h if turret_h < turret_min then turret_h = turret_min end if if dX < -threshold then ' The object is at right side turret_h = turret_h + delta_h if turret_h > turret_max then turret_h = turret_max end if if dY > threshold then ' The object is at the bottom turret_v = turret_v - delta_v if turret_v < turret_min then turret_v = turret_min end if if dY < -threshold then ' The object is at the top turret_v = turret_v + delta_v if turret_v > turret_max then turret_v = turret_max end if else step_counter = step_counter - 1 end if ' Is the target locked? if dX < threshold and dX > -threshold and dY < threshold and dY > -threshold then status = "Target is locked" turret_f = 1 else status = "Tracking" turret_f = 0 end if else ' Back to the center if object is lost if turret_h > 0 then turret_h = turret_h - 1 if turret_h < 0 then turret_h = turret_h + 1 if turret_v > turret_v_initial then turret_v = turret_v - 1 if turret_v < turret_v_initial then turret_v = turret_v + 1 turret_Sh = speed_min turret_Sv = speed_min rate_h = rate_h - rate_h*decay rate_v = rate_v - rate_v*decay turret_f = 0 end if ' Set turret control variables SetVariable "RATE_V", rate_v*flt_base SetVariable "TURRET_V", turret_v*flt_base SetVariable "TURRET_V_CONTROL", round(turret_v) SetVariable "TURRET_V_SPEED", turret_Sv SetVariable "RATE_H", rate_h*flt_base SetVariable "TURRET_H", turret_h*flt_base SetVariable "TURRET_H_CONTROL", round(turret_h) SetVariable "TURRET_H_SPEED", turret_Sh SetVariable "TURRET_FIRE", turret_f SetVariable "STEP_COUNTER", step_counter SetVariable "DELTA_X", dX SetVariable "DELTA_Y", dY SetVariable "TURRET_STATUS", statusIt is easy. You should just use "Object recognition mode" in AVM Navigator module.
First clear the AVM search tree by click on button "Set key image size(New)" and further press "Yes".
Now you can train AVM on some faces like in video below:
Face training demo
When training will be done you should use variables that described below for your VBScript program:
NV_OBJECTS_TOTAL - total number of recognized objects
NV_ARR_OBJ_RECT_X - left-top corner X coordinate of recognized object
NV_ARR_OBJ_RECT_Y - left-top corner Y coordinate of recognized object
NV_ARR_OBJ_RECT_W - width of recognized object
NV_ARR_OBJ_RECT_H - height of recognized object
As example you can use these VBScript programs that was published in this topics:
http://www.roborealm.com/forum/index.php?thread_id=3881#
http://forums.trossenrobotics.com/showthread.php?4764-Using-of-AVM-plugin-in-RoboRealm&p=48865#post48865
So if I would clothe the other garments that have contraster texture it could work just better