"After implementing the **fk_task_1** function and teststing it for one time step, respectiveley one increment, test the function now for several time steps. The goal is now to reach the rotation position $\\theta_i$ from **Task 1.1** in 5 evenly spaced steps and generate one plot which contains the resulting configuration of the arm manipulator for all time steps. \n"
"After implementing the **fk_task_1** function and teststing it for one time step, respectively one increment, test the function now for several time steps. The goal is now to reach the rotation position $\\theta_{i,1}$ from **Task 1.1** in 5 evenly spaced steps and generate one plot which contains the resulting configuration of the arm manipulator for all time steps. \n"
In the first [exercise](https://git.rwth-aachen.de/introduction-to-robotics-course/introduction-to-robotics-2023/-/tree/main/01_IntroductionToPython) you got introduced to the fundamentals of `Python` (variables, data types, operators, decision structures, loops, functions and modules). In order to consolidate and extend the knowledge aquired, the following tutorial tasks should be solved / implemented.
## Task 1.1
The **forward_kinematics** function from the [forward_kinematics module](https://git.rwth-aachen.de/introduction-to-robotics-course/introduction-to-robotics-2023/-/blob/main/01_IntroductionToPython/forward_kinematics.py) is implemented for an manipulator of **n links** and **n+1 revolute joints** that starts from an **initial position** with all joint rotations $\theta=0$.
Implement a function named **fk_task_1** inside the [forward_kinematics module](https://git.rwth-aachen.de/introduction-to-robotics-course/introduction-to-robotics-2023/-/blob/main/01_IntroductionToPython/forward_kinematics.py) that ***returns*** a list which contains for each time step all joint coordinates $x_i$ and $y_i$ for a manipulator (**n links** and **n+1 revolute joints**) with an initial joint rotation that is described by the current rotations $\theta_{i,0}$ and the desired incremental joint rotations at time t $\Delta\theta_{i,t}$ for joint i. The base link is rotating around the given point $[x_0 = 0, y_0 = 1]$.
Test the implemented function inside this jupyter notebook in the following cells. Use the given structure to
1.**Import** necessary modules.
2.**Define** the **parameters** needed to test the 'fk_task_1' function.
- base link coordinates $x_0$ and $y_0$
- link lengths $a_i=[1,1,1,1,1]$
- initial joint roations $\theta_{i,t=0}=[90,0,0,0,0]$ in degree
- incremental change of joint rotation $\Delta\theta_{i,t=1} = [0,0,90,-30,45]$
3.**Call** the 'fk_task_1' **function** and save the return values under appropriate named variables.
4.**Create** a **plot** containing the initial manipulator position (red) and the position after incremental rotation (green).
**Hint:** Use the the data type [array](https://numpy.org/doc/stable/reference/arrays.ndarray.html) from the [numpy package](https://numpy.org/doc/stable/) to define define the variables which contains sequence of values. That allows you to use arithmetic operators directly on the variables.
After implementing the **fk_task_1** function and teststing it for one time step, respectiveley one increment, test the function now for several time steps. The goal is now to reach the rotation position $\theta_i$ from **Task 1.1** in 5 evenly spaced steps and generate one plot which contains the resulting configuration of the arm manipulator for all time steps.
After implementing the **fk_task_1** function and teststing it for one time step, respectively one increment, test the function now for several time steps. The goal is now to reach the rotation position $\theta_{i,1}$ from **Task 1.1** in 5 evenly spaced steps and generate one plot which contains the resulting configuration of the arm manipulator for all time steps.
%% Cell type:code id:9dfed8f7 tags:
``` python
# Calculation of the incremental rotation steps to reach the final rotation position