Setup Software¶
Note
We are working on a Cloud base infrastructure with JupyterNotebook. Hardware, Webots, and mathematical model robots runs on the cloud instead. The new instruction is comming October 2023.
Checkout the Cloud Option?
You can checkout the new cloud infrastructure here. Please note that this is still experimental and detailed instrucions are not there yet.
Setup Python Environment¶
If this is your first time using Python, you need to install Python and development environments, such as IDE. For more instructions, you can visit:
Warning
We will setup virtual environment (venv) later, so you only need to install Python and IDE.
Create an Account
Step 0Fork the Lab Repository
Step 1Clone Your Forked Repository
Step 2Activate Venv
Step 3Install Requirements
Step 4Project Repository¶
We have a GitLab project available for R4A. You need to do the following:
Note
In our regular class, we ask students to fork the repository so they can fill the codes and worksheets, then upload them.
For this workshop, it is optional.
1. Git clone¶
Go to https://github.com/rems-ucla/r4a, and click Fork.
The address should be like:
https://github.com/your_user_name/r4a
Then run git clone
In Pycharm, you can go to "Get from version control" or "Git -> Clone..."
You can now copy paste the git repository url.
Or click GitHub. You may be asked to log in if this is your first time. Now you can search for the repository and then click clone.
After you click
Never used Git before?
For more information on Git and how to use it, visit
[Git Version Control](.././pre_req/git){ .md-button target=_blank }
2. Create Venv¶
- Go to "File > Settings" or "Preferences" on macOS
-
In the left sidebar of the dialog, navigate to "Project:
" > "Python Interpreter". -
Click the setting wheel icon)
- click add
- In the drop down select a Python version (Python 3.8 or 3.9 recommended)
- Click "OK"
Additionaly, you need to go to Terminal (Terminal tab at thebuttom of your Pycharm)
Then click Command Prompt Now you should see (venv) being activated.
Alternatively you can do:
Now when you open the terminal, Pycharm can automatically start venv for you always.Now you should see (venv) being activated in the terminal.
- Navigate to the directory where you want to create your Python project. You can use the cd command followed by the path of the desired directory.
- then run
- now activate your venv
venv\scripts\activate : File C:\Users\TanakaYusuke\PycharmProjects\REMS_ROS\venv\scripts\activate.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ venv\scripts\activate
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Then you should run
now run the first command again. It should now work- Now you should see (venv) in your terminal.
3. Install Requirements¶
This repository comes with requirements.txt, which includes all dependencies necessary.
You can run the following command in the project directory:
After a while, it should be able to install all required libraries. This includes our main software infrastructure, REMS: Robotics Educational Middleware System. For more information, visit REMS
What's next?¶
Now let's explore the codes to control the robot from your PC. Software Instruction