Hi everyone. Today I began experimenting with the new NAV_SET_YAW_SPEED command. After a few tries (and software updates) I got it to work. Well, more or less.
My setup is an onboard companion computer, Pixhawk and Dronekit Python. I can get the rover to move and then stop. After I stop the vehicle by sending a NAV_SET_YAW_SPEED command with velocity of 0, I issue vehicle.close() and the script terminates. So far, so good.
Then if I run the script again, I see an endless stream of the following message:
’>>> NAV_SET_YAW_SPEED not record last 3secs, stopping’
These start as soon as I connect to the vehicle, before any other part of my script runs. It’s as if the script is still running from the previous time. The second run will succeed but the above message scrolls the entire time.
So, what am I doing wrong? How do I get the rover to stop expecting the NAV_SET_YAW_SPEED commands so that the script can terminate properly?
The NAV_SET_YAW_SPEED command should be continually updated. You don’t send it once - you send it repeatedly continually updating the YAW and SPEED. Its why its telling you it hasn’t seen it in the last 3 seconds.
What mode have you left the Rover in when you terminate the script?
Grant - thanks for taking time to reply. I am sending the command multiple times (though just a few during this initial test) at 1 second intervals. The last one I send sets both parameters to 0. I’ve tried leaving the mode as GUIDED and changing to MANUAL - there’s no change in the behavior I’m seeing.
I know I’m doing something wrong – I’m just not sure what.
You might not be doing something wrong - could also be a bug as I haven’t long implemented that feature. Your probably the second person in the world using it. You should definitely go out of GUIDED mode.
I’ve been changing to MANUAL mode. The error still occurs but it doesn’t seem to affect anything, as far as I can tell. I may try HOLD mode.
@gmorph yep the Nav_Set_Yaw_Speed function is spamming until you leave guided mode. For guided velocity, I solve this with quiting guided_set_yaw to normal guided : see https://github.com/ArduPilot/ardupilot/pull/5735/commits/2eae499f0fd1ff136da3000c1e26af2f9e5c8696#diff-630bdc087a6a3d1f4f27b0b87f8d2f84R402