Open Minion3665 opened 3 years ago
/home/pi/robot
, that should probably be changed if we're not running on a piShepherd on the Brain is launched as a systemd process, the relative path is predictable and settable by the configuration, if you use relative paths then the brain will work, but it will break if you do things like running shepherd not from its actual directory.
We cannot use ~ for home because of reasons, if we did we would still be hardcoding the directory, so its probably "bad".
We could have the installation of Robot and Shepherd as environment variables, this would break deployed brains if the change slipped into a patch.
Possibly the solution is all of the above, use pathlib to search for a known directory ([robot/]robot?) or file ([robot/]robot/__init__.py) from an ENV, then home/pi/robot, then ../robot then ~/robot. Obviously, if we are doing this then we need to add a message on stdout for where we are getting robot from.
We are already doing something like this for other reasons to find the default team image.
Shepherd uses the raspberry pi GPIO pins and the raspberry pi camera, which means that it can't run without a raspberry pi.
The package
fake-rpi
is in the dev-dependencies on poetry, but is unused when runningsudo python3 app.py
; there is not a module to emulate the raspberry pi's camera.What needs to be done: