Sabertooth Kangaroo icon Sabertooth Kangaroo Movement panel enabling Kangaroo & Sabertooth encoder-based speed/velocity control, UART/PC serial options, tuning and encoder setup. Try it →
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

Synthiam ARC Pro is a new tool that will help unleash your creativity with programming robots in just seconds!

#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?

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#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~