I've been working with Crazyflie2.0 platform for a while in a project and have a few questions. I am currently using the repo in the link https://github.com/wuwushrek/sim_cf/tre ... -uav-final with a bunch of my code on top of it.
To explain briefly, in my project I will control a swarm of crazyflies from a master computer which will work as a ground station. The ground station knows where each crazyflie is, where they are going at any moment, their path and various missions assigned to them and so on... During the execution of simulation, the crazyflies have risks of collision (since I did not use the planner of actual Crazyflie stack, I used OMPL). Consider them as that they are going on line segments, which are collision free against static obstacles but not against each other. My problem is at this point.
I've been observing how the motion commands were implemented in ROS and Python and through several experiments, I realized that ROS Services (in implementation of such as goTo or takeoff) are not preemptable. Even though I publish some messages to /cmd_hover for safety for a short instance to avoid crazyflieXcrazyflie collision and observe the crazyflie responds to it, right after executing that safety measure the crazyflie tries to reach its next goal/waypoint in its path more aggresively to make it in time, which is given by duration element of the corresponding ROS Service. I also tried to use /cmd_vel only, but it is a simulation oriented topic, so I guess its not a surprise that it did not work at all - they stood still despite continuous cmd_vel publishes.
- Is there any way for me to control multiple Crazyflies within ROS and Python stack in real time? I am running out of ideas currently.
- There was a matlab file for human avoidance. I also watched the video of it in execution. The idea is to generate a repulsive force to avoid collision, right? How can I use that idea in Crazyflie ROS stack? Its a quite efficient idea.
- I used OMPL in motion planning since it gives a more-or-less near optimal paths in a few seconds (per crazyflie), I may use its optimization structures but it puts a computational workload on the simulation and I am quite poor in terms of performance. In fact, in the actual crazyflie stack I cannot fly more than 2 crazyflies in SITL mode developed by wuwushrek in this forum. Thanks to his further modifications on SITL & Gazebo communication, I can fly 4 and sometimes more (if my pc is in good mood )