diff --git a/examples/mpc-ik.ipynb b/examples/mpc-ik.ipynb index ba527fcc..77416b17 100644 --- a/examples/mpc-ik.ipynb +++ b/examples/mpc-ik.ipynb @@ -3,8 +3,8 @@ { "cell_type": "markdown", "metadata": { - "id": "view-in-github", - "colab_type": "text" + "colab_type": "text", + "id": "view-in-github" }, "source": [ "\"Open" @@ -12,15 +12,15 @@ }, { "cell_type": "markdown", + "metadata": { + "id": "MmkmgG_gGWVi" + }, "source": [ "## Install Mujoco, adam, and mediapy.\n", "\n", "Download also mujoco-menagerie for the panda model and the urdf needed from adam.\n", "Set some stuff for the visualization." - ], - "metadata": { - "id": "MmkmgG_gGWVi" - } + ] }, { "cell_type": "code", @@ -47,12 +47,12 @@ }, { "cell_type": "markdown", - "source": [ - "## Import packages" - ], "metadata": { "id": "Dz4cHPy2Gtmq" - } + }, + "source": [ + "## Import packages" + ] }, { "cell_type": "code", @@ -66,20 +66,17 @@ "import mediapy as media\n", "from adam.casadi import KinDynComputations\n", "import numpy as np\n", - "import casadi as cs\n", - "import distutils.util\n", - "import os\n", - "import subprocess" + "import casadi as cs" ] }, { "cell_type": "markdown", - "source": [ - "## Import the panda scene in mujoco" - ], "metadata": { "id": "2zw4FO-IGxdR" - } + }, + "source": [ + "## Import the panda scene in mujoco" + ] }, { "cell_type": "code", @@ -95,6 +92,9 @@ }, { "cell_type": "markdown", + "metadata": { + "id": "CZMO7PsmKUB6" + }, "source": [ "## Import urdf in adam\n", "\n", @@ -102,10 +102,7 @@ "\n", "For now I have to use a separate urdf for adam.\n", "An importer for a mujoco model could be an idea for the future!" - ], - "metadata": { - "id": "CZMO7PsmKUB6" - } + ] }, { "cell_type": "code", @@ -122,12 +119,12 @@ }, { "cell_type": "markdown", - "source": [ - "## A wrapper interface with mujoco" - ], "metadata": { "id": "g5LX5kQAKwaM" - } + }, + "source": [ + "## A wrapper interface with mujoco" + ] }, { "cell_type": "code", @@ -173,15 +170,15 @@ }, { "cell_type": "markdown", + "metadata": { + "id": "wuY9hqdlD3Vo" + }, "source": [ "# Model Inverse Kinematics as an MPC\n", "\n", "An MPC is maybe not the best way to solve an IK problem.\n", "I just want to show how to use the casadi interface." - ], - "metadata": { - "id": "wuY9hqdlD3Vo" - } + ] }, { "cell_type": "code", @@ -239,6 +236,9 @@ }, { "cell_type": "markdown", + "metadata": { + "id": "Hf-Uq8PWFy6v" + }, "source": [ "# Simulation loop\n", "\n", @@ -247,10 +247,7 @@ "\n", "On the notebook it is a bit slow.\n", "To run it real time set OMP_NUM_THREADS=1 on your laptop!" - ], - "metadata": { - "id": "Hf-Uq8PWFy6v" - } + ] }, { "cell_type": "code", @@ -314,6 +311,10 @@ } ], "metadata": { + "colab": { + "include_colab_link": true, + "provenance": [] + }, "kernelspec": { "display_name": "adam_env", "language": "python", @@ -330,10 +331,6 @@ "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.11" - }, - "colab": { - "provenance": [], - "include_colab_link": true } }, "nbformat": 4,