You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Public excercise repo for the course Advanced Robot Learning and Decision Making
1
+
# Control for Robotics - Advanced Programming Exercises
2
+
3
+
4
+
### **Book**: Control for Robotics - From Optimal Control to Decision Making
5
+
6
+
### **Course**: ARLDM - Advanced Robot Learning and Decision Making (TUM 0CIT433037)
2
7
3
8
> 🚀 Welcome! To start the exercises succesfully, read *all of the following* carefully.
4
9
5
-
## Preliminaries
10
+
> **Students taking the course for Uni must use the code and additional instructions provided directly in the course!**
11
+
12
+

13
+
14
+
15
+
## ⚙️ Preliminaries and Setup
6
16
7
17
- You require at least 20GB of free permament storage and 8GB (preferably 16GB) of RAM on your device.
8
-
- We strongly recommend to use Linux. It is the most widely used OS in robotics.
9
-
- We support running the exercises in our VS Code Dev Container on Linux (recommended) and Windows 11 (WSL2). You can also setup the environment with manual installation, but you may encounter installation issues. For MacOS, most students use a VM with Ubuntu (recommended) or manual installation.
10
-
- If you have troubles setting up the environment, ask more experienced students for help or reach out to us.
11
-
- For any issues **check the `Common Issues` section below** before reaching out for help.
12
-
-:warning:**We might need to provide you with hotfixes for our code during the semester. We will communicate this as required**.
18
+
- We strongly recommend using Linux. It is the most widely used OS in robotics. We support running the exercises in our VS Code Dev Container on Linux (recommended) and Windows 11 (WSL2). You can also setup the environment with manual installation, but you may encounter installation issues. For MacOS, most students use a VM with Ubuntu (recommended) or manual installation.
19
+
- For any setup issues **check the `Common Issues` section below** before reaching out for help.
20
+
- If you find **bugs or issues with the code**, please open a issue or pull request here in the public [GitHub repository](https://github.com/utiasDSL/ARLDM-Advanced-Robot-Learning-And-Decision-Making/edit/main/README.md).
13
21
14
-
## Getting started
22
+
## 🛠️ Used Tools
15
23
We will use:
16
24
- <kbd>Git</kbd> as version control system: Find a [Git introduction here](https://docs.duckietown.com/ente/devmanual-software/basics/development/git.html). Specifically, you need to know how to `clone`, `add`, `commit`, and `push`.
17
25
- <kbd>Python</kbd> as programming language: Find a [Python tutorial here](https://www.tutorialspoint.com/python/index.htm), in particular make sure to go through the basic data structures (tuples, lists, dictionaries, sets,…), loops (while, for,…), conditional statements (if-else), functions, classes and objects.
@@ -21,7 +29,7 @@ We will use:
21
29
22
30
If they all sound completely new to you do not panic. We will require a very basic use of most of them, but it is a good time to start learning these tools since they are all widely adopted in modern robotics.
23
31
24
-
## Setting up the exercise environment
32
+
## 👨💻 Setting up the exercise environment
25
33
The following are the usual steps involved in setting up VS Code Devcontainers. One special feature is that we render simulations directly on the container host's display. Such display forwarding is a common failure case, is the reason why the exercise container does not work on MacOS for the moment, and explains all of the more special instructions below.
26
34
27
35
### Linux (recommended)
@@ -64,7 +72,7 @@ pip install -e .[test,cpu,pin] // for Mac: GPU is not supported
64
72
4. Open *this project`s* code in your favorite editor. Now you should be ready to start the the exercises.
65
73
66
74
### Using CPU or GPU
67
-
By default the containers are configured to run on the CPU(, which is sufficient for the exercises). However, you can easily configure the devcontainer to run on your [cuda-enabled GPU](https://developer.nvidia.com/cuda-gpus) for faster training of neural networks and rendering. This is especially useful for the deep reinforcement learning exercise, and is really trendy in general :computer:. You require at least CUDA `>12.6.3`.
75
+
By default the containers are configured to run on the CPU(, which is sufficient for the exercises). However, you can easily configure the devcontainer to run on your [cuda-enabled GPU](https://developer.nvidia.com/cuda-gpus) for faster training of neural networks and rendering. This is especially useful for the deep reinforcement learning exercise. You require at least CUDA `>12.6.3`.
68
76
69
77
If you want to use the GPU for the exercise, first install the necessary [CUDA Toolkit](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_local) and [NVIDIA Container runtime](https://developer.nvidia.com/container-runtime) on your computer, if it is not installed already.
70
78
@@ -87,67 +95,29 @@ Executing the following in a terminal inside the container should now output `Tr
- Common failure codes for display forwarding include `glfw error` and `Display not found`. Try to run `xhost +local:docker` on the host. Additionally, make sure you followed all steps mentioned above.
93
-
- If building docker container fails at `RUN apt-get update`, make sure your host systems time is set correct: https://askubuntu.com/questions/1511514/docker-build-fails-at-run-apt-update-error-failed-to-solve-process-bin-sh
94
-
-`wsl --install` stuck at 0.0%: Try [this](https://github.com/microsoft/WSL/issues/9390#issuecomment-1579398805).
95
-
- If VSCode Test Discovery is stuck during test discovery without any error: [Downgrade your python extension to 2024.20.0](https://github.com/microsoft/vscode-python/issues/24656#issue-2757930549). You can also still run the test cases from a terminal in the Docker container by running the command `pytest`.
96
-
97
98
## Solving the exercises
98
99
99
-
- Each exercise contains exactly one `exercise_0X.iypnb` file. This file will guide you through the exercise and explains everything you need to do.
100
-
- Use **Public tests** (see below) to evaluate your implementations locally on your computer, and only push to ARTEMIS once all public tests pass.
101
-
- While you can help each other setting up the environment, the programming exercise are an individual work.
102
-
- The exercises contain **programming tasks** and **exam preperation tasks**. It is crucial you solve both to be successful in the exam.
103
-
104
-
-:warning:**Adhere to the following rules of the game, otherwise the submission system might break leading to a failed exercise:**
100
+
-**Exercises** are in `src` and contain exactly one `exercise0X.ipynb` jupyter notebook. This notebook will guide you through the exercise and explains everything you need.
101
+
-**Test cases** are shipped with the exercises in `src/exercise0X/test` that allow you to test your implementations locally on your computer. You can run those tests using the [testing feature](https://code.visualstudio.com/docs/editor/testing) in VS Code, or from the command line with `pytest`, or `pytest src/exercise01`.
102
+
-**Adhere to the following rules, otherwise the tests may fail:**
105
103
-**Do not modify any code that you are not explicitely instructed to modify.**
106
104
-**Do not rename files or functions.**
107
105
-**Do not change function's arguments or return values.**
108
106
-**Do not install any additional dependencies.**
109
-
-**We check for plagiarism with automated software and human help.** Any copied code will cancel all bonus points from programming exercises for both the copier and the copied person.
110
-
-:warning:**Do not post your solutions or part of the solutions publicly available during or after the course.** This also includes course-internal communication. Please strictly adhere to this rule. Not adhering to this rule will result in exemption from the course.
111
-
-:warning: We use the equations in the **lecture notes (script)** as reference implementation for our solutions. The formulations on the slides might occasionally differ and lead to different results. Please use the lecture notes as a reference for your implementation.
112
-
113
-
## Grading and Evaluation
114
-
- The exercises are evaluated using automated code tests.
115
-
1.**Public tests (for you)**: These tests are available to you and allow you to check your implementations.
116
-
- These tests are included in this repository under `/test/behavior`. You can execute those tests locally as often as you want to get feedback for your implementations. Execute those tests by using the [testing feature](https://code.visualstudio.com/docs/editor/testing) in VS Code available via this icon: <imgsrc="resources/test_icon.png"alt="test_icon"width="20"/>.
117
-
- When you pass all tests locally, submit your code to ARTEMIS to see if all tests pass there.
118
-
- The tests are triggered on ARTEMIS if you submit *before* the submission deadline (you can submit as often as you want before the deadline). However, during your development, we recommend running the tests locally as it is much quicker.
119
-
2.**Hidden tests (for bonus grades)**: These tests are not available to you, and are executed only on [ARTEMIS](https://artemis.ase.in.tum.de/) when you submit your code.
120
-
- If you fail public test cases, you will fail hidden test cases.
121
-
-:warning:**The code that has last been submitted to ARTEMIS is used to grade your exercises.**
122
-
123
-
124
-
-:warning:**You need to solve all test cases for an exercise (or achieve 100% in ARTEMIS to pass the exercise!**
125
-
-**:warning: The relevant test cases for each exercise are also specified in ARTEMIS.**
126
-
127
-
128
-
## Submitting
129
-
Read the instructions above carefuly before submitting to ARTEMIS. Specifically, make sure that you pass the public test cases locally on your computer before submitting.
107
+
-:warning:**Do not post your solutions or part of the solutions publicly available during or after the course.** This also includes course-internal communication. Please strictly adhere to this rule. Not adhering to this rule will result in exemption from the course.
130
108
131
-
You submit to your ARTEMIS repository using standard git workflow:
132
-
133
-
1. In your repository, add the files you wish to submit (in general you need to decide, what parts of the code needs to be submitted to solve the exercises. However, as a rule of thumb, it is a good idea to submit everything that you would submit when using git for usual version control.)
134
-
```
135
-
git add ./file1
136
-
```
137
-
2. Commit
138
-
```
139
-
git commit -m "some notes useful to you"
140
-
```
141
-
142
-
3. Pushing will commit the code to ARTEMIS, and trigger the execution of the **public** and **hidden test** cases. **Note**: perform this action *outside* of the docker container to assure you are authenticated with git.
143
-
```
144
-
git push
145
-
```
146
-
147
-
148
-
Good luck with the exercises :partying_face:!
149
-
_____
150
-
End of document.
151
109
110
+
## Common Issues
111
+
- Common failure codes for display forwarding include `glfw error` and `Display not found`. Try to run `xhost +local:docker` on the host. Additionally, make sure you followed all steps mentioned above.
112
+
- If building docker container fails at `RUN apt-get update`, make sure your host systems time is set correct: https://askubuntu.com/questions/1511514/docker-build-fails-at-run-apt-update-error-failed-to-solve-process-bin-sh
113
+
-`wsl --install` stuck at 0.0%: Try [this](https://github.com/microsoft/WSL/issues/9390#issuecomment-1579398805).
114
+
- If VSCode Test Discovery is stuck during test discovery without any error: [Downgrade your python extension to 2024.20.0](https://github.com/microsoft/vscode-python/issues/24656#issue-2757930549). You can also still run the test cases from a terminal in the Docker container by running the command `pytest`.
115
+
## Common Issues
116
+
- Common failure codes for display forwarding include `glfw error` and `Display not found`. Try to run `xhost +local:docker` on the host. Additionally, make sure you followed all steps mentioned above.
117
+
- If building docker container fails at `RUN apt-get update`, make sure your host systems time is set correct: https://askubuntu.com/questions/1511514/docker-build-fails-at-run-apt-update-error-failed-to-solve-process-bin-sh
118
+
-`wsl --install` stuck at 0.0%: Try [this](https://github.com/microsoft/WSL/issues/9390#issuecomment-1579398805).
119
+
- If VSCode Test Discovery is stuck during test discovery without any error: [Downgrade your python extension to 2024.20.0](https://github.com/microsoft/vscode-python/issues/24656#issue-2757930549). You can also still run the test cases from a terminal in the Docker container by running the command `pytest`.
Copy file name to clipboardExpand all lines: src/exercise04/exercise04/exercise04.ipynb
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -215,7 +215,7 @@
215
215
"3. Evaluate the model’s performance by predicting the mean and uncertainty of the next states.\n",
216
216
"\n",
217
217
"The implementation involves:\n",
218
-
"- Defining a **Radial Basis Function (RBF) kernel**, commonly used for its smoothness properties.\n",
218
+
"- Defining a **squared exponential (SE) kernel**, commonly used for its smoothness properties.\n",
219
219
"- Completing the **predict()** function to compute the posterior mean and variance for new inputs.\n",
220
220
"\n",
221
221
"### Learning Complete Dynamics vs. Residual Dynamics\n",
@@ -252,7 +252,7 @@
252
252
" <h3>Task 1: Review and complete the BaseGaussianProcess class</h3>\n",
253
253
" Review the class <code>BaseGaussianProcess</code> in <code>gaussian_process.py</code>.\n",
254
254
" <p>\n",
255
-
" Implement the <code>rbf_kernel()</code> and <code>matern_kernel()</code> functions, and at least one additional kernel of your choice (e.g., linear, polynomial, etc.). The kernel parameters must be provided during class initialization and newly implemented kernels must be registered in the <code>__init__()</code> function.\n",
255
+
" Implement the <code>se_kernel()</code> and <code>linear_kernel()</code> functions, and at least one additional kernel of your choice (e.g., linear, polynomial, etc.). The kernel parameters must be provided during class initialization and newly implemented kernels must be registered in the <code>__init__()</code> function.\n",
256
256
" <p>\n",
257
257
" Afterwards complete first the <code>fit()</code> function, which computes the kernel matrix, the dual coefficients, and the Cholesky decomposition from the training data, and then the <code>predict()</code> function that predicts the posterior mean and (optionally) variance.\n",
0 commit comments