These are chat archives for dronekit/dronekit-android

20th
Apr 2016
jwerner37
@jwerner37
Apr 20 2016 01:26
This message was deleted
So this is what I have thus far. It's a compilation of the above, random snippets from the few things I could find online, and what it takes to remove errors during compiling. I call the method with a button in the app for testing and the button functions but nothing gets sent.
jwerner37
@jwerner37
Apr 20 2016 02:02

@chaviw So this is what I have thus far. It's a compilation of the above, random snippets from the few things I could find online, and what it takes to remove errors during compiling. I call the createpose3 method with a button in the app for testing and the button functions but no mavlink message gets sent (nothing is seen happening in the android dev monitor or via any of the SITL setups I have been using to monitor mavlink messages)

@ne0fhyk I saw that you mentioned the experimental API here a few months back. Any insight on why this might not be working?

As always, thanks everyone for your help!


  public void createpose3() {

        msg_att_pos_mocap msg1 = new msg_att_pos_mocap();    // create new message
       msg1.time_usec = 1000 * t1;                                                                   // t1=timestamp of pose in milliseconds - needs to be in micro
        msg1.q = q1;                                                                                                //array[4] of rotation data 
        msg1.x = x1;                                                                                               // x position float
        msg1.y = y1;                                                                                                // y position float        
        msg1.z = z1;                                                                                               // z position float
        ExperimentalApi expApi = ExperimentalApi.getApi(drone);       // get a new experiemental api instance
       expApi.sendMavlinkMessage(new MavlinkMessageWrapper(msg1));       // create a new messagewrapper with the mocap message and call the send action

    }
chaviw
@chaviw
Apr 20 2016 05:23
@jwerner37 It’s hard to tell what the issue could be without debugging it myself. The best thing for you to do is to set breakpoints in your code to ensure that everything on your end is executing properly. If your code is executing properly, you can checkout, build, and run the 3DR Services code and add breakpoints there. If 3D Services code is functioning fine, it may be an issue with the verison of SITL you’re running. The verison of SITL may not suppor that message