N/A

Firmware/software/electronics/mechanics
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

N/A

Post by RyanMco »

thanks!
Last edited by RyanMco on Fri Nov 22, 2019 2:08 pm, edited 3 times in total.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: FLOWDECK

Post by tobias »

I'm traveling so can't really check up the answer but I think there is already code for this. Chick in the Flow driver and there might be a parameter to turn off the flow tracking.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: FLOWDECK

Post by arnaud »

Hi,
There is a read-only parameter that indicates that the flow deck driver has been detected and initialized and so that the flow deck data is used in the Crazyflie: https://github.com/bitcraze/crazyflie-f ... #L239-L242

One parameter allows to disable using the flow sensor measurements at runtime: https://github.com/bitcraze/crazyflie-f ... 1v2.c#L236

Note that the ranging measurements from the ranging sensor included in the flow deck will still be pushed in the EKF. It would be possible to implement a similar mechanism to control if the ranging sensor at runtime, but as far as I can see it has not been implemented yet.
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Re: FLOWDECK

Post by RyanMco »

THANKS thanks!!
my problem is how can I from python script "code python" change parameter like useflowdeck from true to flase or opposite from false to true? I mean change it from python script and not from cfclient because if I run python script I can't run simultaneously the cfclient in order to change parameter while running python script that tell my drone to hover .. I want exactly while hover then to change useflowdeck from true to false in order to use external data from other source and not from flowdeck ..

in brief I don't know how from python script to change userflowdeck parameter from false to true while running python script(cant run cfclient at the same time in order to change the useflowdeck parameter)

thanks alot!
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Re: FLOWDECK

Post by RyanMco »

THANKS thanks!!
my problem is how can I from python script "code python" change parameter like useflowdeck from true to flase or opposite from false to true? I mean change it from python script and not from cfclient because if I run python script I can't run simultaneously the cfclient in order to change parameter while running python script that tell my drone to hover .. I want exactly while hover then to change useflowdeck from true to false in order to use external data from other source and not from flowdeck ..

in brief I don't know how from python script to change userflowdeck parameter from false to true while running python script(cant run cfclient at the same time in order to change the useflowdeck parameter)

thanks alot!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: FLOWDECK

Post by arnaud »

You can find a param example in the example folder of the lib: https://github.com/bitcraze/crazyflie-l ... am.py#L124. This example shows the use of the full param API which can he overwhelming.

Params are set in almost all the examples, a simple example of that could be how the high-level-commander examples changes controller: https://github.com/bitcraze/crazyflie-l ... #L134-L135. This is the simplest way to set a parameter value from python.
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Re: FLOWDECK

Post by RyanMco »

Hi ; still not obvious for me!
lets be concerned just on useflowdeck parameter, lets assume it's already found in firmware itself, then what should I do? I didn't understand the example you attach "frankly" ..
I'm not forcing you to write code instead of me, but I didn't understand you well.

can you please pickup parameter within any name like param "useflowdeck" and what would you do in order to change it?! what functions to write? what library in python to define? where do I define the parameter?

Im relatively new within APIS/interfaces, would be really appreciated if you could help me in this basic tactics for changing parameters within api ..

thanks alot!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: FLOWDECK

Post by arnaud »

Assuming you are connected to your Crazyflie with a python script using the crazyflie-lib-python (cflib) and that your crazyflie object is called "cf". To disable the flow measurement you would have to execute:

Code: Select all

cf.param.set_value('motion.useFlowDisabled', '1')      # Disables using the flow sensor for estimation
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Re: FLOWDECK

Post by RyanMco »

THANKS ALOT, but there's another problem didn't figure it out!
once Im receiving data from flowdeck also from external data(another source of data) so my drone is getting data from both sources at the same running time (the same time I run my drone and run external data , also using data from flowdeck) , how can I turn off the external data while running the flowdeck?
what's actually my issue , I want once I hover , to use flowdeck at first, when it's up to specific height that I define it from python script, then I want to turn off data from flowdeck, and use data from external source (from slam), I know the functions in firmware that's getting external data from slam, and I know flowdeck functions that are getting data from flowdeck, if I run the both at the same time then my drone will get crazyand shaking because he's getting data from flowdeck at the same time the slam is publishing data to drone .. so how can I use parameter like what I have used within flowdeck in order to decide when I turn off getting external data by script python? I mean is there "externalenableUse "parameter or something like that for enabling getting external data or not enabling ?! thanks alot
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: FLOWDECK

Post by arnaud »

No, there not such a parameter yet, it could be added in a very similar way the current disableFlow parameter works.

Since you are controlling the external data source, you can also control when you send the external data: do not send it until after you disable the flow input. This would allow you to get this functionality without modifying the firmware.
Post Reply