diff --git a/examples/jaxsim_for_robot_controllers.ipynb b/examples/jaxsim_for_robot_controllers.ipynb index 278dc5908..dd9353e3f 100644 --- a/examples/jaxsim_for_robot_controllers.ipynb +++ b/examples/jaxsim_for_robot_controllers.ipynb @@ -90,6 +90,17 @@ "[sdformat_github]: https://github.com/gazebosim/sdformat" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "\n", + "os.path.abspath(\"\")" + ] + }, { "cell_type": "code", "execution_count": null, @@ -98,18 +109,12 @@ }, "outputs": [], "source": [ - "# @title Download the URDF model\n", - "\n", - "import requests\n", - "\n", - "url = \"https://raw.githubusercontent.com/ami-iit/jaxsim/main/examples/assets/cartpole.urdf\"\n", - "\n", - "response = requests.get(url)\n", + "# @title Load the URDF model\n", + "import pathlib\n", "\n", - "if response.status_code == 200:\n", - " model_urdf_string = response.text\n", - "else:\n", - " raise RuntimeError(\"Failed to fetch data.\")" + "model_urdf_string = pathlib.Path(\n", + " os.path.abspath(\"\") + \"/assets/cartpole.urdf\"\n", + ").read_text()" ] }, {