Hi Youssef,
Are you trying to use the ROV with a joystick connected? As per this post you likely need to disable joystick input in QGC or disconnect your joystick while you’re trying to use your script-based control, as otherwise the ROV is sent conflicting information from your script and QGC.
It may also be worth trying to use MANUAL
mode (instead of STABILISE
) to make sure ArduSub is only doing what you’ve asked it to, and only when you’re asking it to do so.