hpp_tutorial
4.9.0
Tutorial for humanoid path planner platform.
|
To run the tutorial, open a terminal and open 3 tabs by typing CTRL+SHIFT+T
twice. When the terminal is selected, you can select a tab by typing ALT-
[1|2|3].
In the first tab, type
See package hpp-corbaserver
for details.
In the second tab, type
A window opens and is ready to display the scene containing the robot. The robot and environment will appear later.
Note that gepetto-gui
and hppcorbaserver
executables are completely independent.
In the third tab, type
to run the scriptscript/tutorial_1.py
in an interactive python terminal.
To display the scene, type
gepetto-gui window should now display a scene containing a PR2 robot in a kitchen environment.
To display initial and goal configurations type the following commands
To solve the path planning problem between those configurations, type
To display the resulting of RRT, type
To display an optimized solution,
This section presents in more details the content of script/tutorial_1.py
.
Import class pr2.robot.Robot and create an instance and set bounds of translation degrees of freedom of the base. Note that the constructor of the instance calls idl method hpp::corbaserver::Robot::loadRobotModel. This triggers the loading of the urdf/srdf model of the PR2 robot in hppcorbaserver
executable.
Import class hpp.corbaserver.problem_solver.ProblemSolver and create an instance. This class is a helper class to define and solve path planning problems.
Import class gepetto.viewerFactory.ViewerFactory and create an instance. This object takes as input the ProblemSolver
instance that enables the viewer client to also control hppcorbaserver
executable
Define initial configuration.
Define goal configuration.
Load obstacles from urdf file.
gepetto-viewer-server
.Define initial and goal configurations.
Add a path optimizer (hpp::core::RandomShortcut).
Solve problem and print the results.
Create the display window. Import and create an instance of PathPlayer. This class samples a path in hppcorbaserver
and displays it in gepetto-viewer-server
.
Display first path, result of RRT.
Display second path after optimization.