@@ -62,21 +62,47 @@ If you are planning to use the visualization tools used by the Gepetto team, alo
To see the planner in action, one example from our IJRR submission with HyQ is available. Examples with HRP-2 are also provided, though they can only be executed if you have access to HRP-2 model.
- If you installed the planner form binaries, you need to download the scripts as explained here. Otherwise you can find them directly in script/scenarios/demos folder. For the binary proceudre, create a folder and cd in to it, then type
- Make the run.sh script executable:`chmod +x run.sh`
- The planning is decomposed in two phases / scripts. First, a root path is computed (\*_path.py files). Then, the contacts are generated along the computed path (\*_interp.py files). The scripts are located in the folder /scripts/scenarios/demos.
- To see the different steps of the process run
``$ ./run.sh darpa_hyq.py`
The script include comments explaining the different calls to the library. You can call the different methods a() ... d() to see the different steps of the planning.
- You can find the scripts in your install directory, in `lib/pythonXX/dist-packages/hpp/corbaserver/rbprm/scenarios/demos` folder.
- The planning is decomposed in two phases / scripts. First, a root path is computed (`\*_path.py files`). Then, the contacts are generated along the computed path.
Replace demos.hyq_darpa with the name of any file in the demos or memmo folder to try different scenarios.
- Once the script have been executed, you can display the results in the viewer (if you installed it):
- If it was a `\*_path.py` script, you can run:
-`planner.play_path()` to display the computed guide path
-`planner.v(planner.q_init)` or `planner.v(planner.q_goal)` to put the robot at the initial / goal position of the planning
- If it was a a contact generation script, you can run:
-`cg.display_sequence()` to display the sequence of configurations in contact computed
-`cg.display_init_config()` or `cg.display_end_config()` to put the robot at the initial / final whole body configuration
-`cg.v(cg.configs[i])` to display the i-th wholebody configuration of the sequence
-`cg.play_guide_path()` to display the guide path
## Creating a new scenario script
Start from one of the scripts in the scenarios/demos folder, eg `talos_flatGround.py`.
* All the `\*_path.py` scripts must define a class called `PathPlanner` that inherit from one of the `{robot}_path_planner` classes defined in the scenarios folder.
* In the run() method, define the environment used and the initial/goal position
* If further customization is needed, override the required methods from the parent class.
* All the contact generation scripts must define a class called `ContactGenerator` that inherit from one of the `{robot}_contact_generator` classes defined in the scenarios folder.
* In the constructor of this class, the parent constructor must be called with an instance of the desired `PathPlanner` class, defining the environment and the guide trajectory.
* This class may override any method from the parent class in order to change the default settings/choices regarding the contact generation