AI-deck and P2P

Discussions about the AI-deck
Post Reply
jaakko
Beginner
Posts: 2
Joined: Tue Jun 01, 2021 6:13 am

AI-deck and P2P

Post by jaakko »

Hi.

I am working with Crazyflies, and my setup is the following: Loco position system and a couple of Crazyflies with loco decks and AI-decks. My goal is to work with swarms, make collision-free algorithms, etc. I have implemented a centralized system running on Python with multiple Crazyflie with loco deck and tested potential field path planning algorithms with that system. Still, I am curious to investigate fully distributed systems. For example, two CFs start from points A and B, and they have to go to each other starting positions without colliding. Currently, communication is via Crazyradio, and the code is written in Python and run on my laptop. But I want to drop out the laptop so that CFs talk to each other and calculations are made onboard.

AI-deck provides lots of calculating power and WIFI module. Does it make any sense to try to develop p2p communication between Crazyflies using AI-deck’s WIFI? And is that even possible or reasonable to change the centralized system to distributed using AI-deck?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: AI-deck and P2P

Post by arnaud »

Hi,

This is an interesting project and it sounds good that you got something working with your laptop first, it means that most is already done and it should be easier to go P2P.

P2P with the ai-deck wifi connection is possible but you would have to implement most of it by yourself both on the ESP32 and Crazyflie side since the communication between the ai-deck and the Crazyflie is not yet very standardized. The exact implementation will depend of your definition of peer to peer: by default the AI deck will connect to a wifi access point. The access point will be quite similar to your laptop in relaying information between your Crazyflie. I guess it can still be considered P2P in the sense that the wifi AP has no specific code related to your experiment so this may just be nit picking. Real P2P is possible with Wifi using Ad-hoc connections (or Wifi direct?) but I have no idea how to achieve that with an ESP32.

One other solution which would be real P2P without any relay would be to use the P2P implementation in the Crazyflie: https://www.bitcraze.io/documentation/r ... s/p2p_api/. There is still some problem with it, mostly to communicate with the PC and P2P at the same time, but there are solution and since you already have the algorithm tested, you should not need to much debugging and so this could work fine for you. I wrote more about the problem and the possible solutions in this post: viewtopic.php?p=22721#p22721.

My advice would be to try P2P packet first since they will demonstrate real autonomy without any relay.
Post Reply