I don’t know about the motors, but you can get a PCA 9685 that works over i2c directly with the pi, and skip the arduino. They are like 3 bucks off ebay. I have made the arduino the i2c slave as well, but I ended up with crashes with the b model. I think it had to do with clock stretching.
I have those boards, and can get servo working ok with some test-script. But is there somewhere in ardupilot code option to change output from servo-pwm to linear 0-100% and another pin controlling direction?
I looked it up because I need to do the same thing, but I was going to use the PFXMINI board type with the rt kernel extensions, and a pair of brush motors. Kind of like this:
There is brushed motor support.
APMrover2/AP_MotorsUGV.cpp:
// parameters for the motor class
const AP_Param::GroupInfo AP_MotorsUGV::var_info[] = {
// @Param: PWM_TYPE
// @DisplayName: Motor Output PWM type
// @Description: This selects the output PWM type as regular PWM, OneShot, Brushed motor support using PWM (duty cycle) with separated direction signal, Brushed motor support with separate throttle and direction PWM (duty cyle)
// @Values: 0:Normal,1:OneShot,2:OneShot125,3:BrushedWithAPMrover2/AP_MotorsUGV.cppRelay,4:BrushedBiPolar
// @User: Advanced
// @RebootRequired: True
I had some help from a book and on a couple of sites but I came up w/ some software for a related board w/ the L298. See here: https://github.com/silver2row/flack.
I have a similar board and thought you could use some advice. Although I am using the BeagleBone Black on this project. Adafruit promotes their findings of I/O w/ the Raspberry Pi.