Connecting to drone simulation, Java

Hi everyone,

I’ve installed gazebo and PX4 in my windows machine, using wsl. In my Java program, I have added the io.mavsdk:mavsdk:1.3.1 dependency.

When I create an instance of the System class, and try to send commands, nothing happens

I’ve different ports with no success. Any help?

Keep in mind, I’m creating a desktop app, not an android one

Can you share the connection code?

Let me ping @JonasVautherin as he might be able to help with this.

 void fun Drone(int port) {
        // Connect to the drone
        System drone = new System("localhost", port);

dependencies {

    // MAVSDK-Java dependencies

    // SLF4J binding

    // Logback logging framework

Can you share more of the code where you actually call Drone and with what port argument?

And are you aware of this example?