Generate waypoints offline

Firmware/software/electronics/mechanics
Post Reply
fs_cs
Beginner
Posts: 2
Joined: Sun Jun 30, 2019 5:07 pm

Generate waypoints offline

Post by fs_cs »

Hi,
I am currently working on designing a path planning algorithm for UAVs. I want to test it via simulation and later test it with a couple of crazyflies. To test my algorithm on crazyflies, can I run my algorithm offline to extract the waypoints of the path and then send them to the crazyflies to execute the mission?. Generating waypoints is done the same as the simulation phase. Still, I think there should be an intermediate step that takes care of the trajectories before the crazyflie processes it, isn't it?.
If you have the experience, please let me know if the above is achievable.
Thanks
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Generate waypoints offline

Post by whoenig »

The Crazyflie has a high-level commander that can generate trajectories on-board if you use a goTo command (assumes zero velocity and acceleration for the goal waypoint).

For simulation, you could use the Crazyswarm (https://github.com/USC-ACTLab/crazyswarm). The simulation does not require any ROS, but is only tested on Linux and Mac. It will simulate the on-board trajectory generation, but there is no physics engine involved, i.e., you would still need to check for collisions and velocity/acceleration violations yourself.
fs_cs
Beginner
Posts: 2
Joined: Sun Jun 30, 2019 5:07 pm

Re: Generate waypoints offline

Post by fs_cs »

Thank you for your reply. I used Crazyswarm in my preliminary experiments(simulation only). I supplied each UAV with the points using the goto function (It took care of the trajectories). But I am facing a problem with my implementation.
I wanted to display the path and movements of the UAVs in the realtime while the algorithm is running. So I used threads as follows:
I created a thread for each crazyflie. Let the UAVs' threads execute while having an additional thread responsible for recording the movements of each UAV and showing it on the matplotlib figure.
Eventually, I was able to display the movement correctly, but the movement is showing sequentially. On top of that, the threads slowed the performance and the drawing.
If I can enhance my current implementation, the best solution is to stick with crazyflie.

Any advice would be appreciated.
shoukot100
Beginner
Posts: 2
Joined: Wed Jun 16, 2021 9:10 pm

Re: Generate waypoints offline

Post by shoukot100 »

very nice
Post Reply