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

Run Takeoff Example Fail #301

Closed
dangviethieu-hntv opened this issue Mar 4, 2018 · 2 comments
Closed

Run Takeoff Example Fail #301

dangviethieu-hntv opened this issue Mar 4, 2018 · 2 comments

Comments

@dangviethieu-hntv
Copy link

I ran take_off example and have issue: "Vehicle not ready to arm"
But I ran fly_mission example successfully.
Anyone can help me !!!

@dangviethieu-hntv dangviethieu-hntv changed the title Run Example Takeoff Fail Run Takeoff Example Fail Mar 4, 2018
@hamishwillee
Copy link
Collaborator

Best place for support queries is Slack - see https://docs.dronecore.io/en/#getting-help

Both examples take off in the same way, and will exit if not ready to arm. Probably something changed between the examples - e.g. you lost GPS. You can find out what is blocking arming by running a health check. There is some information in this in https://docs.dronecore.io/v/develop/en/guide/taking_off_landing.html#taking-off

@shakthi-prashanth-m
Copy link
Contributor

@dangviethieu-hntv , as suggested by @hamishwillee , replace if by while.
Vehicle may not be ready when checked in the first time.

// Wait until health is OK and vehicle is ready to arm
while (telemetry->health_all_ok() != true) {
    std::cout << "Vehicle not ready to arm ..." << std::endl;
    std::this_thread::sleep_for(std::chrono::seconds(1));
}

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

3 participants