Vehicle isn't executing target depth command correctly

Have you tried running it without the yaw command? Your current manual control message is always specifying values for horizontal and vertical movement together with the yaw rotation, which means depth-hold mode will then wait for the vertical commands to stop, after which it accepts the current depth as the target to maintain. When you have the ‘set depth target’ in the while loop with the yaw command then they’ll be fighting with each other.

The mavlink docs for MANUAL_CONTROL specify that INT16_MAX (2^{15} - 1 = 32767) indicates a given axis is invalid, so you may be able to specify that for the ones you don’t want to give explicit values for. If that doesn’t work then it should at least be possible to use RC_CHANNELS_OVERRIDE instead, since that explicitly ignores channels that are set to UINT16_MAX (2^{16}-1 = 65535), which is what we use in our Send RC (Joystick) Pymavlink example.

If neither of those approaches work then please confirm your companion, ArduSub, and Pymavlink versions so we can try to troubleshoot what’s going on.

By the way, this post is quite confusingly formatted. I’d suggest you have a look through the Formatting a Post/Comment section from my recent “How to Use the Blue Robotics Forums” post - you’re likely interested in the “Headings” subsection :slight_smile: