Asked — Edited

Need Guidance With Camera Tracking

So, I've gotten my wireless camera I bought from EZ Robot temporally mounted on top of the brain of my B9 and powered from the 3rd EZB I've got mounted up there. That makes it about 6 feet above the ground and pointed down to capture movement as people walk past. The idea is to have the radar section swing left or right and follow the movement. I had no problem setting it up and having ARC recognize it after adding the camera control. I got a good clear picture from the camera with little noise. So far so good.

A couple more things: the radar section the camera is mounted on is powered by a small DC gear motor and a H-bridge that is hooked to two of EZB's digital ports (one for each direction of the motor) and also a third for a PWM. So, this being a H-Bridge set up I added the 4 Wire H-Bridge Movement Panel and assigned the proper digital ports for left & right movement. I can press each direction arrow in the panel and get the radar to swing left and right smoothly so I know it's connected and working.

The problem I'm having is that after setting up what I think is the proper settings in the camera control panel I cant get the radar section to follow movement properly. It will notice movement to each side and start to turn in that direction but quickly stop. I can get it to follow me across it's radius if I move very slowly and wiggle around a little but it's a stop and go process. Also it seems to get distracted and focus on other things like stuff laying on the workbench. Almost like he has the attention span of a 1 year old kid that's board with me.

I see there are several settings within the camera control panel that can be adjusted. After tinkering with a few of them I did get better response and tracking but nothing close to what I see in DJ's videos. I have "Motion" checked in the Tracking section and in the Config section I have "Enable Movement Tracking" checked with only the "Allow left/Right Movement" checked.

Does anybody have any suggestions on how to adjust the settings to get my tracking smoother and follow motion of a person walking past better? I'm not sure what to do with the cross hairs of the grid, Motion Delay in the Config area, Tracking speed and the two sliders in the Motion section that adjusts Movement sensitivity and Object Size. Then there is the "Check Every ? Frames" box. I'm getting flustered with all the choices with no real results.

Any advice is welcomed.

Thanks, Dave Schulpius


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

PRO
Synthiam
#9  

Oh, I should have paid more attention. You're using the "Movement" option instead of "Servo" because you have created your own giant servo. The servo Track Relative won't help you because the Movement HBridge does not have an idea of what location the robot is looking.

I was just thinking about something. You know how your body swivels with an HBridge and a POT? That's a giant servo, essentially. What if we helped you turn it into a servo? That way, you won't need any code in ARC... You would be able to simply use it as a servo.

I'm thinking of one of two options..

  1. Connect the HBridge to the guts of a servo. i.e. replace the motor of a servo with an HBridge.

  2. Use an embedded microcontroller (i.e. arduino) to simulate a servo using your existing POT and HBridge.

Let me take a look in the lab and see if I can come up with something for those two. This will simplify your project a great deal and benefit others who are doing the same.:)

PRO
Synthiam
#10  

In continuation from my last post, this guy did what I mentioned as option #1...

He connected the motor leads from the servo PCB to his HBridge..

The issue is with jitter. I assumed that would be a problem because you cannot adjust the sensitivity. However, if you used the servo AutoRelease Control, combined with a ServoSpeed() setting of around 3 or 4, it would be less noticeable.

PRO
Synthiam
#11  

I know I know... Super guilty for bouncing off topic. However, it's okay:) It is someone relevant because it will aid in setting up more functionality for your waist and camera tracking.

This guy did a neat idea... The wiper motor is controlled by an HBridge. He kept the servo only for the internal POT. The servo has the motor removed, and is only using the POT. This way, the servo PCB controls the HBridge and references it's position by an ingenious relationship between the motor and servo POT.

PRO
Synthiam
#12  

Oh geez, now we're even getting easier.. Check out this product: http://www.robotmarketplace.com/products/0-SHB-01.html

It's an HBridge and servo board all in one. Geez, can't get any easier than that:D

www.robotmarketplace.com/products/images/0-SHB-01.jpg

Quote:

Add this servo amp H-bridge and a 5K potentiometer to any small motor, and you can turn it into an R/C style servo!

Control = R/C control 1.1mS - 1.5ms - 1.9ms Channels = 1 (single motor controller) Voltage = 4.8vdc - 6.0vdc Continuous Current = ~2amps/6.0vdc (estimated) Peak Current = 4.8amps/6.0vdc

#13  

I am working on exactly this issue right now. The only difference is that I am trying to get the bend at the waist to be the "X" axis for camera tracking. I posted a question about that a few weeks ago. That link looks like a good solution except that I am working with 12v and a 5 amp motor. I will post a video if my workaround actually works out.

#14  

Thanks for all the tips and guidance DJ. After working and testing this setup all day I took a break and saw your suggestions and links. Wow, it's an honor to have you going to "the lab" for me (and of course others that will be trying this). Again, Today after getting to know all the reasons why the motion detection is having trouble with the camera mounted inside the bubble I agree that a solid mounted servo and the Relative position setting would be the way to go. I'm just about out of fight for today and will give this more thought tonight as I dream about this stuff. ;) Anyway, I may just scrap using this in my robot as I'm having other problems also.The camera is causing one of my 3 Bluetooth connections to disconnect at times. Not sure if it's just because I kept changing settings in the camera control but once I removed all the camera equipment and it control in ARC the disconnects stopped. Oh well, tomorrow is another day. We'll see what it brings.

Danger, I love your description of a mad scientist and his creation walking up behind him. I watched my vid again and that's exactly how it looked. It had that bad "B" film feel and look to it. :P As far as your build is concerned, maybe you should switch to a servo for you radar section. Seems like EZB is better able to use camera tracking with a stationary servo then the movement controll of an H-Bridge. At least in the set up we're using. :(

#15  

Just a thought; I do have a pot already installed and attached to a ADC port on one of the 3 EZB boards for poison of the radar. Can I use this feedback info somehow to so I can use the servo Relative Position feature instead of the h-bridge movement in camera control? Then I can mount my camera on a fixed part of the robot without changing to a servo or buying a new interface board. Just wondering. Here's a couple pics of my set up:

User-inserted image

User-inserted image

#16  

Dave, I don't know if this helps you or not, but here is what I'm doing.
As I said, I am working on the waist section. Getting a servo big enough to lift the entire top half of him is out of the question for me. If you look at the second video that DJ posted on this page; I tried that a while ago. I couldn't get it to work. I am doing a similar thing but with mechanical connections, rather than electronic.

I don't know how easy it is to make out in the picture. The servo is connected to the bottom plate. The little push buttons are connected to the top. They trip the relays on the H Bridge and the motor (not visible on the bottom) moves the top plate. I am kind of at a "proof of concept" stage now. I will be modifying the head of the servo with some sort of a larger paddle, and there is a little slack in the buttons, but it works surprisingly well right now. The top plate follows the servo exactly, with no hesitation or flutter. When it gets done, I will post a video.

More moving parts do create the potential for more problems. I am a little concerned about that, but until a better work around comes along, I intend to go with this and make a similar setup to turn the radar.

It does save plugs on the EZ-B using one servo instead of an H Bridge and feedback pot. It also completely eliminates the chance of a voltage spike feeding back from the motor.

I am not sure if you could even work this sort of a setup into your system, but it might be food for thought.

User-inserted image