Software - ProjectHexapod/Main GitHub Wiki
To a large degree the design of the software is TBD, to be designed as I (M@) need it in the process of testing and calibrating the robot. That said, here are my current thoughts.
Tech Stack
- Beaglebone Blacks
- Custom Electronics
- Arch Linux
- Device Tree Overlay (drivers)
- Python
- Ethernet -- 0MQ -- Protocol Buffers
Network
- Switched Ethernet, star topology
- BBBs using static IPs
- DHCP for piloting/diagnostics laptop
- Configured to give out the gateway address via DHCP (to enable routing to the internet)
- NTP Cockpit as the host, everything else as a client
Messages
OHSHIT: Any -> Any
Telemetry (RPM/oil temp/hydraulics temp/pressure/what else?): Engine -> Cockpit
Required flow: Cockpit -> Engine
Start/stop: Cockpit -> Engine
Desired gate: Cockpit -> Hips, Legs
Airborne inertia: Cockpit -> Hips, Legs
Leg's contribution to physics: Legs -> Cockpit
Hip position: Hips -> Cockpit
Startup Procedure
Check network
Compute (and distribute) model (including positions)
Engage bypass valves
Start engine
Disengage bypass valves
STOMP
Gaits
Tripod
One up (with any 5+ legs, and 4 legs if the failures are on opposite sides)
Failure Modes
Can't communicate to any host -> STOP
String pot out of range -> STOP
Engine oil too hot -> STOP, engage bypass valves
Hydraulic oil too hot -> STOP, engage bypass valves
Loss of hydraulic pressure -> slow until pressure returns
Child (requires human in the loop) -> STOP
Compliant link out of range -> STOP
Voltage out of range -> Adjust control, alert user
Software Process
We're using two different work flows for the two different repositories. The Main repo, which holds all of our legacy code, experiments, and other incomplete solutions and large blobs, can be committed to by anyone in the group. Similarly, anyone in the group can edit the wiki, if you can't edit this page email me your github username and I'll get you added.
The bbbStuff repo, on the other hand, contains the critical code that will actually run on the robot and as such requires additional eyes on any changes. To commit to bbbStuff, fork the repository, clone your fork, make your changes and once you're ready, send a pull request to the ProjectHexapod/bbbStuff repo. I'll review your changes and if everything looks good I'll merge your changes in. That way all of the code that runs on the robot is subject to review and revision.