ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
11.09k stars 17.66k forks source link

Rover: anti spin and stability control #17157

Open Supermagnum opened 3 years ago

Supermagnum commented 3 years ago

Feature request

Anti spin: The spinning wheel(s) is slowed with less PWM or braking to its motors ESC, diverting more torque to the non-spinning wheels.

Electronic stability control: Braking or less PWM is automatically applied to wheels individually, such as the outer front wheel to counter oversteer, or the inner rear wheel to counter understeer.

The reason for the combination of a request for these features is that they are related to each other.

Platform [ ] All [ ] AntennaTracker [ ] Copter [ ] Plane [X] Rover [ ] Submarine

mikerob commented 3 years ago

A very useful first step for this would be single-pin wheel speed encoding via simple pulses (rather than quadrature encoding that needs two pins per wheel). For this functionality you don't need wheel direction, only speed.

In addition to anti-spin, it will also give you ABS.

There's already a level of stability control to counter under- or over-steer via the steering PID yaw rate controller.

geofrancis commented 3 years ago

a much simpler way of doing this would be to use a motor controller with telemetry and a script to reduce power to the fastest motor if it goes more than a set rpm faster than the slowest wheel.

haplm commented 3 years ago

@geofrancis - do you know about a ground esc with RPM telemetry, decent braking, and possibly reverse?

geofrancis commented 3 years ago

@geofrancis - do you know about a ground esc with RPM telemetry, decent braking, and possibly reverse?

any VESC controller can do UAVCAN and braking, a blheli32 esc with telemetry might work but i am unsure if it can brake.

haplm commented 3 years ago

Ah, thanks, interesting. Kotleta20 seems even more fitting my use-case.

However, I've read the Lua script API documentation, and there doesn't seem to be an object supporting reading RPM from the ESC telemetry - only get_usage_seconds(channel) seems to be supported. Is there an undocumented function that I could use?

haplm commented 3 years ago

Noticed the method RPM: get_rpm(instance). I assume that I can use the CAN ESC (or BLHeli with telemetry) as the instance, correct?