Software - focusrobotics/explorer GitHub Wiki

Software Architecture

The robot will have software running on multiple computers and microcontrollers in parallel using various communication protocols to stay in sync. This page attempts to sketch out what the major pieces are and how they interact.

Primary onboard computer

The primary computer (a raspberry pi, at least initially) will handle all external communication via wifi or bluetoth. It communicates with any microcontrollers via serial connections. It will eventually be running ROS. Depending on the power required it may perform SLAM locally. Ideally it will be able to re-flash the microcontrollers so that firmware can be updated quickly and easily. It will provide a web server which can be used to remotely control the robot.

Onboard microcontroller for motor control

The motor controller needs to produce relatively high frequency PWM signals and do realtime tracking of encoder signals and PID calculations. It will also monitor the low level impact detection sensors so that the robot can stop quickly if there is a problem regardless of the state of the higher level processors. It will allow realtime requirements to not be put on the primary computer. All odometry and velocity calculations are done in this device and the results are sent back to the primary computer when requested. The motor controller communicates with the primary computer via a USB serial link.

Possibly additional microcontrollers

I'm planning several sensors for this robot so it may make sense to have other microcontrollers which work as coprocessors to manage those sensors. I haven't yet identified specific cases.

Remote computer(s)

Based on what I've read ROS is somewhat of a resource hog and I know that some of the algorithms I want to experiment with can be pretty resource intensive. Because of this I'm expecting that some processes will be run remotely on desktop computers that communicate with the primary onboard computer via wifi. No specific plans on what will run remotely yet.