Skip to content

Unable to control the drone with MavSDK-Java Manual Control Plugin  #193

Closed

Description

@Ba0Nguyen

Ardupilot v4.6 (latest SITL)
MavSDK 2.0.1
SITL starting command: sim_vehicle.py -v Copter --console --map --out=IP:14540

Hi, I am unable to control the drone in Ardupilot SITL using the MavSDK-Java ManualControl Plugin, do you have any tips for this problem?

`val completable = mavSdkDataWrapper.manualControlWrapper.move(x, y, z, r)

           completable?.subscribe({
                Log.d("MotionEvent", "Move Success")
            },{ e ->
                Log.d("MotionEvent", "Error move: ${e.message}")
            })

`

I'm creating mavsdk server with systemId 245 and compId 190
mavSdkServer.run("IP:14540", 0, 245, 190)

I read another thread that it is solved with systemID 245, I tried that but it still not working and I am not able to control my drone in SITL.

Activity

  1. Ba0Nguyen commented on Dec 3, 2024

    @Ba0Nguyen
    Author

    I was able to receive success results but the drone is still not moving. Tried both Position Hold and Loiter mode.

  2. julianoes commented on Dec 3, 2024

    @julianoes
    Contributor

    Regarding the system ID, you can also change the sysid ArduPilot listens on using a parameter. I'm not sure why it wouldn't move though.

  3. Ba0Nguyen commented on Dec 3, 2024

    @Ba0Nguyen
    Author

    Do you think SITL might have the wrong set up where it is not receiving manual control commands from my joysticks?
    If a get a result success from using the move() function from the Manual Control Plugin then MavSDK should forward the command successfully I think.

  4. Ba0Nguyen commented on Dec 3, 2024

    @Ba0Nguyen
    Author

    @julianoes I think the problem is how I start SITL, I just need to add the following "output add IP:PORT" to the command line, set the SYSID_MYGCS to the correct one and it is working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions