Reconstruction provides a utility to create a 3d reconstruction of an object. For now, it creates an approximate untextured mesh from captured data, that is good enough for grasping. The algorithm simply merges the depth imags from several views and smoothes them a bit. Nothing smarted is done.
First install meshlab as it is used to go from the aggregation of depth maps to a mesh:
sudo apt-get install meshlab
From the command line, you want to execute the following command to compute all meshes and commit them to the local DB:
./apps/mesh_object --all --visualize --commit
rosrun object_recognition_reconstruction mesh_object --all --visualize --commit
Or tune your parameters using the appropriate command line arguments:
$ /home/vrabaud/workspace/recognition_kitchen_groovy/src/object_recognition_reconstruction/doc/source/../../apps/mesh_object --help
usage: mesh_object [-h] [-s SESSION_ID] [--all] [--visualize]
[--db_type DB_TYPE] [--db_root DB_ROOT_URL]
[--db_collection DB_COLLECTION] [--commit]
[--niter ITERATIONS] [--shell] [--gui] [--logfile LOGFILE]
[--graphviz] [--dotfile DOTFILE] [--stats]
Computes a surface mesh of an object in the database
optional arguments:
-h, --help show this help message and exit
-s SESSION_ID, --session_id SESSION_ID
The session id to reconstruct.
--all Compute meshes for all possible sessions.
--visualize Turn on visualization
Database Parameters:
--db_type DB_TYPE The type of database used: one of [CouchDB]. Default:
CouchDB
--db_root DB_ROOT_URL
The database root URL to connect to. Default:
http://localhost:5984
--db_collection DB_COLLECTION
The database root URL to connect to. Default:
object_recognition
--commit Commit the data to the database.
Reconstruction also provides a web interface to visualize the different meshes. In your build folder, just run:
make or_web_ui
You can then visualize the meshes here: http://localhost:5984/or_web_ui/_design/viewer/index.html
To create a textured mesh from a colored point cloud in meshlab: http://www.youtube.com/watch?v=JzmODsVQV7w