Parrot-Developers / olympe

Python controller library for Parrot Drones
https://developer.parrot.com/docs/olympe/index.html
BSD 3-Clause "New" or "Revised" License
80 stars 36 forks source link

moveByEnd() not triggered when MoveBy() is overridden by second MoveBy() Command #20

Closed myke239 closed 1 year ago

myke239 commented 4 years ago

I've created a simple event listener to catch the event message moveByEnd()

` @olympe.listen_event(moveByEnd())

def onmoveByEnd(self, event, scheduler):

    print("MoveBy Ended")

    print(

        "dX = {dX} dY = {dY} dZ = {dZ} dYaw = {dPsi}".format(

            **event.args

        )

    )`

The event message is only triggered though once the last moveby command is completed. In the API documentation is lists that the moveByEnd() message will be sent when either a moveBy() command is completed or cancelled by another moveBy() command.

When I run multiple moveBy() commands a second apart, I only get one event message after the final moveBy is completed.

` drone(moveBy(20,0,0,0))

        time.sleep(1)

        drone(moveBy(-5,0,0,0))

        time.sleep(1)

        drone(moveBy(0,10,0,0)).wait().success()`

outputs: `MoveBy Ended

dX = 12.765362739562988 dY = 9.842416763305664 dZ = -0.010810792446136475 dYaw = 3.0615568848568603e-41`

ndessart commented 1 year ago

I'm closing this as it's not an issue with Olympe nor its documentation but rather with the drone firmware.

Feel free to create a post on the Parrot developer forum for a follow up on this issue. Don't forget to mention your drone model and version if you are still observing this issue.

Thanks