The Webots application opens up some neat opportunities for online robotics puzzle-solving, and today we are going to try to install it. These instructions are mostly the same for Windows and Mac users, but we will specify when they are not.
Step 1: Downloading and Installing Webots
Download the Webots installer by going to: https://cyberbotics.com/
Press the drop down button and choose the correct version for your system
Run the installer, and let Webots install in the default directories.
Step 2: Downloading Python and Connecting It with Webots
First, we must make sure we have Python 3.8 installed somewhere.
Note: It must be a version of Python 3.8 in order for Webots packages to work correctly (as of 2/24/2021)
Head to https://www.python.org/downloads/ and download some version of Python 3.8, it does not matter which one. Install it in the default path.
Now we must point Webots towards the correct directory for our new Python version. Open up the Webots application. If you are on Mac, your system may block the opening of Webots since it's an unknown developer. Head to System Preferences -> Security & Privacy -> General, and select "open anyway" to fix this issue.
Run through the getting started tour if you'd like. It may be useful for understanding the dynamics of the Webots application, as it is quite different from the web-based version and we will not go over it in detail.
Once you have completed the tutorial, navigate to Tools -> Preferences in the Webots app. There is a line called "Python command", which may have "python" inputted as a default. We are going to change this line to point to our installation directory of Python 3.8.
On Windows: Launch the command line (cmd) and enter the command: "where Python38/python.exe". This command should return a file path to your Python 3.8 executable. Copy this path, and enter it into the "Python command" line in Webots.
On Mac: Launch terminal and enter the command "which python3.8". This should return a file path to your python 3.8 directory. Copy this, and enter it into the "Python command" line in Webots.
Now we should have Python connected to the Webots app, but we still need to check everything is working correctly. Our next tutorial will guide you through implementing the Square Path challenge in the application.
Comments