100% Guaranteed Results


CS 7638 Robotics:AI Techniques – Environment Setup Solved
$ 29.99
Category:

Description

5/5 – (1 vote)

Introduction
This document will walk through setting up your local development environment or a virtual machine. Setting up your environment will ensure that you have an appropriate version of python installed along with the necessary libraries used in this course. If you are totally new to Python, you can refer to https://docs.python.org/3/tutorial/index.html to understand the basics of Python. All problem sets and projects in this course are designed to use Python 3, and we recommend Python 3.10. The autograder tool, Gradescope, uses at least version 3.10.12.
If you are comfortable setting up your environment on your own, feel free to reference the yaml file for the necessary packages to install. You will also need to install the course specific package (rait), see manual installation instructions below.
Download Setup files
On Canvas, click on Files in the left side menu, select Python Environment Setup, and download the following:
• cs7638_env_setup.pdf (this file)
• rait_env.yml
• test_env_setup.py
• rait/
Note that you can download a zip of this folder by: https://guides.instructure.com/m/4212/l/41998-how-doi-download-a-folder-in-zip-format-as-a-student
Place these files into a directory (you can call it student_env_setup).
Environment setup
1. Download and install Miniconda here https://docs.conda.io/en/latest/miniconda.html. Use the latest python version available. What is Conda? Conda is an open source package and environment management system. We recommend using Conda since it makes it easy to install and manage different versions of libraries without messing up other environments. You are welcome to use Anaconda instead of Miniconda, see this page for more details on the differences:
2. On Windows, open the installed “Conda prompt” to run your commands. On MacOS and Linux, you can just use a terminal window. Change directory (using cd) to the location of the directory student_env_setup (the directory that contains the files rait_env.yml, test_env_setup.py, cs7638_env_setup.pdf, and folder rait/ you downloaded from Canvas).
3. Create a conda environment by running the following command in the “Conda Prompt” (Windows) or Terminal (MacOS/Linux):
conda env create -f rait_env.yml
Manual Installation of ‘rait’ package
If you are not using our instructions above to install your environment, but instead are installing it on your own, then you will need to manually install the rait module. You can do this by downloading the ‘rait/’ folder. Assuming the ‘rait/’ folder is saved in a folder named ‘student_env_setup’ then you will run the following command inside the ‘student_env_setup’ folder: pip install rait/
Check your installation
Now that you’ve installed python and created your environment, you’re ready to verify that you have everything set up correctly! You can run the script test_env_setup.py using your newly installed version of python. It is a simple script that checks the following:
• installed python version
• installed necessary libraries (including the rait specific package)
• unicode characters display correctly (arrows helpful for debugging later in the course)
• GUI library tkinter properly working (a window should pop up with 2 buttons: Click me! and QUIT. The Click me! button should add an extra set of square brackets around the Click me! text each time it is clicked. The QUIT button should make the window disappear.)
You can run it by: python test_env_setup.py
Note: Be sure to activate your rait_env before running the above command.
Installation Troubleshooting
• Arrows not displaying
It is likely the case that you do not have a font on your machine that is able to display these specific unicode characters. You can install the symbola font which is able to display these characters. (Mac & Windows: You can download the font here or find it through a google search).
Linux: sudo apt install fonts-symbola
Mac: How to install a font on Mac
Windows: How to install a font on Windows
• Arrows (still) not displaying
• Tkinter not working correctly on Mac
Mac: brew install python-tk@3.10
• Buttons on GUI pop-up are all white (no text)
• Using WSL on Windows (GUI issues)
RAIT Virtual Machine (VM) Image
PyCharm Setup
Please note that the instructions below are for high-level guidance specific to Linux for PyCharm Professional
1. Download and setup PyCharm https://www.jetbrains.com/pycharm/download.
2. Open the directory student_env_setup in PyCharm https://www.jetbrains.com/help/pycharm/openingreopening-and-closing-projects.html#opening_projects.
3. Configure PyCharm to use the conda environment created above https://www.jetbrains.com/help/pycharm/condasupport-creating-conda-virtual-environment.html. a: Press Ctrl+Alt+S to open the project Settings/Preferences.
b. In the Settings/Preferences dialog, select Project <project name> | Python Interpreter. Click the icon next to the Python Interpreter dropdown and select Add.
c. In the left-hand pane of the Add Python Interpreter dialog, select Conda Environment. d. Select Existing Environment.
e. Click Select an interpreter and specify a path to the Conda executable in your file system. To see the path of the conda environment in your system, run the command conda info –envs and note the path of the rait_env. In the Interpreter path on PyCharm, add that path to the rait_env environment, followed by bin/python. An example path would be
/home/user/anaconda3/envs/rait_env/bin/python.
f. Select the checkbox Make available to all projects
g. Apply the changes.
4. Now, to run the file test_env_setup.py, right click on it in the Project window in the left and select Run.

Reviews

There are no reviews yet.

Be the first to review “CS 7638 Robotics:AI Techniques – Environment Setup Solved”

Your email address will not be published. Required fields are marked *

Related products