This shows you the differences between two versions of the page.
|
rasb:lab:06 [2026/07/03 17:11] andrei.batasev |
rasb:lab:06 [2026/07/03 23:40] (current) andrei.batasev [Part 0: Setup] |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| We want to build upon last time's lab, but this time instead of finding out what is the final position as a function of motor values, this time we will be making (or trying at least) a function that takes as input the position and outputs the motor values. We will also play with this function to make the pupper's leg to move in a triangular shape | We want to build upon last time's lab, but this time instead of finding out what is the final position as a function of motor values, this time we will be making (or trying at least) a function that takes as input the position and outputs the motor values. We will also play with this function to make the pupper's leg to move in a triangular shape | ||
| ==== Part 0: Setup ==== | ==== Part 0: Setup ==== | ||
| - | * Open the lab 3 code repository () | + | * Open the lab 3 code repository ([[https://github.com/cs123-stanford/lab_3_fall_2025|lab 3 code repository]]) |
| * Open the lab 3 folder in VSCode | * Open the lab 3 folder in VSCode | ||
| <code> | <code> | ||
| Line 10: | Line 10: | ||
| </code> | </code> | ||
| * Examine ''lab_3.py'' to understand the structure of the ''InverseKinematics'' class and its methods. | * Examine ''lab_3.py'' to understand the structure of the ''InverseKinematics'' class and its methods. | ||
| + | <note tip> | ||
| + | For docker users, you may try to simulate with this setup (**If you already did this for lab 2, it is the same archive, no need to redownload or rebuild the image**): | ||
| + | {{:rasb:lab:pupper_viz.tar.gz|Download this}} and then do these following commands: | ||
| + | <code> | ||
| + | tar -xvf pupper_viz.tar.gz | ||
| + | cd pupper_viz/ | ||
| + | docker build -t pupper_viz . | ||
| + | </code> | ||
| + | Once done, you may paste your lab 3 solution into the lab_3.py and then | ||
| + | <code> | ||
| + | ./run.sh 3 | ||
| + | </code> | ||
| + | </note> | ||
| ==== Part 1: Forward Kinematics on Right Front Leg ==== | ==== Part 1: Forward Kinematics on Right Front Leg ==== | ||
| - Open lab_3.py and locate the forward_kinematics method in the InverseKinematics class | - Open lab_3.py and locate the forward_kinematics method in the InverseKinematics class | ||