crazyflie programming where>start?

Discussions about all things Bitcraze
Post Reply
crazyflying
Beginner
Posts: 20
Joined: Thu Oct 26, 2017 3:24 pm

crazyflie programming where>start?

Post by crazyflying »

hello
i have my flie up and running with the flow deck and a controler all is fine..now i would like to move on.

where do i start i have watched the vids of bitcraze but find them a bit empty they discriber most things but forget some key factors .

almost like they expect someone new to instanatly know which how to go and change the write param to do something...

so my question is..

i would like to create a sequence for my drone using flow..so say up to 40 cm then move in circle or fugure of eight(which unlike the youtube video it did not work out the box for me hover did)

to do this i belive i have to change some code .but which file in src in tools where ?im am new to coding things and am a bit lost as to which file i need to change and write my own code e.g if ps controler r2 pressed start loop...?where can i do this?

i have no problem setting up flashing just finding which file to change code is confusing...

so i poissible need to learn the structurs of c code tree ill search google..

some help would be amazing as there is allot of files and i search for flow but not much apears....

if you can point me in the write direction (*_*) thanks
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: crazyflie programming where>start?

Post by arnaud »

Hi,

The figure 8 script is in the lib example there: https://github.com/bitcraze/crazyflie-l ... nceSync.py. If you want to control the Crazyflie using a script you will most likely want to do it from a python script on the computer first. The Crazyflie already has stabilization algorithm in the firmware that allows you to control it by sending velocity setpoints, this means that you can already do a lot without touching the Firmware.

Documentation is hard and there is still much to do. I assume you have already followed the getting started guides. While you are starting with Crazyflie it would be great if you can tell us what kind of documentation would have been most useful and maybe help us enhance it so that it will better for others in the future.

It would also be interesting to know what video you are talking about, what information where you missing?
crazyflying
Beginner
Posts: 20
Joined: Thu Oct 26, 2017 3:24 pm

Re: crazyflie programming where>start?

Post by crazyflying »

ok so yea...

i got the python client which runs great
took ages to get setup but finally got the figure of 8 thanks.

maybe its possible for you to sandbox
in all the python libs needed to one osx / linux app?

i did follow and complete the getting started guide.

which was good.but i just feel there are bit missing...

for example...

in this vid https://www.youtube.com/watch?v=90Eho7ocZfg
he talks about the pyhton client and you can seem him changing some code.but i would kinda expect a quick overview of the params he changes so to give us an idea..

for example i think in github or thru a video discription of
how the code works for example setting parameters in python
flowsync.py and others would be good for those who know nothing about it.

like explination of the code a bit of firmware and the pyhton.client area.

as soon as i get further in my own finding i have plans to post some a-b-z videos for people like me...as i have coded before but undertsanding the tree layout of your files is confusing for someone new like me...

thanks
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: crazyflie programming where>start?

Post by marcus »

Thanks for the feedback, I agree that there's improvements to be made.
crazyflying wrote: Fri Nov 03, 2017 2:00 pm i got the python client which runs great
took ages to get setup but finally got the figure of 8 thanks.
Did you run the example from the Bitcraze VM or did you install the library nativ?
crazyflying wrote: Fri Nov 03, 2017 2:00 pm i did follow and complete the getting started guide.

which was good.but i just feel there are bit missing...
Glad to hear that you liked the getting started guide!
crazyflying wrote: Fri Nov 03, 2017 2:00 pm in this vid https://www.youtube.com/watch?v=90Eho7ocZfg
he talks about the pyhton client and you can seem him changing some code.but i would kinda expect a quick overview of the params he changes so to give us an idea..
The aim of the video is just to showcase the product, not to act as a tutorial of how to use it. This is where the Getting started with the Flow deck comes in and should be the next step. But I agree that there's something missing between the Getting started with Flow guide and starting with development. How about pointing out the example scripts?
crazyflying wrote: Fri Nov 03, 2017 2:00 pm for example i think in github or thru a video discription of
how the code works for example setting parameters in python
flowsync.py and others would be good for those who know nothing about it.
I agree, there should be better descriptions of the examples. What do you think about adding explanations directly into the example, like for the logging example? This would be the easiest since the comments will be in the code you would be using and the risk of the guide vs code diverging is minimal since they are mixed.
crazyflying wrote: Fri Nov 03, 2017 2:00 pm like explination of the code a bit of firmware and the pyhton.client area.
This is tricky since it's very complex and depending on what you want to do you're only interested in specific parts of the system. What we would like to do is to point to specific parts of the system that users might be interested in. Like how to use the Python API or how to add a deck driver to the firmware. What do you think about that?
crazyflying wrote: Fri Nov 03, 2017 2:00 pm as soon as i get further in my own finding i have plans to post some a-b-z videos for people like me...as i have coded before but undertsanding the tree layout of your files is confusing for someone new like me...
That would be great! We have a playlist with tutorials on Youtube where we would be more than happy to add the video.
crazyflying
Beginner
Posts: 20
Joined: Thu Oct 26, 2017 3:24 pm

Re: crazyflie programming where>start?

Post by crazyflying »

amazing

thanks for all the help...

im still getting my head around some things but am still motivated to make a nice simple intro to the flie prob january time when things are less busy...

as an idea i found a example of a good explination of firmware....in the link below is a discription of the code for the allbot hexapod code but i belive it to be a good example of a nice intro discription into coding.one for the crazyflie code could be good....a little intro into how the python code works...
could show some detailed examples of explaining simple code like changing the pyhton code a bit...loops and such etc....


http://www.allbot.eu/build/allbot-ardui ... -firmware/

anyway an idea thanks again
ciao
Post Reply