This is a rover I've been developing to knock some rust off of some old autonomous rover work I've done in the past as well as take advantage of the new Community Edition of LabVIEW that's been released and includes support for deploying to Raspberry Pis and BeagleBone Blacks among other included microcontroller integrations.
The rover is comprised of a Raspberry Pi (currently a 2B) that will be handling the high level integration and planning based on the various sensors. There's an ATmega328p in the base that handles the odometry and motor control maths that's connected to the Pi via I2C. The rover also has an Adafruit ultimate GPS, BNO055 IMU, and will eventually include a set of 6-8 sonars for low level obstacle avoidance and an XV-11 lidar for mapping and planning. The sonars will be coordinated via an additional Arduino Nano clone and the Lidar will also be interfaced with an arduino nano that will forward everything to the Pi.
Raspberry Pi 2B
Arduino Nano clone
Motor control, Sonar coordination, lidar interfacing
Adafruit small caster wheels
Sparkfun 1000mAh 7.4V LiPo batteries
I've figured out where my problems were coming from with the PID velocity control!
1. I was trying to be too efficient. Trying to reuse the volatile variables means they were likely updating in the middle of a PID routine resulting in drastically incorrect floating point representations for some of the tuning parameters and control setpoints causing the PID calculations to basically stop. I've since setup signalling from the ISR handlers to the main loop so that the main loop can know when to pull volatile variables into local non-volatile variables that are used in odometry and velocity control.
2. I'm occasionally missing capturing when the I2C library should be receiving a value as a register location instead of register content data. This was resulting in the output range max value getting set to 0 which of course means no more PID output. Still need to track down why this is happening but I'm very close to getting to very tight joystick control of the rover!