Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does this dronekit-android work for PX4? #441

Open
seantobe opened this issue Sep 12, 2016 · 4 comments
Open

does this dronekit-android work for PX4? #441

seantobe opened this issue Sep 12, 2016 · 4 comments

Comments

@seantobe
Copy link

Dear all:
I am trying to develop an Android APP that can take off PX4 simulator JMAVSim. I have successfully compiled and run the code using Android Studio( following the link in "http://android.dronekit.io/first_app.html"). Am I doing it right? If I turn on JMAVSim, and run my APP, would it work? Thanks for replying.

BR
Sean Hsu

@squilter
Copy link
Member

squilter commented Sep 12, 2016

The major issue with PX4 compatibility is changing modes. The standard method of changing modes in dronekit-android will not work. You will have to use the ExperimentalAPI and send the mavlink packet yourself. You can model it after this.

@seantobe
Copy link
Author

seantobe commented Sep 13, 2016

Hi:
3q for replying. I will try the way your recommanded later on. However, I cannot even connect to the JMAVSim by UDP port 14550. Please let me know what the problem is, appreciate it. I posted my code below.
Step 1: make posix_sitl_default jmavsim//start the simulator
Step2: run my APP and press the connect buttun (onBtnConnectTap)//---->cannot connect

public void onBtnConnectTap(View view) {
if(this.drone.isConnected()) {
this.drone.disconnect();
} else {
Bundle extraParams = new Bundle();
extraParams.putInt(ConnectionType.EXTRA_UDP_SERVER_PORT, 14550); // Set default port to 14550

            ConnectionParameter connectionParams = new ConnectionParameter(ConnectionType.TYPE_UDP, extraParams, null);
            this.drone.connect(connectionParams);
    }

}

@IeiuniumLux
Copy link

IeiuniumLux commented May 2, 2017

I recently tested DroneKit-Android with the PX4 flight stack via their experimental api and it works well as show here.

@HansHG
Copy link

HansHG commented Jun 18, 2017

Hello IeiuniumLux,

is it possible to get your test code?

Regards HansHG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants