Skip to content

Commit

Permalink
Install gazebo as rod dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Nov 29, 2023
1 parent 82ecba6 commit 75e1226
Showing 1 changed file with 12 additions and 53 deletions.
65 changes: 12 additions & 53 deletions examples/PD_controller.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[34mjaxsim[51171]\u001b[0m \u001b[1;30mINFO\u001b[0m Running on [CpuDevice(id=0)]\n"
]
}
],
"outputs": [],
"source": [
"from IPython.display import clear_output\n",
"\n",
"%pip install --upgrade -q \"jax[cuda12_pip]\" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html\n",
"%pip install -q git+https://github.com/ami-iit/jaxsim\n",
"# Install JAX and Gazebo\n",
"!pip install -U -q \"jax[cuda12_pip]\" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html\n",
"!pip install -q git+https://github.com/ami-iit/jaxsim@new_api\n",
"!apt -qq update && apt install -qq --no-install-recommends gazebo \n",
"clear_output()\n",
"\n",
"import jax\n",
Expand All @@ -50,7 +44,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -74,7 +68,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -83,18 +77,9 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[34mjaxsim[51171]\u001b[0m \u001b[1;30mINFO\u001b[0m Combining the pose of base link 'rail' with the pose of joint 'world_to_rail'\n",
"\u001b[34mjaxsim[51171]\u001b[0m \u001b[1;30mINFO\u001b[0m The kinematic graph doesn't need to be reduced\n"
]
}
],
"outputs": [],
"source": [
"model = Model.build_from_model_description(model_description=model_urdf_path, is_urdf=True)"
]
Expand All @@ -108,35 +93,9 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"You can open the visualizer by visiting the following URL:\n",
"http://127.0.0.1:7002/static/\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[34mmeshcat_viz[51171]\u001b[0m \u001b[1;30mWARNING\u001b[0m \u001b[33mFailed to find parent element 'world_to_rail' of frame 'world'\u001b[0m\n"
]
},
{
"data": {
"text/plain": [
"'Cartpole'"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"try:\n",
" from meshcat_viz.world import MeshcatWorld\n",
Expand Down

0 comments on commit 75e1226

Please sign in to comment.