Setting and Updating Velocity
Posted: Wed Jan 06, 2021 10:17 pm
Hello and Happy New Year!
I'm currently using a Crazyflie 2.1 with the lighthouse deck and positioning system. I have limited python knowledge (I'm still learning!) and have been looking for a way to use the Python API to accomplish my goal. I'm trying to implement a control law (shown below) which sets each velocity component to a gain multiplied by the tracking error of the drone, or the current position minus the desired position.
An example of this would be such as: Velocity_x = -(gain)*(x_current - x_desired)
My main question is how to set the velocity using Python. I know how to obtain the Crazyflie's current position but how does one set the velocity in the x, y and z directions using the Python API? This velocity would need to be continually updated throughout the flight as the crazyflie's current position is changing.
Thank you for any assistance you can provide.
I'm currently using a Crazyflie 2.1 with the lighthouse deck and positioning system. I have limited python knowledge (I'm still learning!) and have been looking for a way to use the Python API to accomplish my goal. I'm trying to implement a control law (shown below) which sets each velocity component to a gain multiplied by the tracking error of the drone, or the current position minus the desired position.
An example of this would be such as: Velocity_x = -(gain)*(x_current - x_desired)
My main question is how to set the velocity using Python. I know how to obtain the Crazyflie's current position but how does one set the velocity in the x, y and z directions using the Python API? This velocity would need to be continually updated throughout the flight as the crazyflie's current position is changing.
Thank you for any assistance you can provide.