Skip to content

Commit

Permalink
Fix tutorial - fixes #101
Browse files Browse the repository at this point in the history
  • Loading branch information
Phylliade committed Jul 7, 2021
1 parent 478e886 commit cd6775a
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 24 deletions.
29 changes: 23 additions & 6 deletions tutorials/Inverse Kinematics with ErgoJr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
"execution_count": 3,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
},
"pycharm": {
"is_executing": false
}
Expand Down Expand Up @@ -82,7 +85,10 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -127,6 +133,9 @@
"execution_count": 1,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"pycharm": {
"is_executing": false
}
Expand Down Expand Up @@ -160,7 +169,9 @@
"execution_count": 4,
"metadata": {
"collapsed": false,
"scrolled": false
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [
{
Expand Down Expand Up @@ -974,7 +985,10 @@
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand All @@ -985,7 +999,10 @@
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -1032,7 +1049,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.9.6"
},
"pycharm": {
"stem_cell": {
Expand Down Expand Up @@ -1078,5 +1095,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.9.6"
},
"widgets": {
"state": {
Expand Down
4 changes: 2 additions & 2 deletions tutorials/Orientation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.9.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 1 addition & 1 deletion tutorials/Precreated chain - Baxter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.9.6"
},
"toc-autonumbering": true
},
Expand Down
28 changes: 14 additions & 14 deletions tutorials/Quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {
"pycharm": {
"is_executing": false
}
},
"outputs": [],
"source": [
"import ikpy\n",
"import ikpy.chain\n",
"import numpy as np\n",
"import ikpy.utils.plot as plot_utils"
]
Expand All @@ -55,7 +55,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {
"collapsed": false,
"jupyter": {
Expand Down Expand Up @@ -101,7 +101,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 3,
"metadata": {
"pycharm": {
"is_executing": false
Expand All @@ -114,7 +114,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 4,
"metadata": {
"collapsed": false,
"jupyter": {
Expand All @@ -126,7 +126,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"The angles of each joints are : [ 0. 0.77375218 -1.26611491 0.32302884 -0.75260506 1.03033723\n",
"The angles of each joints are : [ 0. 0.77375199 -1.26611195 0.32302683 -0.75260337 1.03033305\n",
" 0. ]\n"
]
}
Expand All @@ -144,7 +144,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 5,
"metadata": {
"collapsed": false,
"jupyter": {
Expand All @@ -156,13 +156,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Computed position vector : [ 0.0999999 -0.1999999 0.09999988], original position vector : [ 0.1 -0.2 0.1]\n"
"Computed position vector : [ 0.0999999 -0.1999999 0.09999988], original position vector : [0.1, -0.2, 0.1]\n"
]
}
],
"source": [
"real_frame = my_chain.forward_kinematics(my_chain.inverse_kinematics(target_position))\n",
"print(\"Computed position vector : %s, original position vector : %s\" % (real_frame[:3, 3], target_frame[:3, 3]))"
"print(\"Computed position vector : %s, original position vector : %s\" % (real_frame[:3, 3], target_position))"
]
},
{
Expand All @@ -182,7 +182,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 6,
"metadata": {
"collapsed": false,
"jupyter": {
Expand All @@ -193,7 +193,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "eae3f50cd4744b559517b0a475decbd3",
"model_id": "bfe8450a8f7c4d63a9988e0c14fe66e9",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -210,7 +210,7 @@
"(-0.1, 0.1)"
]
},
"execution_count": 12,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -222,7 +222,7 @@
"%matplotlib widget\n",
"import matplotlib.pyplot as plt\n",
"fig, ax = plot_utils.init_3d_figure()\n",
"my_chain.plot(my_chain.inverse_kinematics(target_position), ax, target=target_vector)\n",
"my_chain.plot(my_chain.inverse_kinematics(target_position), ax, target=target_position)\n",
"plt.xlim(-0.1, 0.1)\n",
"plt.ylim(-0.1, 0.1)"
]
Expand Down Expand Up @@ -258,7 +258,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.9.6"
},
"pycharm": {
"stem_cell": {
Expand Down

0 comments on commit cd6775a

Please sign in to comment.