-
Notifications
You must be signed in to change notification settings - Fork 26
The Graspit simulator
You can use the original GraspIt! simulator to inspect your graspit files and also to do the planning.
For instructions on how to set up the simulator, please refer to the instruction on this wiki page.
In particular, make sure you have set the $GRASPIT environment variable and have your GraspIt! robot and world files in the $GRASPIT directory.
If you do not have the GraspIt! format files for your robot:
- You can generate a GraspIt format for your robot with the urdf2graspit package using your robot URDF description.
- You can try the Jaco example files delivered in the directory jaco_graspit_sample of this package. However keep in mind that this is not an ideal hand to grasp, as the joints in the middle of the fingers are not actuated (the way they work cannot be simulated). It is planned to provide other example hands.
- You can also try the hands which come in the
$GRASPIT/models
directory, or loading example worlds from the$GRASPIT/worlds
directory.
You may run the original simulator with
graspit_simulator
To open the world, go to File -> Open
(or click on the folder symbol)
and open the world file.
For example, to load the world with the Jaco example set-up,
open the jaco_graspit_sample/worlds/jaco_robot_world.xml
world file - make sure you first set the GRASPIT
environment variable to the jaco_graspit_sample
directory.
For successful planning, it is important that the contacts of the robot have been loaded. They will be displayed as red lines in the simulator, as shown on the screenshot above.
Here is how you use the GraspIt EigenGrasp planner:
- To load up your robot, open the world file which includes the object.
- To start planning, go to
Grasp --> EigenGrasp Planner
. - If the hand contact points are not loaded yet (checkbox "preset contact" on the top right unchecked), you need to load them first, otherwise the planning results are not going to be very good.
- Make sure to select "Hand contacts" as Energy formulation. At the moment, this is the only
one which works reliably, though GraspIt! is currently being improved, so this may change.
Change any other options, or leave them on default (recommended).
- Click on
Init
to initialize the algorihm (recommended setting: Axis-angle). Then, click on the>
symbol to start planning and watch the hand try different positions. - When the planner is done, you can flick through the best grasps found with the arrows under "Show results":
< Best >
. - Each time you run the planning, you may get different results.
For more information on how to plan with GraspIt, please refer to the official GraspIt! documentation.
Now you should be familiar with the GraspIt! Eigengrasp planner and are ready to try out the headless (no-GUI) variant to run the planner. This tutorial will guide you through an example.