Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Ar Drone Landing On A Moving Target

Hello.

I am currently trying to make my Ar Drone track a moving a coloured object with the bottom camera and then land on it. How would this be possible in Ez-Script?
I have successfully been able to make the camera track an object but not sure how to land on it while its moving.

Your support is greatly appreciated. Thank you.

Abdullah

AI Support Bot
Related Content
Synthiam
#1  
You definitely wouldn't be able to just hit "land" as that stops it moving forward. you would need to manually command it to descend while moving forward tracking the object. Might be a bit of a feat, but doable I would imagine.

The Drone might have altitude limits that will prevent you from manually landing it. Have to try to know.
PRO
Synthiam
#2  
Yeah, you got it. The drone will land with the land command, but once it starts landing, it'll do its own thing.

You can switch to the bottom camera to detect the object. Ezscript would need to be written to navigate, but that's easy.
PRO
Synthiam
#3  
Creating a script like this would do it... Just change to COLOR rather than GLYPH

Example project: http://www.ez-robot.com/Community/EZCloud/RobotAppDetails.aspx?id=4471

Code:



# use the ar drone's bottom camera
ControlCommand("AR Drone", CameraSelectVertical)

# track any glyph
ControlCommand("Camera", CameraGlyphTrackingEnable)

:loop

if ($CameraIsTracking)

if ($CameraVerticalQuadrant = "Top")

Forward()
Sleep(1000)
stop()

ELSEif ($CameraVerticalQuadrant = "Bottom")

Reverse()
Sleep(1000)
stop()

endif

if ($CameraHorizontalQuadrant = "Right")

Left()
Sleep(1000)
stop()

ELSEif ($CameraHorizontalQuadrant = "Left")

Right()
Sleep(1000)
stop()

endif

if ($CameraHorizontalQuadrant = "Middle" and $CameraVerticalQuadrant = "Middle)

down()
Sleep(1000)
stop()

endif

endif

goto(loop)
#4  
For the latest ARC Software to work, which model or versions of the AR Drone will work with it?
#5  
ARC will work with either the AR Drone 1 or 2. Compared to many available today, neither is very good, but the 2 is significantly better than the 1 as far as consistent control.

Alan
#7  
Many thanks guys I will give try it on the drone. Thanks for the great support and for such a great software.
#8  
I have seen the AR Drone 2.0 for sale at one of the local Barnes & Noble Stores. Does the v2 version mentioned in this thread correlate to the AR Drone 2.0? Also, does ARC work with the newer Parrot B-Bop drones?
#9  
Yes, V2 =2.0
No, Bebop not supported.

Alan
#10  
Thanks much Alan for the clarification...Rick
#11  
If possible ? Please post video of your drone project in flight and landing. Thank You! Rob
#12  
Yes, I would love to see that too !
#13  
Unfortunately, I've tried the code and it seems that my drone is moving away from the target in the opposite direction. I fixed that by changing the direction of movements right() and left() and it seems to follow the target.
But, it doesn't land on the target.

Any suggestions?

Is there anyway to set the altitude of the drone ?

Thanks guys.
#14  
The AR Drone won't fly lower than about 1 meter (as detected by the ping sensor on the underside, so if you have a platform 1 meter up, it will jump to 2 meters altitude when it goes over it). When you give the land command, it immediately drops to 0 altitude. I think what you are trying to do may not be possible with the AR Drone. You may need to use a more sophisticated drone or scratch build with a more sophisticated controller.

For its price, the Parrot Drone was pretty advanced when it came out, but it was an expensive toy, not a high end drone, and it has been surpassed by DJI and 3DR and other companies, and Parrot was never very good at supporting hobbyists who wanted to use the API's. Even their own apps got very little support. They made a lot of promises about new features and dropped all of them when they released the BeBop drone (which is still pretty basic when compared to some of the leaders in the market).

Alan
PRO
Synthiam
#15  
In the loop, use the variables created by the AR drone Movement Panel to detect the altitude. Keep dropping until it reaches the lowest altitude and then send the LAND() command.

User-inserted image


User-inserted image


it'll happen - just won't be perfect.
PRO
Synthiam
#16  
Soemthing like this... although i have no idea what the value for lowest altitude will be. You'll need to check that and adjust it yourself.

Code:



# use the ar drone's bottom camera
ControlCommand("AR Drone", CameraSelectVertical)

# track any glyph
ControlCommand("Camera", CameraGlyphTrackingEnable)

:loop

if ($CameraIsTracking)

if ($CameraVerticalQuadrant = "Top")

Forward()
Sleep(1000)
stop()

ELSEif ($CameraVerticalQuadrant = "Bottom")

Reverse()
Sleep(1000)
stop()

endif

if ($CameraHorizontalQuadrant = "Right")

Left()
Sleep(1000)
stop()

ELSEif ($CameraHorizontalQuadrant = "Left")

Right()
Sleep(1000)
stop()

endif

if ($CameraHorizontalQuadrant = "Middle" and $CameraVerticalQuadrant = "Middle)

down()
Sleep(1000)
stop()

endif

if ($DroneAlt < 1)

# instruct the drone to land
land()

# exit the script
halt()

endif

endif

goto(loop)
#17  
DJ Sures: I have tried the code and I believe it would work perfectly if I can control the speed of the movement of the drone in the script. Basically, what happens is that the drone detects the glyphs/colour etc.. but it moves away from it quickly thus it would not be able to follow the marker on the ground since it moved away.

Is there any variable to set the drone speed within the script?
I have tried Forward(10,3000) and tried other combinations such as Forward(0.5,1000) and this has no effect on the speed of the drone. It still would drive in full speed.

I believe that once I know how to lower the speed of the drone or limit it to a certain value, the project would work perfectly in EZrobot.


Many thanks for your support and looking forward for your positive response.