This script assumes:
- that the newest Raspberry Pi OS is installed
- the user running it is pib
All the software pib requires can be installed by running our setup script. Follow these steps to run it:
-
Open a terminal in Raspberry Pi OS
-
Insert the following command into the terminal to download the script:
wget https://raw.githubusercontent.com/pib-rocks/pib-backend/main/setup/setup-pib.sh(or download it manually: https://github.com/pib-rocks/pib-backend/blob/main/setup/setup-pib.sh)
-
Insert this command to run the script:
bash setup-pib.shIf you want to run the setup-script in legacy mode (for Raspberry Pi 4), insert:
bash setup-pib.sh -l
The setup then adds Cerebra and it's dependencies, including ROS2, Tinkerforge,... Once the installation is complete, please restart the system to apply all the changes.
This script assumes that the setup script was executed successfully
- Open a terminal
- Enter this command:
update-pib
This script will update your docker containers (Front- and Backend)
Starting the webots simulation:
- Complete all steps of the "Installing pibs software"-section of this readme document
- If you are running simulation in a virtual machine ubuntu type the following command
xhost +local:root - Navigate to app/pib-backend
cd app/pib-backend - Enter the following command into a terminal:
sudo docker compose --profile pibsim_webots up
(The first time this command is entered, webots will be installed. Webots should open automatically afterwards, to close it you should stop the container by closing the terminal window which is open or by pressing ctrl + c. To run it again just restart the container and if you turned off the virtual machine repeat step 2)
Webots may throw error messages saying it crashed (especially on VM). This can usually be ignored by clicking on "wait".
To synchronize communication between pibs on default ROS_DOMAIN_ID=0:
- Open a Terminal:
- Run the following command:
gedit ~/.bashrc
OR for users connected through terminal:
vim ~/.bashrc - Within .bashrc
delete: export ROS_LOCALHOST_ONLY=1
or replace it with: ROS_LOCALHOST_ONLY=0 - Restart pib
To add pib to a distinct logical network:
- Open a Terminal
- Run the following command:
gedit ~/.bashrc
OR for users connected through terminal:
vim ~/.bashrc - Delete: "export ROS_LOCALHOST_ONLY=1"
- Append: "export ROS_DOMAIN_ID=YOUR_DOMAIN_ID"
- Restart pib
For a range of available ROS_DOMAIN_IDs please check the official documentation at:
https://docs.ros.org/en/dashing/Concepts/About-Domain-ID.html
The backend can be started via docker compose. Since the software requires to interface with the OS hardware (USB,
sound and GPIO) Docker for Windows and Mac is not supported.
Running docker compose up will start the Flask API, rosbridge and the blockly node server. To run the full backend,
including camera, motors, programs and the voice assistant, profiles can be used:
docker compose --profile all uppassword.env required to run the voice assistant:
TRYB_URL_PREFIX=<BASE_URL_Tryb>
For the development process, external developers are requested to refer to the following explanation: https://pib-rocks.atlassian.net/wiki/spaces/kb/pages/435486721/Contributing+to+pib