Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Firmware/software/electronics/mechanics
silva
Beginner
Posts: 15
Joined: Tue Mar 28, 2017 1:28 am

Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Post by silva »

Hi , I just play crazyflie 2.0 for several weeks, and currently i want to use joysticker xbox360 control crazyflie 2.0, but the crazyflie 2.0 has no incluence with the joysticker xbox360 control. what is the matter? how to troubleshooting? Many thanks for any reply. :D

By the way, the crazyradio and joysticker connect with android phone with the OTG cable. I change the app crazyflie client control setting to gamepad mode, and crazyflie client app could scan the device(crazyradio and joysticker), and the crazyradio pa connected with crazyflie(pa green led blink, just popupthe text 'log toc fetch finished 133' when finish the connection).

1.crazyflie 2.0 firmware: althold version from github
2.crazyflie client app version: 0.6.5
3.crazyradio pa firmware version: default.
4.the keymap of the crazyflie client is default.

the connection image link is same as below.
https://wiki.bitcraze.io/doc:crazyflie: ... roid:index
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Post by arnaud »

Do you see the roll/pitch/yaw/thrust setpoint moving when you move your gamepad joysticks?

I just tested on a Nexus 6P running Android 7.1.2 flying with a Crazyradio and an xbox360 gamepad works using a USB hub.
silva
Beginner
Posts: 15
Joined: Tue Mar 28, 2017 1:28 am

Re: Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Post by silva »

Hi Arnaud,
I see the roll/pitch/yaw/thrust setpoint moving when i move my joystick, but the crazyflie 2.0 has no action. how could i troubleshoot the crazyflie? thank you.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Post by arnaud »

Are you connected to the Crazyflie: is the connection button becoming green and is the crazyradio green LED blinking?
silva
Beginner
Posts: 15
Joined: Tue Mar 28, 2017 1:28 am

Re: Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Post by silva »

Hi Arnaud,
yes, the connection is good between crazyflie and crazyradio. currently,the althold function work but not well. when i press the althold button, crazyflie enter to althold mode, but drift download gradually. how could i fix it? thanks.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Post by arnaud »

Does it means that all the controls are now working, but you only have problems with the alt-hold?
silva
Beginner
Posts: 15
Joined: Tue Mar 28, 2017 1:28 am

Re: Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Post by silva »

Hi Arnaud,
Yes, all the control are working, only have problem with alt-hold. in alt-hold mode, the crazyflie drift download gradually, not steady in the Z-setpoint. Currently, the crazyflie 2.0 weigh 31g, maybe i should just tuning the PID parameter.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Post by arnaud »

Ok, the fact that is consistently goes down suggest a control problem rather than a Crazyflie problem, a couple of question to find out:
- Can you test with a computer to see if it is a problem with the android client or with the Crazyflie?
- What version of the firmware are you using?

If it is a control problem you could also try to increase the deadzone in the flight control settings.
silva
Beginner
Posts: 15
Joined: Tue Mar 28, 2017 1:28 am

Re: Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Post by silva »

Hi Arnaud,
the android client, version is 0.6.5. i think the android client is ok. as for the crazyflie firmware, i think a little code should be modify to match different joysticker and crazyflie, for the alt-hold function. Currently, same firmware and android client, different joysticker xbox360, and different crazyflie, the alt-hold performance are different. In alt-hold mode, sometime drift download gradually, change to another crazyflie(same crazyflie firmware) and xbox360, it may drift up gradually. therefore, In which code/section, should i tuning to make the alt-hold performance better? thank you.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Joysticker control with Crazyradio/Android crazyclient app via OTG connection setting

Post by arnaud »

The alt-hold code has changed a lot over time, are you using the latest version of the stock firmware?

The altitude-hold is implemented by the stabilizer loop. In the stock firmware a complementary filter calculates the current Crazyflie height using the pressure sensor and the accelerometer value, then a PID control loop is outputting thrust values to keep the Crazyflie at a stable height. See this blog post for more information about the current stabilizer loop architecture: https://www.bitcraze.io/2016/05/positio ... -firmware/.
Post Reply