by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    OlavAa
    @OlavAa
    I followed these instructions, and after some struggle (don't remember the details) I got it to work: https://github.com/DroidPlanner/Tower/wiki/Work-with-DroneKit-Android
    Ing. Emanuele Tonucci
    @etonucci
    @OlavAa Thank you very much! I'll try immediately!
    Ing. Emanuele Tonucci
    @etonucci

    Dear @OlavAa Finally I compile with succes Drone-Kit project with Android Studio 3.5! When I used the file, in my case, with implementation (name:'dronekit-android.3.1.0-beta',ext:'aar') unluckly I received this error:

    E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.ttp_technology.ttp_bb_v2, PID: 20452
    java.lang.NoClassDefFoundError: Failed resolution of: Ltimber/log/Timber;
    at org.droidplanner.services.android.impl.api.DroidPlannerService.onCreate(DroidPlannerService.java:207)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3558)
    at android.app.ActivityThread.access$1300(ActivityThread.java:200)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:198)
    at android.app.ActivityThread.main(ActivityThread.java:6732)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
    Caused by: java.lang.ClassNotFoundException: Didn't find class "timber.log.Timber" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.ttp_technology.ttp_bb_v2-ZpTMEGXoT7GCB4p376y48Q==/base.apk"],nativeLibraryDirectories=[/data/app/com.ttp_technology.ttp_bb_v2-ZpTMEGXoT7GCB4p376y48Q==/lib/arm64, /system/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at org.droidplanner.services.android.impl.api.DroidPlannerService.onCreate(DroidPlannerService.java:207)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3558)
    at android.app.ActivityThread.access$1300(ActivityThread.java:200)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:198)
    at android.app.ActivityThread.main(ActivityThread.java:6732)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

    What do you think?

    OlavAa
    @OlavAa
    It a lot of fun, right? I remember that I struggled as well, but got it right in the end. Some time since I did this. On the top of my head I think I got the 3.0.4 generated. No access to my dev environment just now, but I'll see what I can find out. The error is kinda specific on first look (class not found on path), but my experience (or rather lack of it) is that you usually need to dig a little deeper. I think I remember having to "rebuild project" before I succeed... Will try to help you later!
    Sudarshan-Impace
    @Sudarshan-Impace
    Can any one share me latest dronekit GCS android app source code ? I have developed android GCS but i want to implement video streaming functionality in my app but i dont know how to show video in app.
    I have droneKit tower app code but it can't run on android Studio.
    OlavAa
    @OlavAa
    @etonucci I was actually walking to my code just now to remember the steps I took. Happy you succeeded. I have tried to test that this is actually working. Altered the name of a mode in "public enum VehicleMode implements DroneAttribute" to play around - changed the label for "ROVER_AUTO" from "Auto" to "Do mission". Then during testing, the Tower app dislays "Do mission" in the telemetry bar and the audible message when entering Auto mode says "Mode Do mission". So it is working, which is nice! The challenge I see now is that the Dronekit is quite old. I don't now about the other models, but for ARDUROVER there has been a lot of development in the firmware. So I guess that I have quite a lot to do to lift the now included Dronekit up to a level of Ardupilot version 4.0.
    @Sudarshan-Impace You can get it on Gitbub here: https://github.com/dronekit/dronekit-android
    I did not experience problems trying to build it, just struggled with including it into the Tower app. Pretty sure I did not upgrade the Gradle when I opened it in Android Studio for the first time, though. Perhaps give that a try (from scratch)?
    Ing. Emanuele Tonucci
    @etonucci

    @OlavAa

    I builded correctly my APP!!! The problem was that I've to include (implementation) all the outer classes of the DroneKit inside my APP gradel!

    implementation 'com.jakewharton.timber:timber:4.7.1'
    implementation 'com.github.zafarkhaja:java-semver:0.9.0'
    implementation 'com.jcraft:jsch:0.1.51'
    implementation 'com.googlecode.mp4parser:isoparser:1.1.7'
    implementation 'org.droidplanner.android:usb-serial-android:0.1.0'

    I don't no why? These classes are included in the ClientLib (DroneKit) Gradel!
    I would have imagined that, since they were already imported into DroneKit (ClientLib gradel), in my application I should not have imported them.

    Luckely, now my APP works great!

    If somebody want to try to develop an APP for Android Oreo+ or more high, has to modify something inside DroneKit:

    First, in dronekit project gradel have to change the ext part with this code:

    ext {
    play_services_version = '8.4.0'

        android_build_sdk_version = 28
        android_build_tools_version = '23.0.2'
        android_build_target_sdk_version = 26
        android_build_min_sdk_version = 22
    }

    Second, inside AndroidStudioProjects\dronekit-android-v3.0.2\ClientLib\src\main\java\org\droidplanner\services\android\impl\utils\connection
    Change the file WifiConnectionHandler.java (line 103) to:
    case CONNECTED:
    //final WifiInfo wifiInfo = intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO);
    //final String wifiSSID = wifiInfo.getSSID();
    final String wifiSSID = wifiMgr.getConnectionInfo().getSSID();
    Timber.i("Connected to " + wifiSSID);

    COMPILE (BUILD) DroneKit!

    Third, change the project gradel like this:

    allprojects {
    repositories {
    google()
    jcenter()

        flatDir{
            dirs 'libs','../../dronekit-android-v3.0.2/ClientLib/build/outputs/aar'
        }
    }

    }

    Fourth, change the compile method in your APP gradel like this (obviously you have to use applicationId, versionCode and versioneNameSuffix of your APP):

    compileSdkVersion 29
    defaultConfig {
    applicationId "com.ttp_technology.ttp_bb_v2"
    minSdkVersion 22
    targetSdkVersion 26
    versionCode 5
    versionName "4.1"
    testInstrumentationRunner "an29droidx.test.runner.AndroidJUnitRunner"
    versionNameSuffix = 'TTP-V4.1'

    }
    buildTypes {
    }
    buildToolsVersion = '28.0.3'

    Fifth, in your App gradel chenge the implemantation of drone-kit library to:

    //implementation 'com.o3dr.android:dronekit-android:3.0.2'
    implementation (name:'dronekit-android.3.0.2',ext:'aar')

    And now you can cross fingers and built your APP :)

    Thank you all for your support.

    OlavAa
    @OlavAa
    @etonucci Thanks for this information, really appreciate it since you have gone additional steps that I have not yet looked into! One question: The connection changes, do they solve the faulty UDP connection alternative from Tower (bluetooth, USB and TCP all work, while UDP fails for me)?
    Ing. Emanuele Tonucci
    @etonucci
    @OlavAa I tested my APP to connect to SITL with UDP and it works, and with USB with 3DR radio telemetry and it works. Hope it works also with TCP and Bluetooth. I never used these type of connections. I'll try next days!
    OlavAa
    @OlavAa
    I use USB and Bluetooth from phone/tablets. No problems. Developing with Android Studio, emulator and SITL I use TCP (since UDP does not work at all). I will implement the changes you suggested and hopefully enjoy UDP as well 🙂
    Ing. Emanuele Tonucci
    @etonucci
    😄💪👍
    mrchentop
    @mrchentop
    asyncScheduler null
    Prathyush Reddy
    @aprathyush_twitter
    Hi all, can someone please guide me on how to get geofence breach (update fence points, draw polygon on gcs and set fence_enable) working from dronekit sitl script.
    Thanks in advance
    Another query in on creating attribute for intercepting the FENCE_STATUS. I had issues when I tried writing MyVehicle Class same as in the create_attribute example as it is not present by default in vehicle class.
    Donoorkans
    @Donoorkans
    how can add new message in tower android application? any references for that?
    OlavAa
    @OlavAa
    Not sure I can help, but could you be more precise? "Add new message" is kind of vague, and how to implement will differ on what you are aiming at. As an example I've in process of adding support for new flight modes for the rover that is available in the ardupilot fw but not included in Dronekit. That's pretty easy (in Dronekit), and the added values are retrieved and available in Tower's telemetry bar drop down of flight modes. I don't think the process to keep Dronekit in sync with a new fw version for ardupilot is documented anywhere. If it is I would surely like to read it - we're pretty much on our own here...
    Donoorkans
    @Donoorkans
    Thank you sir, Actually I used raspberry pi in my drone . Raspberry pi reads paddy field greenness so raspberry pi need to send those sensor readings through mavlink connection. I try to develop Ground control station Android application to received that message. How can i define new mavlink messages in dronekit-android and where i need to change the code. (For example Application shows roll pitch yaw values like that i try to put my sensor readings into tower application)
    OlavAa
    @OlavAa
    And send the sensor data to the flight controller to retrieve this additional data (along with drone data in general) from the drone? Going to do something similar later, no experiences to share right now. Sorry. What I expect I need to do then is to investigate how Dronekit handles something similar (like Altitude, perhaps). And then to extend a current class (or make a new) with a getYourDesiredSensorData() function. And then continue in Tower to utilize it.
    This example is for Dronekit
    OlavAa
    @OlavAa
    Found this example for Dronekit python. I assume it might provide relevant guidance even though not for Dronekit Android: https://dronekit-python.readthedocs.io/en/latest/examples/create_attribute.html
    OlavAa
    @OlavAa
    And perhaps there is some hint for you in this brief issue discussion on github: dronekit/dronekit-android#403
    Hugo Daniel Martins Silva
    @hugosilva123_gitlab
    Good night I would like to know where to find a tutorial for setting up the drone kit in android studio
    OlavAa
    @OlavAa
    Ref comment from Oct 20th: You can get it on Gitbub here: https://github.com/dronekit/dronekit-android
    Sorry. The link you need for instructions were added in a comment on Oct 11th... I followed these instructions, and after some struggle (don't remember the details) I got it to work: https://github.com/DroidPlanner/Tower/wiki/Work-with-DroneKit-Android
    Hugo Daniel Martins Silva
    @hugosilva123_gitlab
    Thanks a lot for the help. Now should I install the api that is on dronekit?
    Hugo Daniel Martins Silva
    @hugosilva123_gitlab
    i dwoload the tower and now?
    OlavAa
    @OlavAa
    I guess the only reason to clone Dronekit is to have full control and to be able to modify it if needed. If that is not necessary then you only need to clone Tower. If you intend to alter Dronekit, work according to the instructions in the link. The cloned Tower should come up easily as long as you do not upgrade gradle (plugin?). You will probably want to at some point, but it is nice to be able to build Tower at least once before you struggle. Just my point of view, of course.
    Sudarshan-Impace
    @Sudarshan-Impace
    @OlavAa Thank you ,Actually I update gradle when i open project first time then errors are occured in my project.
    Donoorkans
    @Donoorkans
    2019-11-21 (2).png
    how to decide mavlink message length? Here length is 28
    Vincent Schmid
    @VincentSchmid
    can dronekit be used for fixed-wing aircraft? Or is it generally for quads and such
    Bill Bonney
    @billbonney
    You can used dronekit-android for fixed wing aircraft
    why do you need the message length? that is used only by the parser.
    JeremyJalpha
    @JeremyJalpha

    Dear All,

    Please may someone very kindly assist me?
    I have built my own drone with an android phone connected to an IOIO board (https://www.sparkfun.com/products/13613) which outputs PWM signals to my ESCs.
    For Controls, I have an Xbox remote BlueToothed to the flying phone.

    In my android app, I am able to read the stick movements on the remote but now need to convert them to Throttle values to send to the ESCs, so far I have the below:

    Given values: Throttle, DeltaX and DeltaY

    BL = (((Throttle + (DeltaX - DeltaY))10)+1000)
    FL = (((Throttle + (DeltaX + DeltaY))
    10)+1000)
    BR = (((Throttle - (DeltaX + DeltaY))10)+1000)
    FR = (((Throttle - (DeltaX - DeltaY))
    10)+1000)

    I am looking for the correct formulas to translate stick movement into a corresponding change in throttle to steer the drone. I am not sure if the above formulas are correct because if the drone is at 100% throttle then some output values would be "clipped" out.

    Any advice would be greatly appreciated.

    JeremyJalpha
    @JeremyJalpha
    PS ALL your links are dead
    denisbujoreanu
    @denisbujoreanu
    I think you should be aware that although the Android smartphones run a flavor of Linux it is not a RTOS(RealTimeOS) so regardless how fast the CPUs and how many there are they won't deliver real-time responses. That's why there aren't many flying platforms based on smartphones.
    JeremyJalpha
    @JeremyJalpha
    @denisbujoreanu ok which phone is being used in the flone videos and then how did you get it to work?
    @denisbujoreanu And what about using Phone to SBUS as an "emulated" receiver?
    @denisbujoreanu how should I proceed?
    denisbujoreanu
    @denisbujoreanu

    sadly I didn't follow up on the phone-drone initiative. I know there was a kickstarter project trying to get some funds but haven't seen anything on the market to confirm they got it to work consistently.

    From what I recall though, the idea to use a smartphone as flight controller is only limited to how hast it can read data from sensors (gyro, baro, gps, compass, lidar etc.) and produce output commands for the motors.

    Now whether this is done via PWM or SBUS I have no clue, the easiest was to go with PWM since the hardware was somewhat simpler to come by and the connectivity wasn't that much of an issue with the smartphone, if I'm not mistaken it took some sort of OTG-to-UART converter then there was another chip downstream which actually took the outputs from the smartphone and did the conversion to PWM and sent it to the motors.

    Sudarshan-Impace
    @Sudarshan-Impace
    Hi, I have tried changing the flight mode using VehicleApi.getApi(drone).setVehicleMode(VehicleMode.COPTER_AUTO), when i without upload mission plan it work but when i upload mission plan then it show vehicle mode change failed. Let me know if am doing this wrong.
    JustinXangchay
    @JustinXangchay
    does anyone know where to find the android docs for dronekit? or any guides on how to use it?
    OlavAa
    @OlavAa
    Sudarschan-Impace: Several requirements to enter auto mode, like GPS lock. That's the typical cause of a mode change failure.
    danielss24
    @danielss24
    Hello, i am new in ArduPilot, i am trying to use ardupilot as default system for my final work of master. I am trying to develop a system where i can get data from main sensors such as, gyro, accel and so on. I am so interested in ardupilot system cause it has all i need, autohold, automode, altitude control... i bought a beaglebone black and follow the guide to make it run but i got some problems during it, i cant initialize the barometer and cant check my imu (9250) and baro (gy-63). The only restricction i have is that it has to be in C code, any tip or help? Thank you very much
    Pranesh Dhake
    @praneshdhake
    Documentation: http://android.dronekit.io/ not working
    OlavAa
    @OlavAa
    Documentation not available. You have to figure out whatever is needed for your app on your own...