2.12/2.120 Intro to Robotics
Spring 20261
This code is provided for your convenience. Read through the comments in the files to understand how they work. If you have any questions, please ask the TAs.
If you have installed RTDE in Python directly (not on WSL), simply open your favorite text editor and run the code in Python. If you installed RTDE on Windows Subsystem for Linux (WSL), follow these steps:
-
Open a WSL terminal by entering
wslin Command Prompt. Your terminal should say something likeLAPTOP_NAME: mnt/c/Users/yourname$. This is the current directory. -
Since the file you want to run is likely in another folder, we will change the current directory to be that folder. Open File Explorer and navigate to that folder.
-
Right-click the address bar at the top of the screen and select "Copy Address" from the dropdown that appears.
Where is the address bar?
It is located to the left of the search bar. It should say something like "Documents > MIT > ur_2024".
-
Go back to the WSL terminal and type
cd ". Right-click to paste the address you copied and type"at the end. Don't hit enter yet! -
Replace all the
\with/and replaceC:with/mnt/c. Your command should now look likecd "/mnt/c/Users/yourname/Documents/MIT/ur_2025" -
Hit enter. Your terminal should show a new current directory.
Directory not found error?
Make sure you included the
/beforemnt. Also, if your original current directory had a different disk letter, make sure to use that instead ofc, e.g./mnt/e. -
Enter
python3 test_import.py. You should see the success print!
Note: In these steps, we navigated to our desired directory by entering its exact address. In the future, you may prefer to navigate incrementally via the terminal using the basic commands below.
ls: returns the contents of your current directorycd example: goes toexamplesubfolder within the current directorycd ..: goes to the folder that contains your current directory, think of this as going up by a level
Footnotes
-
Version 1 - 2023: Ravi Tejwani, Erik Ballesteros, Chengyuan Ma, Kamal Youcef-Toumi
Version 2 - 2024: Jinger Chong
Version 3 - 2025: Roberto Bolli, Kaleb Blake
Version 4 - 2026: Stephan stansfield, Kaleb Blake, Pelumi Adebayo ↩