Asked — Edited

Ar Drone Colour Tracking

Hi,

I tried the colour tracking in the ar drone v2. It works perfectly well. But the problem is, the drone comes racing towards the object as close at it can get. Can you tell me what I can do so that the drone stays a little bit far away from the coloured object always.

Thanks & Regards Manoj


ARC Pro

Upgrade to ARC Pro

Unleash your robot's full potential with the cutting-edge features and intuitive programming offered by Synthiam ARC Pro.

#9  

repeatuntil($i=10) if($CameraObjectWidth > 70) stop() endif endrepeatuntil

i used repeat because I want it to continuously check it.

#10  

Hi Dj,

I am on a vacation. I will upload a video once I am back.

#11  

What is your variable $I?

Is that the Height?

PRO
Synthiam
#12  

This is what you need...


:loop

  if($CameraObjectWidth > 70)
     stop()
  endif 

  Sleep(100)

goto(loop)
#13  

$i is just a loop variable for infinite loop. You can use the script as suggested by DJ .. More clear. Thank you.

#14  

That really helps me, thank you DJ and manoj~