MOVEBYEND callback not received after repo sync


#1

Hi, I have just updated the Bebop2 SDK to the latest version (3.10.1) and rebuilt my code.
After the update (I didn’t change a single line of code in my test program), I noticed that the MOVEBYEND callback is not sent anymore as a response to a sendPilotingMoveBy.
Has anybody experienced the same problem? Is there a way to get the callback again or, is there a new way to know if the bebop 2 has reached the commanded position / relative displacement?
Alternatively, how can I roll back my copy of the SDK to an older version? (I am sorry but it’s quite urgent).

Thank you in advance for your help.

Product: Bebop 2
Product version: [4.0.3]
SDK version: [3.10.1]
Use of libARController: YES
SDK platform: Unix
Reproductible with the official app: NO


#2

Hi,

I’m pretty sure to have tested the MoveBy with the 3.10.1. I’ll try to test it again soon and let you know.
You’re sure that you never receive a moveByEnd event? Does your drone moves according to the moveBy commands you are sending?

Best regards,
Djavan


#3

No, you’re right… it works perfectly.
I made a simple test program and I have received all the moveByEnd events as well as the “flying state changed” events. Now I am trying to figure out why I can’t make them work in the software I am developing.
Now it’s past midnight here… I will try to debug my code in the morning.
Anyways, I have got just a doubt about how I am doing things: I am trying to make the bebop2 do an indoor flight plan. To do so, my software should send the first relative movement command, then it should wait for the moveBy event, then send the second command, wait for the second event and so on.
To block the main thread I use a mutex and a condition variable. Do you think that the “wait_for” instruction that I put in the main thread could block the sdk callback too? If so, what’s the best way to wait for the event to be triggered?

Thank you so much,
e.


#4

I wouldn’t sleep / block at all. Let your main thread do that through it’s main looper and then just process the callback raised by the SDK.

If you must block in your main thread then do it with a sleep(1) or similar in a loop.


#5

Hi,

I totally agree with @synman, I would definitely not block the ui thread.
Why don’t you just send the moveBy command, in the moveByEnd callback send a new one.
Due to this thread, I’ve tested and confirmed a similar bug (maybe not the same): be sure to avoid sending a second moveBy command before the first one finishes if you use the method I described earlier.

Best regards,
Djavan


#6

Hi,
I did as @Djavan suggested (now I send the moveBy command in the moveByEnd callback) and it works like a charm. Thank you!


MoveByEnd callback not working properly
#7

@elBarto Hi, can I know how did you code the callback event “MoveByEnd”? I’m using this respiratory https://github.com/al3Co/BebopDrone which is and edited version of the main katarina Library, https://github.com/robotika/katarina the developer included MoveBy function. However I didn’t know how to use MoveByEnd event.


#8

Hi,
if you have already registered the callback “ARCONTROLLER_Device_AddCommandReceivedCallback”, then you have to check the value of “commandKey”.
If (commandKey == ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGEVENT_MOVEBYEND), here you can send the next waypoint.
Look at the example here:
http://developer.parrot.com/docs/reference/bebop_2/index.html#relative-move-ended

Let me know if it is clear enough (I’m sorry for the short answer but I am in a bit of a hurry. I will have more spare time during the weekend)…


#9

I managed to control the MoveBy functionality by putting a time.sleep(sec) function after each one, it is currently fairly sufficient for my project - an autonomous indoor navigation plan and autonomous object tracking-. Of course the use of moveByEnd event would give me a better control on my drone however I don’t know how to register events or modify the library I’m not on that level :joy:
Thank you for your reply