Closed Ciiciicii closed 1 year ago
When you upload the second trajectory, the offset needs to be adjusted to the length of the previous trajectories (think of it like an array, where you are responsible to decide at which offset you are storing something).
cf.uploadTrajectory(1, traj1.n_pieces(), traj2)
cf.uploadTrajectory(2, traj1.n_pieces() + traj2.n_pieces(), traj3)
...
Thank you so much for the response. The Crazyflie now follows the two trajectories. I would suggest to add this information to the Crazyswarm documentation as a guide for other users.
Hi, I am trying to upload two trajectories to the Crazyflie, where the first trajectory moves diagonally upwards and the second trajectory moves the Crazyflie backwards at constant altitude. The code that I used to upload the trajectories are as follows:
The code for executing the trajectories and landing are as follows:
The code works as intended in the simulation. However, in actual testing, the Crazyflie moves backwards after hovering which puts it out of bounds of the LPS system. Are there any issues with my code? Thank you so much!
Intended path:
Actual path: