Flowdeckv2's verification

Post here to get support
Post Reply
RyanMco
Member
Posts: 80
Joined: Tue Apr 09, 2019 6:15 am

Flowdeckv2's verification

Post by RyanMco » Tue Apr 23, 2019 8:21 am

Hi !
I have bought flowdeckv2 and connected it to my Crazyflie, it's hovering and all fine .. but how can I verify that my movements on crazyflie is calculated rightly over my flowdeck? I mean lets assume that's I'm on specific coordination Z , and I move my crazyflie to the right alil, so how this "movement" can I check its calculation over the flowdeckv2? thanks alot.

I brief, how can I check that my flowdeck is doing the calculation of coordination's movement of X,Y,Z correctly?! thanks alot



arnaud
Bitcraze
Posts: 2127
Joined: Tue Feb 06, 2007 12:36 pm

Re: Flowdeckv2's verification

Post by arnaud » Tue Apr 23, 2019 1:39 pm

If you want to verify that the flow deck is working at all, it is: without the flow deck the Crazyflie is not able to hover in place for more than a second.

I you are after actual measurement, you can setup a new log block using the Crazyflie client (setting/logging configuration) and plot the variables in the plotter tab of the client. The Log variable that would be interesting if you want the position estimate of the Crazyflie are "stateEstimate.x/y/z".

RyanMco
Member
Posts: 80
Joined: Tue Apr 09, 2019 6:15 am

Re: Flowdeckv2's verification

Post by RyanMco » Tue Apr 23, 2019 6:24 pm

Hi, I understand you but the process isn't clearing up.
for your second choice(estimation X Y Z) after I enter my PA client , I log into my console log, and afterwards what should I do?

may you please explain the steps one by one for showing estimation of X Y Z ? thanks alot!!!

arnaud
Bitcraze
Posts: 2127
Joined: Tue Feb 06, 2007 12:36 pm

Re: Flowdeckv2's verification

Post by arnaud » Wed Apr 24, 2019 8:15 am

I am not sure what you mean by your console log and your PA client so I will try to start from the beginning.

I assume that you have followed the getting started with flow deck so you have a Crazyflie with flow deck flying using a gamepad and using the Crazyflie client graphical interface.

Once connected to the Crazyflie in the client you can add new log block following this documentation: https://wiki.bitcraze.io/doc:crazyflie: ... ex#logging
Once the new log block is added you can plot the value of the log variables in the plotter: https://wiki.bitcraze.io/doc:crazyflie: ... ex#plotter
You can also record the variable values in a CSV file: https://wiki.bitcraze.io/doc:crazyflie: ... log_blocks

That way you can observe and record the Crazyflie position estimate.

RyanMco
Member
Posts: 80
Joined: Tue Apr 09, 2019 6:15 am

Re: Flowdeckv2's verification

Post by RyanMco » Thu Apr 25, 2019 1:25 pm

THANKS ALOT IT'S WORKING !!
but there's a problem which I can't overcome on it, whenever I hold off the shoulder button on my xbox360 , my crazyflie drop off immediately, what I'm trying to do is to keep my crazyflie hovering at any height I want to .. In other words, to control hovering or not by pressing a specific button on my xbox .. any clue?! thanks alot.

RyanMco
Member
Posts: 80
Joined: Tue Apr 09, 2019 6:15 am

Re: Flowdeckv2's verification

Post by RyanMco » Thu Apr 25, 2019 1:47 pm

for example to what I'm trying to do, I want my crazyflie while flying in air, if I want it to hover at specific height that I see on my "eyes" then I will hold off my shoulder button and put away my remote, then my crazyflie should still hover and not drop off immediately although I hold off my shoulder's button .. any help?!

arnaud
Bitcraze
Posts: 2127
Joined: Tue Feb 06, 2007 12:36 pm

Re: Flowdeckv2's verification

Post by arnaud » Thu Apr 25, 2019 2:07 pm

So I guess the behavior you are after is: you click the shoulder button to enable hover mode and then click again to disable it.

This requires to modify the python code of the client, though I see a quite easy way to hack it in the current client.

The input device is acquired in the input driver: https://github.com/bitcraze/crazyflie-c ... __.py#L366. The shoulder button is the boolean "data.assistedControl".

One easy hack would be to store in the 'JoystickReader' object the current state of assisted control. Then, on the line after "data = self._selected_mux.read()" add some code that flip the assisted control state if "data.assistedControl" becomes True, finally one can overwrite "data.assistedControl" with the stored assisted control state.

RyanMco
Member
Posts: 80
Joined: Tue Apr 09, 2019 6:15 am

Re: Flowdeckv2's verification

Post by RyanMco » Thu Apr 25, 2019 4:43 pm

So what code should I write? I'm not that code at coding ..

Post Reply