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?

I have included all dependencies which you have mentioned above still, I’m getting this error:

import org.slf4j.Logger
The import org.slf4j.Logger cannot be resolved.

import org.slf4j.LoggerFactory;
The import org.slf4j.LoggerFactory cannot be resolved.

how to build this project as maven or java.I made maven project added dependencies in POM.xml file.

Thanks in advance.