Training using 3D models of an object

We can clone the ORK tutorial package using the following command:

    $ git clone https://github.com/wg-perception/ork_tutorials

You can see that the ork_tutorials/data folder contains some mesh files that we can use for object detection. Navigate to that folder and execute the following commands from the same path. The following command will add an entry to the object database:

    $ rosrun object_recognition_core object_add.py -n "coke" -d "A universal coke" --commit

The object name is mentioned after that -n argument and the object description after -d. The -commit argument is to commit these operations. When the operation is successful, you will get the ID of the object. This ID is used in the next command. The next command is to upload the mesh file of the object to the created entry:

    $ rosrun object_recognition_core mesh_add.py <ID_OF_OBJECT> coke.stl --commit

Here's an example:

    $ rosrun object_recognition_core mesh_add.py cfab1c4804c316ea23c698ecbf0026e4 coke.stl --commit

We are mentioning the name of object model--coke.stl--in this command, which is in the data folder. We are not mentioning the path here because we are already in that path. If not, we have to mention the absolute path of the model.

If it is successful, you will get output saying the model has been stored in the database.

Do you want to see the uploaded model? Here is the procedure:

  1. Install couchapp. The object recognition package uses couchdb as the database. So we need the following application to view the model from the database:
    $ sudo pip install git+https://github.com/couchapp/couchapp.git
  1. After setting up the application, you can run the following command:
    $rosrun object_recognition_core push.sh
  1. If everything is successful, you will get a message like this:

[INFO] Visit your CouchApp here:

http://localhost:5984/or_web_ui/_design/viewer/index.html

  1. Click on the link, and you will get the list of objects and their visualizations in your web browser. Here is a set of screenshots of this web interface:
Figure 16: Web interface for viewing object models

All right! The object model has been properly uploaded to the database.

  1. After uploading the model, we have to train it. You can use the following command:
          $ rosrun object_recognition_core training -c `rospack find object_recognition_linemod`/conf/training.ork
  1. If the training is successful, you will see a message like this:
Figure 17: Training 3D objects
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.135.249