Set max Speed for moveBy

Hello everybody,
I have been playing around with olympe for a school project and I would like to set the max speed for the moveBy. To do that, I tried to set the maxTilt, wich works just fine, but the drone ignores the maxTilt setting during moveBy. How can I set the speed for the moveBy? Is there a other way to achieve this? Here is my code:

DRONE_IP = "10.202.0.1"

if __name__ == "__main__":
    with olympe.Drone(DRONE_IP) as drone:
        drone.connect()

        # Wait for GPS fix
        drone(GPSFixStateChanged(fixed=1, _timeout=30, _policy="check_wait")).wait()

        drone(MaxTilt(5)).wait()
        
        # Wait until Drone is hovering
        drone(
            TakeOff(_no_expect=True)
            & FlyingStateChanged(state="hovering", _policy="wait", _timeout=10)
        ).wait()

        # Fly forward
        action = drone(
            moveBy(800, 0, 0, 0, _no_expect=True)
            & FlyingStateChanged(state="hovering", _policy="wait", _timeout=60)
        )

        # Print Attitude (tilt)
        while not action.done():
            print(drone.get_state(AttitudeChanged))
            #print(drone.get_state(SpeedChanged))

        drone(Landing()).wait()
        drone.disconnect()

Thank you for your help in advance,
Domi

Hi,
I am using Ubuntu 18.04.
And that’s also where I am running the python code. I run it locally where the Sphinx simulation is running.
I therefore connect to the simulated drone with the IP adress.
I am not using Android Studio or Android NDK.

Thank you,
Domi

2 Likes

Hi,

I followed these instructions:
https://developer.parrot.com/docs/sphinx/installation.html
https://developer.parrot.com/docs/olympe/installation.html

Thank you,
Domi

3 Likes

Hi,

The maxTilt setting is used by the drone when flying manually (using the PCMD message or the olympe.Drone.piloting_pcmd method). There is currently no way to control the drone speed using the moveBy or moveTo commands.

Since this has already been requested, we were actually already working on this feature for a future release (I have no ETA for the moment).

Regards
Nicolas

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.