~~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|Lecture 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 (axes of motion and coordinate systems) in Python. Provide XZ plane view and side view (see below example code snippets and expected plots for the manipulator from the lecture). Please use the same view-points as in the code snippets, so it is easier to check. For XZ plane, you can use this snippet of code: fig = plt.figure(figsize=(10, 10)) ax = fig.add_subplot(111, projection='3d') for system in systems: plot_system(ax, system) ax.set_proj_type('ortho') ax.view_init(azim=90, elev=0) ax.set_yticklabels([]) ax.set_ylabel('') ax.set_xlim(-0.05, 1.45) ax.set_ylim(-0.75, 0.75) ax.set_zlim(-0.05, 1.45) plt.show() {{:courses:pkr:labs:xz_view.png?400|}} For side view: fig = plt.figure(figsize=(10, 10)) ax = fig.add_subplot(111, projection='3d') for system in systems: plot_system(ax, system) ax.view_init(azim=50, elev=20) ax.set_xlim(-0.05, 1.45) ax.set_ylim(-0.75, 0.75) ax.set_zlim(-0.05, 1.45) plt.show() {{:courses:pkr:labs:side_view.png?400|}} You will need to implement ''plot_system()'' function and use your own ''systems''. === 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; - an illustration of all DH coordinate systems ($O_i$ and $H_i$); - a table with DH parameters; - comments on the choices of DH coordinate systems. **Creating** ''hw02.json'': Create an empty dictionary in Python: mechanism = {} The dictionary has 4 keys: ''"theta offset"'', ''"d"'', ''"a"'', ''"alpha"''. The values are lists of 6 float numbers. Fill in the values with DH parameters of the given manipulator. Consider the 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)