My team and I are working on a hybrid quad-copter/rover with both flying and driving capabilities. We are using a Pixhawk 2.4.8 and ArduPilot to program the vehicle’s functions. Because the driving and flying systems are integrated, we are looking for a way to disable the gyro while the vehicle is driving to prevent the gyro from using the fan motors to attempt to correct the orientation of the vehicle while on the ground.
Additionally, the vehicle uses a rear-wheel drive, which is powered by the fan motors. Because of this, we only need to power two of the four motors while the vehicle is driving.
Is there a way to both disable and re-enable the Pixhawk’s gyro and the front two fan motors when the vehicle switches between its “driving” and “flying” modes using ArduPilot/ArduCopter or another program compatible with ArduPilot?
I think you can use Lua scripting for very basic motor control while in “Rover” mode, while maintaining Copter as the primary firmware.
It probably won’t be capable of autonomous navigation on the ground without A LOT of work, but I can envision a simple RC controller in Lua that would at least get you moving on the ground in a Copter disarmed state. You can even incorporate a simple pseudo-arming routine in Lua for a modicum of safety and/or to ensure that you don’t accidentally start moving around while the AHRS is still initializing and/or to disable Copter motor arming while maneuvering on the ground.
If you make some progress and need some further help here, make sure LOG_DISARMED=1 so we can help with log analysis throughout the entire power on cycle.
I plan to host a Lua scripting live stream this weekend that might be helpful to get you started in ArduPilot’s Lua sandbox.
This is really helpful! Thank you for the information, and I will keep that advice on log analysis in mind. I will definitely have either myself or one of my team members check out your live stream this weekend since none of us have much experience with Lua scripting. Thank you for letting me know!