FlowDeck issue

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

FlowDeck issue

Post by RyanMco »

Hi guys, I downloaded firmware 2018 , the flowdeck is working but what's weird if I defined in python of flowdeck mc.up(0.5) then if I hold my crazyflie while the I run the python script to height >0.5 then I my crazyflie must go off, but if I down my crazyflie to height <0.5 then my crazyflie must go on (all that process while running the python script) ..

but what's happened for me, if I run python script and I hold my crazyflie to height >0.5 however I defined mc.up(0.5) then my crazyflie still working and it must be off because the height is bigger than 0.5 .. any help guys?! what should I do to my firmware to work correctly with flowdeck? I want for example if I defined in my python mc.up(0.5) then if I run the python script and hold my crazyflie to height >0.5 , my crazyflie must go off because height is bigger than 0.5, but if I back my crazyflie to height <0.5 by my hand while still python script running , then my crazyflie must still working ..
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Re: FlowDeck issue

Post by RyanMco »

what should I exactly add to my firmware to work in the pattern that I explained with flowdeck?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: FlowDeck issue

Post by arnaud »

If I understand well, you want to set a setpoint of 0.5m and you are expecting the Crazyflie motors to thrust a lot if you hold the Crazyflie bellow 0.5m and to thrust less when you hold it above 0.5m.

For that you need to send an absolute height setpoint to the Crazyflie. The motion commander API is only sending velocity setpoints (https://github.com/bitcraze/crazyflie-l ... #L403-L404) so the Crazyflie should resist movement but it will not aim for an absolute height.

Instead you should use the hover setpoint to send an absolute height to the Crazyflie. If you want to start from an example, the flow_sequence example is sending hover setpoints: https://github.com/bitcraze/crazyflie-l ... nceSync.py.
RyanMco
Expert
Posts: 159
Joined: Tue Apr 09, 2019 6:15 am

Re: FlowDeck issue

Post by RyanMco »

but why my state>position.z and setpoint->position.z isn't showing my correct results of height in my firmware?! where do I check those parameters to verify that they are working right in my firmware?! I mean I want to verify that z estimated and Z commend are working correctly , if I send mc.up(0.5) from my python script client so the height must be constant in my firmware, where do I see this? in which parameter?!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: FlowDeck issue

Post by arnaud »

You can check the log variables to see the Z estimates of your Crazyflie.

Though, as I explained in my previous message, you are not sending a position setpoint with "mc.up" but a velocity setpoint generated by the motion commander. The motion commander generates a positive velocity to reach 0.5m and then a velocity setpoint of 0 to keep this height.

To send absolute height setpoint to your Crazyflie you need to send setpoints yourself, for example by modifying the example I linked in my previous post.
Post Reply