Throttle unresponsive through cfclient

Post here to get support
Post Reply
ccpost
Beginner
Posts: 15
Joined: Mon Jan 23, 2017 7:35 pm

Throttle unresponsive through cfclient

Post by ccpost »

Hi,

I am having trouble with the throttle through cfclient. I had it working before, and I think the only thing I changed is the controller I'm using for cfclient. (I paused work on this for a couple weeks, though, so I may be forgetting something.)

The CF 2.0 will connect fine, and the "actual" values for roll, pitch, yaw update appropriately. When I bring up the throttle, though, the "target" value follows what I expect, but the "actual" value stays at 0. It works fine from the iOS client. If I connect once using the iOS client (even just briefly connecting then disconnecting) after powering up the CF 2.0, then connecting in cfclient works fine and the throttle responds as expected. Power the CF 2.0 off, though, and I have to go through the same process of connecting once using the iOS client before cfclient will work.

I'm running:
CF 2.0: 2016.11 (last flashed from iOS in an attempt to isolate the problem)
cfclient: 2016.4.1
iOS: current? (can't find a version number, but no pending updates)

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

Re: Throttle unresponsive through cfclient

Post by arnaud »

Hi,

This is a strange problem. Are you sure the sensor are calibrated when you try to fly with the client? (you will see that with the RED led that blinks faster indicating the sensors have been calibrated). There is two things that I see could prevent the thrust to work
- Non-calibrated sensors
- your gamepad never sends "0" thrust (there is a lock in the Crazyflie, you need to send one time 0 thrust to be allowed to send any thrust at all, this ensure that the gamepad starts at 0 and is not locked at 100% from the begining).

/Arnaud
ccpost
Beginner
Posts: 15
Joined: Mon Jan 23, 2017 7:35 pm

Re: Throttle unresponsive through cfclient

Post by ccpost »

Arnaud,

Yes, the sensors are calibrated. (Also, the second "ascending" tune from the buzzer deck is a super convenient indication of calibration completion.)

I think your second point is the culprit. I've been trying to get one of the RealFlight USB controllers (http://www.realflight.com/products/rf7_5/gpmz4520.php) working, but have to manually tweak the controller config since the calibration GUI doesn't seem to like it (and I'm using the "springythrottle": false property). At the moment my "0" is really more like 1.05. That doesn't spin the props, but it wouldn't ever be sending a 0.

I'll tweak the calibration, thanks!

For my own curiosity (as I'm learning the code structure): If you know where it is offhand, could you please link me to the place where the 0-thrust-lock is implemented?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Throttle unresponsive through cfclient

Post by arnaud »

Hi,

Yes, this looks like the problem then. This was put in place because the PS3 gamepads will send 100% thrust until you press the "PS" button, this was quite surprising when connecting a Crazyflie and it jumps in the air directly.

The thrust lock code is there: https://github.com/bitcraze/crazyflie-f ... #L143-L148
montezuma
Beginner
Posts: 1
Joined: Fri Mar 31, 2017 12:34 am

Re: Throttle unresponsive through cfclient

Post by montezuma »

Hi,

I just got the real flight interlink controller working. It works like a charm for controlling the drone. I am using Windows 10.

I did the following:
* calibrate the controller under Win10 joystick calibration
* create controller config Jason with the proper mapping
* set the thrust slew rate to 0%
* set the minimum the minimum thrust to 0
* I did make a two changes to the file inputreaderinterface.py.


Montezuma
Post Reply