Generation of dynamic and real time trajectories #1661
danielcmdeveloper
started this conversation in
General
Replies: 1 comment
-
Can you run the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are trying to generate dynamically in real time (at the moment of flight) a trajectory that is also generated dynamically.
In this case what we have done is to establish points to which the CrazyFlie must move until it reaches a point B from a point A (You can see the desired in the following image).
To generate the dynamic trajectory, what is done is to generate new points that define it and establish the movement with send_position_setpoint of the Commander class. Below is the code that processes and dynamically generates these points.
The output of this function generates a series of points that define the trajectory. Below is an example of the points that are generated until reaching the destination (1,5,1).
(1, 1.0, 1.0, 0.1)
(1, 1.0100250626566416, 1.0, 0.1)
(1, 1.0200501253132832, 1.0, 0.1)
(1, 1.0300751879699248, 1.0, 0.1)
(1, 1.0401002506265664, 1.0, 0.1)
(1, 1.050125313283208, 1.0, 0.1)
(1, 1.0601503759398496, 1.0, 0.1)
(1, 1.0701754385964912, 1.0, 0.1)
(1, 1.0802005012531328, 1.0, 0.1)
(1, 1.0902255639097744, 1.0, 0.1)
(1, 1.100250626566416, 1.0, 0.1)
(1, 1.1102756892230576, 1.0, 0.1)
(1, 1.1203007518796992, 1.0, 0.1)
(1, 1.1303258145363408, 1.0, 0.1)
(1, 1.1403508771929824, 1.0, 0.1)
.................................................................
.................................................................
.................................................................
(1, 4.969924812030075, 1.0, 0.1)
(1, 4.979949874686716, 1.0, 0.1)
(1, 4.989974937343359, 1.0, 0.1)
(1, 5.0, 1.0, 0.1)
In order to send the points to the drone, this portion of code is used:
In this case it is observed that the drone does not respond and does not perform the lateral flight. It only makes a small movement and does not continue with the movement.
What can this behaviour be due to?
Is there something we are doing that the CrazyFlie can't execute?
Thank you very much in advance.
Best regards
Daniel Caballero
Researcher at the University of the Basque Country
Beta Was this translation helpful? Give feedback.
All reactions