Getting started with your own Python script [Noob question]

Discussions about all things Bitcraze
Post Reply
jaxxie
Beginner
Posts: 1
Joined: Thu Mar 26, 2020 3:42 pm

Getting started with your own Python script [Noob question]

Post by jaxxie »

Okay, so a total noob here. Doing a project using the Crazyflie for a university class. This project requires writing your own script in Python. (The goal is autonomous flight with object avoidance, so we're using loco node, multi-ranger deck and possibly even flow deck - if we can figure out how to put three decks on the drone at once.)

I have been looking at the repository for cflib on Github. Reading documentation and looking at the examples and I understand just about NOTHING, except the command to connect to the Crazyflie, in the code of the examples. (Yes, I know. I'm a noob.) And I can't find any documentation that lists the functions made available by cflib. I tried to look on the Wiki too, but no luck there either.

Is there a document anywhere that lists the functions that are provided in cflib and what these do? Or do I just have to start modifying example code randomly, hoping to gain some insight?

I can't see how I could possibly hope to write a script of my own when I understand as little of the code as I do now. :(
Any advice is welcome!
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Getting started with your own Python script [Noob question]

Post by kimberly »

Hi!

Currently we are busy with revamping all the documentation, and indeed there is not a lot of explanation about the different functionalities in the the crazyflie python library except for what is written here: https://www.bitcraze.io/documentation/r ... on/master/. We will try to fix this soon, but unfortunately its going slowly since we are only with 5 at the moment.

So yeah, the best way for now is to look at the examples in https://github.com/bitcraze/crazyflie-l ... r/examples. If you already have a multiranger and the flowdeck, the multiranger_push.py is the best one to start as it provides an example that in real-time responds to the sensor input of the multi ranger. This is also part of this tutorial: https://www.bitcraze.io/documentation/t ... ng-bundle/

Please post if there is still things that are unclear to you after this! We are here to help out.
Post Reply