robotika / katarina

Parrot drone Bebop
MIT License
75 stars 33 forks source link

Hovering #1

Closed daqo closed 9 years ago

daqo commented 9 years ago

I wonder to know what mechanism do you use for hovering. Thank you so much.

m3d commented 9 years ago

It is the ARCOMMANDS_ID_ARDRONE3_PILOTING_CMD_PCMD, i.e. drone.update(cmd=movePCMDCmd(True, 0,0,0,0)) ... I should add hover() function

daqo commented 9 years ago

Thank you. So I guess I just need to do drone.update(cmd=movePCMDCmd(True, 0,0,0,0)). Right? What' the purpose of ARCOMMANDS_ID_ARDRONE3_PILOTING_CMD_PCMD?

daqo commented 9 years ago

I am working on a C library For Bebop. Everything looks ok but I have problems with hovering.

m3d commented 9 years ago

You may try also False for the first parameter. According to ARDrone3 SDK the first flag is "Boolean flag to activate roll/pitch movement", but it is night here so I cannot test it now :(.

m3d commented 9 years ago
daqo commented 9 years ago

Thank you. Basically, when I issue my hovering command to the drone, drone execute that with some delay. Here is my C function for hovering:

void ARDrone3SendHoverCommand(DEVICE_MANAGER_t *deviceManager)
{
    deviceManager->dataPCMD.active = 1;
    deviceManager->dataPCMD.roll = 0.0;
    deviceManager->dataPCMD.pitch = 0.0;
    deviceManager->dataPCMD.yaw = 0.0;
    deviceManager->dataPCMD.gaz = 0.0;
    deviceManager->dataPCMD.heading = 0.0;
}
daqo commented 9 years ago

Yes I do trimming at the beginning.

m3d commented 9 years ago

The delay is after takeoff or even if you fly forward, for example? The start takes few seconds and then it turns in hovering state automatically. Do you judge the delay by drone motion or by confirmation of "flying state changed"?

daqo commented 9 years ago

So if I fly forward and then issue a hover command, it will take some time for drone to stop.

m3d commented 9 years ago

Is it just hover that is delayed or all commands? I.e. isn't it some problem in buffering commands? Can you try this Python version? Same results?

daqo commented 9 years ago

@m3d my problem is fixed now. Thank you.

Another question, will drone send us back data after we send it piloting data (such as takeoff, land, pcmd, ...)?

m3d commented 9 years ago

OK, let's close this issue and start new one ... with more details. I do not know what do you mean ... the drone is sending data as long as you are confirming ping-pong messages (that was my impression).