chore: replace print with logging and make robot conditional

All print statements in the main program, and components used by the main program, have been replaced with appropriate logging statements. The connection to the robot now only gets made when it's possible, otherwise only the microphone will be run.

ref: N25B-119
This commit is contained in:
Twirre Meulenbelt
2025-10-02 16:13:39 +02:00
parent 2132a74321
commit c634e4b516
3 changed files with 40 additions and 10 deletions

View File

@@ -24,7 +24,11 @@ python -m virtualenv .venv
source .venv/bin/activate
```
Before installing the Python packages, you'll need to have the `portaudio` system package installed.
To be able to install the PyAudio Python package, you'll need to have the `portaudio` system package installed. On Debian or Ubuntu:
```shell
sudo apt install portaudio19-dev
```
Then you can install the required packages with
@@ -61,7 +65,14 @@ python -c "import qi; print(qi)"
You should now be able to run this project.
### MacOS
...
On ARM CPU's, pyenv doesn't want to install Python 2. You can download and install it from [the Python website](https://www.python.org/downloads/release/python-2718/).
Create a virtual environment as described in the Linux section.
Then build `portaudio` for x86_64 CPU's.
Then follow the remaining installation instructions in the Linux section.
## Running
Assuming you have the virtual environment activated (`source .venv/bin/activate` on Linux) and that you have a virtual robot running on localhost you should be able to run this project by typing