This repository stores code for the course: Machine Learning & Self-Driving Cars: Bootcamp with Python Exercises - Get Lectures
Install on Debian-based systems (i.e. Ubuntu), open a terminal and paste the following commands (shortcut: Ctrl+Alt+T), then paste:
wget -qO- https://cyberbotics.com/Cyberbotics.asc | sudo apt-key add - # Add the key with the command
sudo apt-add-repository 'deb https://cyberbotics.com/debian/ binary-amd64/' # Add the repository
sudo apt-get update
sudo apt-get install webots # install Webots
Alternative you can install it through the snap store:
sudo apt-get install snapd
sudo snap install webots
Official documentation - link
You can install everything necessary in Linux by executing the following on a terminal.
cd ~/Code/Self-Driving-Cars-Course/0_install # set the right path, this will work with the default path
./install_linux.sh
Note: This method should work for: Ubuntu, Fedora, Arch-based distros
Install:
sudo apt-get install python3
sudo apt-get install ~/Downloads/code_*.deb
To set up the environment variables, open a terminal and run the following commands:
echo "export WEBOTS_HOME=/usr/local/webots" >> ~/.bashrc
echo "WEBOTS_PYTHON=${WEBOTS_HOME}/lib/controller/python" >> ~/.bashrc
echo "export PYTHONPATH=${PYTHONPATH:+${PYTHONPATH}:}${WEBOTS_PYTHON}" >> ~/.bashrc
echo "export PYTHONIOENCODING=UTF-8" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${WEBOTS_HOME}/lib/controller" >> ~/.bashrc
Validate intallation, run the following command:
PYTHONPATH=$(echo $PYTHONPATH | tr ':' '\n')
last_element=$(tail -n 1 <<< "$PYTHONPATH")
ls ${last_element}/controller/robot.py
Should output something like:
/usr/local/webots/lib/controller/python/controller/robot.py
Otherwise your Python won't have access to the Webots library. If you get something like ls: cannot acces...
then you need to make sure that the paths you entered are present in your machine (feel free to contact the repo owner if you are having issues with that).
Official documentation - link
Official documentation - link
Install:
Install the required Python libraries:
cd ~/Code/Self-Driving-Cars-Course/0_installation
pip3 install -r requirements.txt
Set the required environment variables
Official documentation - link
Each section has a set of files, the ones that have leading numbers (i.e. 1, 2, ...) are the ones that should be executed, in the order marked by the leading numbers.
Some of them require some preparation (i.e. run Webots simulator, download dataset):
NOTE: When it requires any Webots world (.wbt) you can open it in Webots by clicking "File-->Open World".
If you have any problem with the code the best way to contact me is Udemy Q&A section. Leave your question there and I'll answer as soon as possible!