Asked — Edited
Resolved Resolved by DJ Sures!

Color Recognition

Hi All,

Is there a step-by-step tutorial on how to get my robot to respond to color? I've seen the tutorials, but can't get it to work. I want to have Roli follow a red ball as was demonstrated with the AR Drone by DJ Sures.

I added the Camera Controls to the project. Selected (red) which is the default color. Under 'Tracking Types' I've selected Color.

I've attached a screen shot of the configuration window. Are my settings correct?

Tom

User-inserted image


ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

#17  

@DJ... I know he is trying to do movement tracking... I just wanted to see if his set up would at least camera track.... What Tom is trying to do should work....

PRO
Synthiam
#18  

You're right, it should - Sounds like he's made great strides in other areas already. I'm certain he will figure this one out.

The biggest challenge is that ppl believe it to be more difficult than it really is and over think it. He will have an eureka moment:)

My tutorial covers everything anyone would need for color movement tracking

#19  

SUCCESS! - but I don't know why!

By now I'm sure you're wondering what's going on here. I can assure you that all of the settings you mentioned in the Tutorial sent yesterday were the same. In fact, I double checked everything this morning and it did not work at all. I then triple checked everything. No response. I was about to post the results.

BTW - I'm using a red pool table ball. It's about 2.5 " in diameter.

Finally, I decided to load the Roli example project, made the necessary changes to the Camera controls (as mentioned in numerous posts above) and Roli worked!

Then I went back to my original project and it worked! But the original project didn't work 5 minutes earlier. You get the point. I'm trying to eliminate variables to figure out where the problem is. I'm going back and forth between projects and don't see any differences in the settings. Obviously there's a setting I missed somewhere but I can't figure out what the heck it could possibly have been.

OK, so now Roli moves forward. He's not so smooth moving left or right (jerky). I've been changing some of the settings (grid lines, brightness, Motion Delay - now at 100 - but have moved it up to 400.) I have also changed speeds in the H Bridge PWM Movement Panel. So any advice here would be appreciated. Perhaps I'm expecting too much for this type of robot? I saw how smoothly the AR Drone responded in your video. I certainly understand that Roli can't move up and down.

I sure would like to know what the problem is/was. I'm not confident this will hold. Any other suggestions. Thanks for all of your help.

Tom :)

PRO
Synthiam
#20  

That's awesome! It's new years for me today - so I will be on the mountain running the slopes:) Now that you have gotten this far, my work here is done - for now! Enjoy the day and the time with your Roli:D

#21  

@DJ.... I agree... I was guilty of way overthinking ARC when I first started.... I just could not wrap my head around "a multitasking controller/software"... You used one control then another. Just like all the other robot controllers... Surely you can't run more than one control at a time, right? To say that I was blown away when I found out you can is an understatement.... Everything I used up until ez robot was a simple download to the microcontroller... The code ran as a single process... If fact when I using the Basic Stamp, I had to check sensors and such in between motor pulses.... :) You had to do it this way or else you had to stop the robot then check your ping or IR sensors and then drive the motors again.... Later on I started using the basic Atom, which at least had interrupts.... Still light years behind the EZB and ARC....:)

#23  

For the jerky movement, I think tweaking the PWM speed in the Movement Panel and adjusting the motion delay are going to be key. Also the surface you are on will make a huge difference in Roli's movements. Even after tightening the tread (by lowering the wheels) I still get a lot of wheel slip when turning on carpet vs floor, so I would need higher PWM and higher motion delay in that situation.

You should check your existing project for scripts and objects that might be issuing contradictory commands. For instance, i put a ping sensor with a ping radar control on the front of my Roli. If I were to get too close to it while trying to position the ball for tracking, my Roli would stop, move backwards, and turn with no relation to the direction the tracking was trying to move it. As the two control contradicted, it might jerk back and forth, or just stop altogether.

I was going to make a simple project this afternoon with just a Movement Panel and camera this afternoon to see if I could help, but it seems you got to that point already with some success, so now it is just a matter of tweaking the parameters.

My only other suggestion is that you could change from color tracking to multi-color tracking which allows you can fine tune the color being detected to the actual object you are using.

Alan

#24  

Hi Alan,

Thanks for the info. PWM speed and motion delay are key. I also discovered the issues with carpeting vs. floor.

Tom