18 Publications and ReferencesTop16 The Columbia Grasp Database - Part I17 The Columbia Grasp Database: Part II

Contents

17 The Columbia Grasp Database: Part II

17.1 Overview

This section contains material describing the CGDB's internal structure. It is intended for those who wish to modify the CGDB or use it in more advanced ways than the basic database browser described in The Columbia Grasp Database - Part I. For the remainder of this chapter, when we say the "CGDB" we are referring to the PostgreSQL database, and not to the accompanying geometry files that the database references.

The CGDB is not only of data, but also a database in the strong sense; a structured system for encapsulating relationships between various types of geometric, semantic, and robotic data. The preloaded data consists of grasps computed by our Eigengrasps Planner on the models from the Princeton Shape Benchmark with a small number of hands, but the structure can be expanded with new data in any dimension. Using the CGDB to the fullest extent requires a substantial knowledge of SQL, both to add new information to the system and to calculate statistics and properties of the grasps.

The CGDB follows the following naming conventions:

Some tables contain two unique columns. Columns that end with the suffix "_id" are numeric automatically generated identifiers and are used as primary keys. Columns that end with the suffix "_name" are human-readable identifiers intended to simplify interaction with the database from code and from the GraspIt! browser.

17.2 3D Models

We first describe how 3D model information is stored in the database.

Adding new models

To add new models to the CGDB, first place the geometry files (and preferably, thumbnails) under the CGDB_MODEL_ROOT directory. Then, create a row in original_model referencing the new files. There is no need to follow the PSB naming convention for files as long as the path are stored correctly in the database. Make sure to store the units-to-millimeters conversion in original_model_grasping_rescale and the approximate radius in original_model_approximate_radius. Unfortunately we are not currently providing code for computing the approximate radius, but the description of the method above should help those who wish to recreate it.

The next step is to add at least one row, to scaled_model, or as many rows as you like. (You can also add new scaled_model rows for existing models in the database at new scales.) After that, the model is in the database and will be visible to the browser and to all CGDB code, although it will not yet have any associated grasps, alignments, or neighbors.

17.3 Robotic Hands

In this section we describe how hands are stored in the database.

Adding new hands

At the moment, the hand information is tightly coupled to GraspIt!. While it is possible to add new hands to the database without doing anything in GraspIt!, the only way to link a database hand to a GraspIt! hand model is to edit the code. This is not particularly difficult, but we should fix it in the future.

17.4 Grasps

Now that we have models and hands, we can talk about storing grasps.

Adding new grasp sources

If you wish to add data from your own planner to the CGDB, we suggest you create a new entry in grasp_source.

Adding new grasps

If you wish to add new grasps to the CGDB, you must fill in the various fields of this table with the grasp information. The coordinate system of the grasp positions is the model's coordinate system.

17.5 Neighbors

Aside from model and grasp information, the CGDB also stores geometric relationships between 3D models to assist in grasp planning. If you wish to use GraspIt!'s built-in CGDB planner on new models that were not distributed with the PSB, you will need to add information to this part of the database.

In this section we describe how geometric neighbors are stored in the database. We store neighbors according to a number of "distance functions" that measure the similarities between 3D models. At this time, we do not provide code for calculating such similarities yourself, but only precomputed neighbor relationships for the existing models. We are distributing 9 sets of neighbors for each model, as given by the following distance functions.

For each distance function we store the 25 nearest neighbors of each object, along with the distance to the neighbor (higher distance is less similar). Note that the neighbor relationships are between original models and not scaled models, since most measures of 3D similarity are scale independent.

Adding new distance functions

To add a new distance function, simply add a new entry to the distance_function table. This is useful if you want to try your own shape matching functions.

Adding new neighbors

To add a new neighbor to the database, fill in a new row in the neighbor table. Note that neighbor relationships are not automatically symmetric, and so if you want the reverse relationship to be in the database as well you must add it yourself. As we do not provide the original descriptors or code used in creating the neighbors we have distributed, we strongly recommend not adding any new neighbors to the original distance functions. If you wish to add new models, we encourage you to create a new distance function for all the models, including those we have distributed.

17.6 Alignments

To transfer grasps from one model to another we need a transformation between their coordinate systems. The CGDB currently provides precomputed rotational alignments for all neighbor relationships that are in the database; translational alignments are done by colocating the models' centers of mass. At the moment, we do not provide the alignment code itself. We currently provide data from 2 alignment methods:

The database structure is as follows:

Adding new alignment methods

To add a new distance function, simply add a new entry to the alignment_method table.

Adding new alignments

To add a new alignment to the database, fill in a new row in the alignment table. Note that alignments are not automatically symmetric, and so if you want the reverse relationship to be in the database as well you must add it yourself. As we do not provide the code used in creating the alignments we have distributed, we strongly recommend not adding any new alignments to the original alignment methods.

17.7 Stored Procedures

Along with the data and table structures, several stored procedures are built into the database to ease use. We briefly describe them here:

More functions exist, but serve as helpers for those listed above.


Copyright (C) 2002-2009 Columbia University


18 Publications and ReferencesTop16 The Columbia Grasp Database - Part I17 The Columbia Grasp Database: Part IIContents