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

About move3D command #13

Closed
danielbai opened this issue Jul 8, 2014 · 2 comments
Closed

About move3D command #13

danielbai opened this issue Jul 8, 2014 · 2 comments

Comments

@danielbai
Copy link

Hi puku0x,

Your code did help me a lot with my current project. What you did is really a nice work. I have a question about moving control commands.

If I send 'ardrone.move3D(1, 0, 0, 0)' once, how far will the drone move forward? Do I need to keep sending this command in a loop in order to keep it moving ahead? I have tried to do it, the drone does move but it moves slowly and shakes. I mean it can't move smoothly. I would appreciate it if you could help me. Thank you.

  • Daniel
@puku0x
Copy link
Owner

puku0x commented Jul 9, 2014

Hi Daniel,

Thank you for your comment.

AR.Drone doesn't move if you send move3D() just once, you should keep sending it.

It is also important to keep the interval of sending the command over 30[ms].
When your drone shows strange behavior, you should decrease the frequency of sending command.

while (1) {
    // Key input
    // NOTE:cvWaitKey doesn't keep 30ms when a key is pressed !
    int key = cvWaitKey(30);
    if (key == 0x1b) break;
    // Sending a command
    if (key == up) move3D(1,0,0,0); // go forward
    msleep(30);     // Like this, waiting 30[ms]
}

Regards,
puku0x

@danielbai
Copy link
Author

Hi puku0x,

Thank you very much, you really helped me solve a big problem!

Sincerely,
Daniel

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