While testing my rover recently, I had one of the most counterintuitive experiences in my decade long rc career with catastrophic results.
In AUTO, I was tweaking cruise speed while running a looped mission. Naturally, without tweaking steering params the rover would take wider turns as speed is increased.
When it became apparent that my rover will not make it's next turn, I tried to slow it slightly to clear the upcoming curb.
As it turns out, "throttle nudge" only nudges forward, Even when commanded to slow, throttle increases. I accelerated for the remaining 2.5m into a solid concrete block. The results were disastrous to say the least. The most damage I've ever seen from a single crash, and I launch my rover from 7' dirt jumps regularly. (Occasionally in auto, but that's another story with it's own set of difficulties)
I know that braking is fairly new in the rover code, and it's likely that throttle nudge has not been updated to reflect this. I did find mention of "throttle_nudge" in the radio.cpp file (line58), but I haven't a clue how to modify.
Any help would be appreciated.
Hope this post prevents others from such devastating crashes.

Mike

Views: 846

Replies to This Discussion

@dr0n3droid,

Active braking has been available in the ArudRover2 firmware since early 2014 (v2.46b).

Tridge and I developed it to improve the capabilities of the navigation controller to meet the SPEED_TURN_GAIN requested cornering speeds as passively reducing the throttle input and increasing the SPEED_TURN_DIST values when approaching a turn was still leading to turn overshoot and rollover at increasingly higher cruise speeds. 

I use the following values for braking:

BRAKING_PERCENT 75

BRAKING_SPEEDERR 1

The braking function will assist the navigation controller in meeting the values of the following two parameters when entering a turn.

Also, the following two parameters affect how fast the rover will take a turn:

SPEED_TURN_DIST

SPEED_TURN_GAIN

The SPEED_TURN_GAIN parameter sets the speed in a turn that is a percentage of the CRUISE_SPEED parameter.

The higher the CRUISE_SPEED the lower the value of the SPEED_TURN_GAIN parameter, in relation to your rover's cornering ability, and the higher the value of the SPEED_TURN_DIST parameter which is the distance from the beginning of the turn that the navigation controller will start slowing to meet the SPEED_TURN_GAIN requested speed.

Tweaking the CRUISE_SPEED upwards without adjusting the SPEED_TURN_GAIN downward is asking for trouble if you are approaching the rover's limit in being able to negotiate a turn without overshoot or rollover.

Judiciously applying these parameters in relation to the capabilities of your rover to negotiate a turn will keep it from overshooting the turn or rolling over.

During the 2014 Sparkfun AVC my Traxxas 4WD Slash rover was able to enter the 90 degree left turns at 10m/s and complete the turns at 5m/s without overshoot or rollover.

Had I been in your position, and I have been many times, I would have gone to the Manual Mode and applied full reverse throttle to save the rover.

Regards,

TCIII AVD

@TCIII
Early '14 in beta firmware as I recall, officially announced on August 25, 2014. (V2.46) So I guess it has been a year. You're right Thomas.
In this instance I'd set SPEED_TURN_GAIN to 100% as I was looking for the fastest possible cornering speeds. (For T3 attempt) slowly increasing cruise speed with TURN_MAX_G set to 0. Trying to push it to it's limit. Managed 9m/s on asphalt without slowing at all.(Wide 135° turns)
Tuning tips are always appreciated. Thank you Thomas.
If I "nudge" the brakes should rover accelerate? Probably not, Hence the post.
Switching to MANUAL is fine if you have the time. After rebuilding, that has been my goto maneuver. MANUAL-full reverse. However in a split second reaction, the mode change doesn't happen fast enough and my full reverse is accepted while still in AUTO. This causes acceleration(THROTTLE_NUDGE) before switching to MANUAL to lock up the brakes. Clearly not ideal behaviour. I do very much like the T_nudge feature. If my rover completes a turn successfully, I can nudge it a little on the next lap rather than changing CRUISE_SPEED which would affect the entire course.

Here's what I've found so far,

if (abs(channel_throttle->servo_out) > 50) {
throttle_nudge = (g.throttle_max - g.throttle_cruise) * ((fabsf(channel_throttle->norm_input())-0.5f) / 0.5f);
} else {
throttle_nudge = 0;


If throttle_servo_out = throttle_control_in, and if servo out is >50, throttle_nudge.
The part I'm not understanding is that if throttle_control_in has gone low(brake), servo_out is >50?

Mike
Attachments:

The "throttle nudge" is from the plane code which doesn't have a need for reverse.  Your talking about being in AUTO mode with a cruise speed set but then being able to push the throttle on the transmitter past that point and the rover will increase in speed right?

If you pulled back on the throttle stick and the rover increased in speed then that's an issue.  Could you send the dataflash log (.bin) downloaded from your autopilot?

Thanks, Grant.

That's correct. When I nudge the brake, rover accelerates.
The log from the crash was corrupted, I assume because the batteries were ejected on impact. I'll do it again in a few mins. Just remounting the motor now.
Well it seems my problems continue. Pixhawk in my rover will not connect via USB for some unknown reason. Timing out. If I connect via telemetry, it's showing 'no logs to download'

No issues with the pixhawk in my copter. They're both here on the bench, I'm using the same 900mhz(ground) and usb cable. I'd assume it's an issue with the rover's pixhawk.
Any idea what would cause all logs to vanish?
The last log dump I did was on July 9. Everything after that is gone

Turns out that my sd card had been ejected from the pixhawk.   Luckily, the sd was not lost.  It was 2/3 of the way out of the pixhawk.  I pulled it out and copied all logs to my desktop.  368mb in under 10 seconds?  I'll be dumping logs this way from now on.

Here's a log showing the "nudge" issue.  

Attachments:

Already reported in Feb last year - https://github.com/diydrones/ardupilot/issues/840

Thanks for pointing that issue out Mike.

I have replicated the issue in SITL.  I'll have a fix in master shortly.

Thanks, Grant.

Great to hear, thanks Grant. 

Once straightened out, it'll give me a little more confidence when approaching obstacles.  This past week I've been overly cautious, switching to manual 5-8 meters early to avoid incident, though I did run under the bleachers again yesterday. Oops!  Thankfully no damage this time.

Thanks again,

Mike 

My personal approach is to flick a switch and go into HOLD mode rather then MANUAL.

I'll let everyone know when the code has been updated.

Thanks, Grant.

Will HOLD apply the brakes?
I haven't had HOLD on my mode switch since '13, pre-brake.

Mike

No - it won't apply the breaks - yet :-)

Thanks, Grant.

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service