Can't move forward AUV in QGroundControl with SITL

I have an underwater vehicle that communicates with the ground station via Mavlink. Also, I have been using a SITL Simulator to simulate and check my codes. I have been attempting to connect the vehicle to the SITL in order to make it move forward on QGroundControl vx.x.x using the provided code. However, even though I have successfully armed the vehicle and it has connected to the SITL, I am unable to make the AUV move forward. Here is the code I have been using:

What are some potential causes for this issue, and how can I troubleshoot it?

Instead of doing so use

Simple_goto() function

point1 = LocationGlobalRelative(-35.361354, 149.165218, 20)

:grinning: :grinning:

But this is for drone_kit api, not pymavlink which I prefer.

To move a drone forward using Dronekit API and QGroundControl, you can send a command to the drone to set its velocity in the forward direction. Here are the steps you can follow:

  1. Connect to the drone using Dronekit API. You can use the following code to connect to the drone:
from dronekit import connect

# Connect to the drone
vehicle = connect('udp:')
  1. Arm the drone using the following code:
vehicle.armed = True
  1. Set the mode of the drone to GUIDED using the following code:
vehicle.mode = VehicleMode("GUIDED")
  1. Send a command to the drone to move forward at a certain velocity. You can use the following code to move the drone forward at a velocity of 5 m/s:
from dronekit import VehicleCommand

# Create a command to set the velocity in the forward direction
cmd = VehicleCommand()
cmd.command = 3000
cmd.param1 = 5

# Send the command to the drone
  1. Monitor the drone’s position and velocity using the QGroundControl application. You can use the “Vehicle Instruments” panel in QGroundControl to view the drone’s position and velocity in real-time.

Note: Make sure you have the necessary permissions and follow all safety guidelines when operating a drone.

Thank you but I want to use Mavlink Mavutil