USA
Asked — Edited

Servo Controlled Camera Question

Just a quick question:

I'm having an issue with the face tracking in that if a face moves off screen too quickly, it is, of course, lost. It would seem iRobot's head need to move more quickly to keep up (with a reasonably moving face) but if I set the servo speed over 2 it gets jerky and kind of scary. My frame rate is pretty slow. I don't remember the exact rate but it's under the lowest setting. I have the camera resolution set to 160x120, the lowest res. Would a faster computer help? I'm running it on an old quad-core, win 7 unit. I have an i7 Asus laptop but the vid card went belly-up (I think). I may risk the $70 for a used vid card replacement. I'm assuming the camera is a processor intensive process and that more RAM or better graphics won't help. Thanks:)


ARC Pro

Upgrade to ARC Pro

ARC Pro is more than a tool; it's a creative playground for robot enthusiasts, where you can turn your wildest ideas into reality.

PRO
Synthiam
#1  

I believe your reference or "servo speed" was incorrect. Did you mean the "tracking steps"? I.e. How many steps to increase/decrease while tracking when an object is outside of the grid lines?

Because with servo speed, the higher the number the slower the servo moves. Which is actually what would solve the jerky movement if the steps were increased.

Increasing the steps will increase jerky movements - but you will need to if the face moves too quick. Increasing the servo speed will dampen the jerky movements. I would start with a servo speed of 1, then move to 2, etc. find the most appropriate speed.

PRO
Synthiam
#2  

Oh, i forgot to add how to set the servo speed.

  1. Press CONFIG button on the connection control

  2. Edit the script for the EZ-B #0 Connection

  3. Add something like...


# Init horizontal servo to center
servo(d0, 90)

# init vertical servo to center
servo(d1, 90)

# set servo speeds
servoSpeed(d0, 2)
servoSpeed(d1, 1)

Each time the software connects, that script will run. The script must run for the servo speeds to initialize. The servo positions must be set before the servo speed command takes effect.

#3  

Yes, DJ, you're correct, I had it backward in my head. I have the speed set to 2 (using script). 3, it's too slow, 1 and it's too jerky.

I haven't played much with the "steps". I'll give that a try. Thanks DJ.

#4  

Also, what's the best way to increase the frame rate (through hardware)? Would that not help with better tracking?

PRO
Synthiam
#5  

There is a slide dial to adjust a delay. Ensure it's set all the way to the left.

User-inserted image

The video card doesn't process the recognition algorithm - the video card displays video. There was an update to ARC a few releases ago with performance enhancements for face tracking. I would recommend upgrading to the latest ARC.

Based on your usage, the update to face tracking includes new parameters...

User-inserted image

#6  

Just a thought and question here; once all servo positions and then the speeds are initialized it seems like the servos are now energized and holding position. If you don't need them in that state would it be advisable to release them? I would think this would save power and servo life.

Once released do they have to be initialized again?

I sometimes see my servos jerk when I send a series of release commands to several servos (with sleep commands between the releases). Sometimes they jerk violently sometimes just a twitch, sometimes not at all. Any thoughts on this?

PRO
Synthiam
#7  

When you release a servo, it is no longer holding position. When the servo is re-initialized to hold a position, it will move to the position. The jerk you are experiencing is the servo moving into position. When released, the servo is not holding position so it may have moved. A servo that moves, is no longer in the original position.

Also I highly doubt after a release, that you're putting the servo back in the original position that it was when released. Which means not only is it moving into a position because it had moved due to the weight of... ah i'm not finishing this sentence - it's common sense:)

Find out how a servo works here: https://synthiam.com/Tutorials/Lesson/48?courseId=6

#8  

@Dave Although I haven't yet tested the new camera up/down micro-servo, the head left/right servo did buzz and use juice when it was done tracking. I was lucky though; when the head centered, it seemed to rest in that position. That's why I wrote the script to center the head when finished tracking. No release necessary in my case. You, on the other hand, with those "Danger, Will Robinson!" arms, I can certainly see why you want to release them. BTW, I have one of those digital servos, the Hitec HS 7950TH you used for the arms and modified the controller, I have one barely used if you'd like it. $75 a fair price? It didn't fit the servo housing in the top of the spine.

@DJ Thank for the info. I need to play with the new release a little anyway. I was having trouble with the face tracking after installing it. Dave suggested deleting the camera control and opening a new one. servo speed and slider worked fine.