bitcraze / crazyflie-android-client Goto Github PK
View Code? Open in Web Editor NEWThe Crazyflie Nano Quadcopter client for Android OTG or BLE enabled devices
License: GNU General Public License v2.0
The Crazyflie Nano Quadcopter client for Android OTG or BLE enabled devices
License: GNU General Public License v2.0
Block the on screen Pads if any controller is detected or/and as preferences setup item
When Crazy mode is activated and the max thrust is put to 90% the thrust command send to the copter loop back to 0 at 65%: Increasing the thrust to 65% is OK but from 66% the motors on the copter comes back to very low thrust.
Hi, I use a external gamepad (XBox 360) and when i bind the thrust to the left or right trigger (as i do on the PC client) the Thrust doesn't react when I pull down the trigger.
The trigger works for pitch, roll and yaw but not for thrust.
With the Normal (flight) mode default values is a lift off almost impossible (tested with d002624 commit)
Maybe course of the new thrust range?!
When using BLE there should be a way to select which Crazyflie 2.0 to connect to. Currently the Client will connect the first Crazyflie it sees (basically random) which is problematic if more than 1 Crazyflie is near-by.
It is currently not possible to change the Crazyflie Bluetooth name, but we can use the last 2 bytes of the mac address as differentiation. For example:
This is mentioned in comments for #33 but likely best added as a separate feature request. Most development effort focuses on primary projects like crazyflie firmware and python client. Nothing wrong with that, and it is likely due to amount of interest and bitcraze team doing a good job of making development on those projects easy to get into.
Android (and I assume Iphone) apps are nice because most people always have a smartphone handy. But apps lag behind in development (higher learning curve) and do not always allow new features available in the default python client, or support experimental firmware features.
Instead of pulling development resources away from primary projects, I propose adding the following small but highly flexible features to the two smartphone apps:
Closing statement: Adding in a few very small, simple, but highly flexible features into the app versions of the client will make it so app users still have possibility of benefiting from all the good continuing work done in CFlie firmware without requiring continual updates to the apps.
Hope this is helpful. Thanks for all the hard work
It would be useful to play a sound when becoming connected/disconnected from the usb transmitter and the flie itself. This is motivated by trying to use the app with a nexus 7 that has a very poor OTG connector. Often with moving around this connection is broken. Playing a two+ tone sound where the second sound is higher for connection and lower for disconection would be great. It would be have to have two pairs of sounds. I'm not sure how you would distiguish between them. May be a pregression of notes with the lowest two for USB and the higher two for connection to the flie. Alternativly two different qualities. Another alternative would be white noise for loss of comms to the flie and a modemy/teletype/fax machine sound for establishing the comms.
BLE connection works fine with a Nexus 5, but has serious delay/lag with a Moto G.
Delay/lag is in the range of seconds! Therefore BLE on the Moto G is not useable for controlling the Crazyflie 2.0.
I will try to provide more info soon.
Using the Phone acceleration sensor to set trust, pitch and roll. Yaw could be set by a screen pad. The phone acceleration sensor zero position could be set (ones!) by holding a screen button.
R.java should be removed from version control as it is generated at each build.
Also gen/ could be added to .hgignore.
if the connection is established and the app will closed (e.g. just by clicking the return button) the connection to the CF stays?!. But if you start the app again after that, the connection will disconnected. Other case: If the home button is clicked or at incoming Calls the connection stays and trust is set to zero. What are you prefer to do if app will closed disconnecting or set just trust to zero?! I think it would be safer to release something or have to connect again to prevent an
unintended lift off after an interruption.
For debug and log.
With Nexus 7 I turn on rotation lock in the system settings but the crazy flie app still rotates when I look down at the floor and the nexus 7 is pointing downwards.
(One fix may be to support only one oriantation and not rotate at all. However I am not sure if this is OK as there may be a prefered oriantation based on where the OTG coble is connected.)
Sorry if this has been fixed. Not sure how to identify the version I am using.
This error is not visible to the user, but it should still be fixed.
to prevent an unintended close of the CF app.
I tested my bluetooth connection with my MacBook Air and it's ok. I can send files between them.
I tried HTC ONE m8, i phone, and another Android phone, they're okay. But I just can't establish BLE connection using my HTC ONE M7.
On my phone, the bluetooth manager showed it's paired and the client app also popped a message "connected", but green LED on crazyflie was not flashing.
Any suggestion?
With the Android N preview, the touch controls are not shown during the first start of the application. Once you restart the application or go to settings and back, it works.
Thx to @ataffanel for reporting it.
Visual bar graph in the app. Vibration alarm and sound alarm at min level. Voice output like Google speech: "You have 30% Battery left!"
Is there a way to get copter's current attitude parameter such as pitch, roll, and yaw (or maybe raw data of gyro and accelerometer) from Android device?
For external controllers. App can switch off the screen to save energy during flight. Maybe controller button for that!?
I think i found some interesting for the pocket mode: how-to-keep-an-activity-running-while-screen-off.
Support altitude hold functionality and add corresponding button mapping preference entry.
The Android client was hard coded to Channel 107, Although I changed this on my app to connect to my crazyflie a scan feature would be a lot more useful.
I know it from other Apps a menu option to set in app Logging to a text file which can send by email. Content of the file could be phone id, android version, called methods and so on.
As Android Wear devices have BLE and an accelerometer, it should be possible to connect to the CF2.0 directly with the watch and control it using tilt for pitch/roll and a (single) joystick for thrust/yaw.
This would be useful for people like me who don't feel like flying with a 10'' tablet but don't have another BLE device besides the watch lying around. And it would be cool!
(I think that since the tilt control is already implemented, this would only require UI changes -- then the .apk could be adb install
ed to the watch, in case making it available in the "standard" way is more work.)
On my Lenovo Yoga Tablet 10'' (the old one, running Android 4.4.2) the joystick widget circles take up all available space, which makes flying hard, as my thumbs can't conveniently reach all around the circles.
The problem seems to be related to yaw control only and when it is more then -100. Then the tough screen controls "flickers/jumps" and the yaw is reset to 0. If I limit the yaw to 99 the problem is gone.
Phone: Galaxy S6
Android: 6.0.1
When using the gyroscope on android device for flying the drone there doesn't seem to be a way to calibrate the gyroscope so that you don't have to hold the device flat.
User Message:
"Did not work..."
Application version:
v0.6.1
Stack trace:
java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.DOWNLOAD_COMPLETE flg=0x10 pkg=se.bitcraze.crazyfliecontrol2 (has extras) } in se.bitcraze.crazyfliecontrol.bootloader.FirmwareDownloader$1@41ffb960
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:808)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5299)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at se.bitcraze.crazyfliecontrol.bootloader.FirmwareDownloader$1.onReceive(FirmwareDownloader.java:322)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:798)
... 9 more
if the app is started by attaching the CR (Crazy Radio dongle) and no connection was established then it is not possible to attach the CR anymore (after detaching). Detaching will nevertheless detected and reported. Hotfix by restarting the app.
I have a Samsung S3 (GT-I9300) with Android 4.1.2.
I checked it twice and can reproduce the issue easily.
Normal flight mode and advanced flight control like PC client (max angle, max thrust, x-mode)
crazyradio.py-like java driver to easily use the Crazyradio functinalities.
Hi all,
that feature would be great to have on the Android GUI. Would make flying with the soft-joysticks much more fun!
cheers, Marius
When switching between the main screen and the settings, the Joystick widgets grow bigger, especially on tablets.
Line 97 of AbstractController has getDeadzone multiplying the entire return of getRoll.
So if user input is in the deadzone, everything, including trim gets nullified by the zero returned by getDeadzone.
Shouldn't trim be applied at all times?
Trim is supposed to balance the crazyflie if it drifts right?
I was trying to launch a debug session using eclipse connected via WIFI and could not launch the app. This is due to the Android Manifest file having multiple defines in the intent-filter i.e.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
if this is changed to:
</intent-filter>
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
After the fix, eclipse can now launch the app and debug.
After initiating the radio scan a few times in a row, the red LED on the Crazyradio does not light up anymore and the USB connection seems to be lost. Re-connecting the Crazyradio and restarting the app seems to be a workaround.
Logcat shows that the UI thread is blocked when the radio scan is executed. Therefore the radio scan should run in a separate thread.
Automatic start/stop timer. Up- and Down- Timer. Flight time, ON time
Like the PC client. A quick connect with the last connection values and a scan button to look at CFs in the neighborhood. Scan, if you don't remember your CF radio settings.
1.0 means no input is possible! Is this really needed?
Maybe a better resolution is to use 50% of the possible value as dead zone. For example 1.0 deadzone means start at 50% of the possible max value. That means a higher resolution in the Joystick beginning area and actually deadzone value higher than 0.5 is almost not flyable.
Visual bar graph in the app. Vibration alarm and sound alarm at min level. Voice output like Google speech: "Radio Link quality BAD!"
These two options are still missing in the Android app.
User Message:
"connected, try to see the settings"
Application version:
v0.6.1
Stack trace:
java.lang.NullPointerException: Attempt to invoke virtual method 'se.bitcraze.crazyflielib.crtp.CrtpPacket se.bitcraze.crazyflielib.crtp.CrtpDriver.receivePacket(int)' on a null object reference
at se.bitcraze.crazyflielib.crazyflie.Crazyflie$IncomingPacketHandler.run(Crazyflie.java:379)
at java.lang.Thread.run(Thread.java:818)
Radio scan without attached Crazyradio causes the app to crash
To change parameters manually like PC client.
If the PS3 Controller buttons "O", "X" and "START" are pushed the app will closed. :( This buttons have still Android default mappings.
The app is hard-coded to be Mode 1.
There should be Options to allow the 4 modes (or at least Mode 1 & Mode 2).
Having flown Mode 2 for many years, I'm finding Mode 1 very hard to control! :-)
After your last commit fa7961dthe menu and return buttons doesn't work anymore, means connect is impossible, too. I think a exception is needed for the super method and these two buttons!?
When I want to remap the buttons on my PS3 controller, the Crazyflie Control crashes at the moment I push on the button "Right analog X axis" for example.
The second bug, derf found out, is that thrust is mapped with a negative value.
If you click "Connect" before the CF is on, the connection will established imminently after turn it on. This is good as a feature called auto RE-connect, but should not be possible at first connection, because maybe the input values are wrong and the CF gives max thrust after first connection.
Currently the external gamepad axis are hardcoded. Some gamepad, like the Ouya gamepad used on regular android tablets, does not have the axis mapped the same way as a ps3/xbox controller (the right joystick is on RX and RY).
There should be a way to configure the axis of left and right joystick in the settings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.