refactored headTracking code?

Hi

I am trying to make face tracking working again on my InMoov. 

Ale pointed me to this jar:  http://mrl-bucket-01.s3.amazonaws.com/current/myrobotlab.jar

but then the

i01.headTracking.xpid.setPID(,,)

function did not work anymore

changed that to:

i01.headTracking.pid.setPID("x",,)

and it runs without throwing an error. I get the square around my face in opencv but my servos do not respond to my movements. I use this script:

headPort = "/dev/ttyACM1"
mouthPort="/dev/ttyACM1"
 
i01 = Runtime.createAndStart("i01", "InMoov")
 
head = i01.startHead(headPort)
 
headTracking = i01.startHeadTracking(headPort)
 
i01.headTracking.pid.setPID("x",10.0,5.0,0.1)
i01.headTracking.pid.setPID("y",15.0,5.0,0.1)
 
i01.headTracking.faceDetect()
 
Ale told me he's busy and asked me to try here for help
 
Juerg
Alessandruino's picture

Hey juerg...looked inside

Hey juerg...looked inside InMoov service and updated it to use PID2 instead of PID... you will need to replace the current jar you are using with latest one you find at the same link...

http://mrl-bucket-01.s3.amazonaws.com/current/myrobotlab.jar

let me know if it solves your issue...

Ale

 

juerg's picture

Hi Ale tried

Hi Ale

tried i01.headTracking.pid2.setPid(10.0,5.0,0.1)  --> error
tried i01.headTracking.pid.setPid2(10.0,5.0,0.1)  --> error
 
so only
i01.headTracking.pid.setPid("x",10.0,5.0,0.1) 
 
throws no error but also does not move the servos (servos are attached, I can move them through their tabs control).
 
Juerg
Alessandruino's picture

ehi juerg...are you using

ehi juerg...

are you using the last jar i linked? ...it's different from the other one...

btw.. in the future only this will work :

i01.headTracking.pid.setPid("x",10.0,5.0,0.1) 

Ale

juerg's picture

mrl, yes, using the latest

mrl, yes, using the latest one you pointed me to

Fan told me somebody visiting.. Get a "0 y limit out of range" error from python when I move.

juerg's picture

Is faceTracking in the latest

Is faceTracking in the latest build now considered as working or does it need an update. Would like to test my odroid xu4 board to see whether it's fast enough for normal movements.

I can get the picture and the frame around my face but no servo action when moving out of focus. Is it a odroid (armv7)  problem only?