Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto take off not working #1

Open
FlyingLeg opened this issue Jan 8, 2014 · 5 comments
Open

Auto take off not working #1

FlyingLeg opened this issue Jan 8, 2014 · 5 comments

Comments

@FlyingLeg
Copy link

I have tried your example and tried setting the mode and the thing will not take off.

@owenson
Copy link
Owner

owenson commented Jan 9, 2014

No it doesn't - I havent had time to fix it / find the problem. I think you have to set a current mission waypoint and turn on auto mode.

@FlyingLeg
Copy link
Author

Thanks for the quick response. I tried what you have suggested. Sadly, it didn't work I lost communication and cannot reopen the port. If I make any progresses I will post it here.

@FlyingLeg
Copy link
Author

I have had success with the take off. I think the problem is with the gps. If I connect to MissonPlanner first and then instantly disconnect it runs. If I run the script without first connecting to missonplanner the waitforgps errors out.

here is the simple script I have been testing.

import ardupilot as ardupilot

ac = ardupilot.ArduPilot("COM3", 57600)

ac.waitGpsFix()
print "Gps Locked..."
print "Current location:"
print ac.getLocation()

ac.takeoff(20)
ac.flyTo(100,100,20)

ac.arm()

print "Is the copter armed:"
print ac.isArmed()
print ac.getMode()

ac.setMode("AUTO")

even though the ac.isArmed is returning false.

@owenson
Copy link
Owner

owenson commented Jan 10, 2014

Great thanks for fault finding on this. If you get it working properly and want to submit a pull request then I'll commit it to master.

@FlyingLeg
Copy link
Author

Sounds good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants