From daa5a9e549093c271186a7b1be176430453297ff Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Mon, 15 Jan 2024 18:13:18 +0100 Subject: [PATCH] Add usage notes --- examples/Parallel_computing.ipynb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/Parallel_computing.ipynb b/examples/Parallel_computing.ipynb index f591a9df9..caf86417d 100644 --- a/examples/Parallel_computing.ipynb +++ b/examples/Parallel_computing.ipynb @@ -8,8 +8,13 @@ "\n", "\n", " \"Open\n", - "\n", - "\n", + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "First, we install the necessary packages and import them." ] }, @@ -55,7 +60,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We will use a simple sphere model to simulate a free-falling body. The spheres set will be composed of 9 spheres, each with a different position. The spheres will be simulated in parallel, and the simulation will be run for 3000 steps corresponding to 3 seconds of simulation." + "We will use a simple sphere model to simulate a free-falling body. The spheres set will be composed of 9 spheres, each with a different position. The spheres will be simulated in parallel, and the simulation will be run for 3000 steps corresponding to 3 seconds of simulation.\n", + "\n", + "**Note**: Parallel simulations are independent of each other, the different position is imposed only to show the parallelization visually." ] }, { @@ -157,7 +164,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In order to parallelize the simulation, we first need to define a function `simulate` for a single element of the batch." + "In order to parallelize the simulation, we first need to define a function `simulate` for a single element of the batch.\n", + "\n", + "**Note:** [`step_over_horizon`](https://github.com/ami-iit/jaxsim/blob/427b1e646297495f6b33e4c0bb2273ca89bd5ae2/src/jaxsim/simulation/simulator.py#L432C1-L529C10) is useful only in open-loop simulations and where the horizon is known in advance. Please checkout [`step`](https://github.com/ami-iit/jaxsim/blob/427b1e646297495f6b33e4c0bb2273ca89bd5ae2/src/jaxsim/simulation/simulator.py#L384C10-L425) for closed-loop simulations." ] }, {