Vehicle:set_desired_speed() - working sometimes

Hi, Im gettng odd behaviour when changing speed

Qiotek Zealot H743, Ardurover 4.4-beta11 - working well (really well)

I’ve modded Yuri’s rough_terrain.lua script (Thanks Yuri - and apologies for what ive done to it) to also slow down if the ICE motor goes below an RPM threshold.

I’ll do more testing tomorrow - and see if i can just speed up / slow down based on a RC switch - and get an idea of when its working - but until then, any idea’s ??

It seems to execute the command with no error - but not change the vehicle speed, except for around the very first waypoint - which it crawls away from, then times out and changes speed back to 0.7 (successfully). No further slowdowns until the mission is reset.

the code block is sending 0.3 through to the mission planner, so that block is being executed.

Thoughts or ideas on next steps appreciated, and thanks from a very hot New Zealand summer.


function initiate_rough_speed()
    gcs_msg(MSG_NORMAL, MAV_SEVERITY_WARNING, 'Slowing for rough terrain')
	--gcs:send_named_float('WP_SPEED', wp_speed_rough)
	gcs:send_named_float('WP_SPEED', 0.3)
	vehicle:set_desired_speed(0.3)
	--vehicle:set_desired_speed(wp_speed_rough)
    last_g_z   = 0
    timeout_ms = millis() + rough_terrain_timeout_ms
    max_g_z       = 0
    max_gyro_rate = 0
    return do_rough_speed, RUN_INTERVAL_MS
end

Backup your parameters and update to ArduCopter 4.4.4 stable. It should fix most issues.

but its a rover… skid steer might suffer with arducopter… ??

Sorry, missread the information.

I played around a bit with it today. The speed is strongly influenced by the position of the throttle. If its mid-centered on the AUTO mission, then set_desired_speed works as expected If the stick is High or Low, then behavior becomes less obvious, and may be ignored, or delayed a number of seconds (up to 10?).

Setting a slow desired speed, then raising the throttle lever - will reset to the high AUTO speed. Mostly.

Its now useful to me. My challenge - big clumps of long grass which needs (higher blade RPM, Higher Deck height or both) to stop the ICE motor stalling. On the paddock just mowed - its a full time job doing it manually. After the first mow - it will become less intensive…

That seems like odd behavior and perhaps unintended. @rmackay9, do we have a speed nudge feature in Rover that is acted upon using the throttle? Maybe I missed that someplace…

Hi @Yuri_Rage,

Yes, we have speed nudging based upon the pilot’s input throttle. From a quick check there is no way to disable it but we could add a parameter if you like.

1 Like

That certainly explains the frustration above. My Rover radio’s throttle is spring loaded to neutral, and I never have much reason to manually nudge speed during missions, so it’s simply a non issue for me.

Thanks Yuri, Randy.

Throttle nudging is excellent. No further changes required/wanted from me now that i know how to get the desired speed working consistently (mid throttle). It was more trying to figure out what was happening which took a while to figure.