![arslogo](/corradosantoro/RoboticSystems/raw/main/.github/images/arslogo.png)
Software Simulation Environment for the Robotic Systems Course @ UniCT by Prof. Santoro Corrado
Table of Contents
The simulation environment can be installed in many ways, choose your preferred one.
First of all, you need to download this repository on your machine. You can download this repository as a zip file or use git clone command:
git clone https://github.com/corradosantoro/RoboticSystems
We are going to create a virtual environment to contains all the dependencies.
-
Install Python 3 on your system, at the time of writing it is recommended Python 3.9 or newer:
-
Linux (Debian-based):
sudo apt install python3 python3-pip
-
Linux (RHEL-based):
sudo dnf install python3 python3-pip
-
Windows and macOS:
Use the proper installed provided on the official Python website
-
-
Create a virtual environment, open a terminal inside the
RoboticSystems
folder and execute the following command:python -m venv ./venv
-
Activate the virtual environment:
- Linux (bash shell) or macOS:
source ./venv/bin/activate
- Windows (cmd.exe):
./venv/Scripts/activate.bat
- Linux (bash shell) or macOS:
-
Install the required dependencies using
pip
:python -m pip install -r requirements.txt
Depending on your Windows and WSL version you may need to install a Xorg server on your machine.
On Windows 11 you can install WSL from Microsoft Store which contains WSLg, needed to run graphical applications on WSL.
- Install
Windows Subsystem for Linux
from here - Install a WSL Linux disto, Ubuntu 22.04 LTS or later is recommended
- Follow the Pythonic Way steps for a Debian-based distro, you may need to clone this repository inside Linux filesystem
On Windows 10 you can enable the embedded WSL system-binary, but you will need to install a Xorg server to run graphical applications on WSL.
-
Enable WSL system-binary running the following command, be sure to run with administrator privileges:
wsl --install
-
Install a WSL Linux disto, Ubuntu 22.04 LTS or later is recommended
-
Download and install VcXsrv.
-
Open VcXsrv and follow these steps:
-
Open a terminal and execute:
cat /etc/resolv.conf
Take note of the nameserver.
-
Add environment variables on your bashrc profile:
cd $HOME && nano .bashrc
At the end insert:
export DISPLAY=<nameserver>:0.0 export LIBGL_ALWAYS_INDIRECT=1
Use
CTRL+X
and then pressY
to save and exit. -
Logout and login from the current session or refresh bash profile running:
source $HOME/.bashrc
-
Follow the Pythonic Way steps for a Debian-based distro, you may need to clone this repository inside Linux filesystem
Before running any script you need to activate the virtual environment containing the required dependencies:
- Linux (bash shell) or macOS:
source ./venv/bin/activate
- Windows (cmd.exe):
./venv/Scripts/activate.bat
You can now run any scripts of the simulation environment, example:
python ./tests/card_1d/test_card_gui.py