~~NOTOC~~
===== Homework 02 - Denavit-Hartenberg Convention =====
=== Task ===
- Describe the kinematics of {{http://cmp.felk.cvut.cz/cmp/courses/PRO/2012/Labs/Motoman-MA1400.pdf|Motoman MA1400}} manipulator using its {{http://cmp.felk.cvut.cz/cmp/courses/PRO/2012/Labs/Motoman-MA1400-dimensions.pdf|dimensions}} in Denavit-Hartenberg convention as explained in {{http://cmp.felk.cvut.cz/cmp/courses/PRO/2012/Lecture/PRO-2012-Lecture-03.pdf|03}}. In order for the automatic evaluation to check your solution correctly, choose the 0-th and the 6-th coordinate frames as shown {{https://cw.fel.cvut.cz/b211/_media/courses/pro/labs/coord_frames_0_and_6.pdf|here}} (the $x$-axis is marked in red, the $z$-axis is marked in blue).
- Visualize DH notation of the manipulator in {{https://github.com/kzorina/pro_hw2_simulator|simulation}}.
=== Upload ===
Upload a zip archive ''hw02.zip'' (via the [[https://cw.felk.cvut.cz/upload/|course ware]]) containing:
- ''hw02.json'' - json file containing DH parameters of the given manipulator (see below for the description of how to create it).
- ''hw02.pdf'' - report file describing your solution containing
- an illustration of all axes of motion, all DH coordinate systems, numbered and described;
- origins and orientations of angles;
- a table with DH parameters;
- a description of the choices of DH coordinate systems;
- visualization of DH parameters of the given manipulator.
**Creating** ''hw02.json'':
Create an empty dictionary in Python:
mechanism = {}
The dictionary has 24 keys: ''"theta1 offset"'', $\dots$, ''"theta6 offset"'', ''"d1"'', $\dots$, ''"d6"'', ''"a1"'', $\dots$, ''"a6"'', ''"alpha1"'', $\dots$, ''"alpha6"''. Fill in the values with DH parameters of the given manipulator. Values are numbers. Consider distances in **meters** and angles in **radians**.
Finally, save ''mechanism'' to ''hw02.json'':
import json
with open("hw02.json", "w") as outfile:
json.dump(mechanism, outfile)