Flipping a Skid Steer Rover in Real-time for Inverted Driving

Hey Ardu-people!

I have been experimenting with using Rover for a project I am working on, and have run into a wall of sorts regarding driving a rover upside-down / inverted. Specifically, I want to invert my RC controls whenever my rover is upside down.

There’s a companion computer onboard, so I’m able to process the telemetry and understand the vehicle’s orientation. This is used to do several things including flipping the onboard camera stream to match the “right-side-up” orientation when the vehicle is “upside-down”. The issue I’m having is with respect to changing RC parameters without restarting the flight controller.

I have tried:

  1. using the SERVOx_REVERSED parameter to reverse the output of my left and right wheels when upside down. This does not work because when the servo is reversed I simply start moving backwards. Oops!
  2. I am not able to update my flight controller’s SERVOx_FUNCTION to swap throttle left and throttle right because this requires a autopilot reboot.

Currently considering some type of RC input remapping, where the min and max PWM for the steering input is reversed. Not sure how to go about implementing this, so I’d appreciate any help folks here can provide.

Thanks,
Aaditya

Use Lua scripting. Have ThrottleLeft and ThrottleRight map to “dummy” outputs that you poll in the script. Then have the actual outputs mapped to Scripting1 and Scripting2, corrected by the script for orientation. You probably don’t even need a companion computer to detect the orientation change. Just look for a large, negative roll or pitch value.

You may still encounter compass and positional issues that I’m not entirely sure how to solve. But the above should at least work for RC driving.

1 Like