(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Generating normals for an object in the object database by using a provided tool

Description: As some packages using the objects in the object database need to know from which directions an object can be detected the best, this information needs to be provided. Therefore a tool exists which helps generating and visualizing those directions (stored as normalized vectors starting at the center of the object). This tutorial gives an overview on how to use this normal generation tool.

Tutorial Level: BEGINNER

Contents

  1. Tutorial

Tutorial

The normal generator tool can be found in the object database package at /src/normal_generator_tool/. This directory contains an executable python file and a .yaml file containing the parameters. Follow those steps to generate a file containing the normals you need:

  1. Configure the tool by setting the parameters:
    • Open the .yaml file with a text editor of your choice and set the parameters accordingly to your needs:

      • marker_frame (string): The frame the normals are relative to (by default /map; this does not need to be changed usually)

      • pub_topic (string): The name of the topic the visualized normals are published on

      • output_rel_path (string): The relative path (from the package's base) to the output file containing the generated normals

      • pan (int[]): A two-dimensional list with the first element being the minimum and the second one being the maximum pan angle normals are generated for. Normals in this plane are only generated between those two values.

      • tilt (int[]): The same as pan but with tilt angles.

      • d_pan (int): This value declares the angle steps at which normals are created in the pan plane (in the interval set in pan)

      • d_tilt (int): This value declares similar to d_pan the angle steps in the tilt plane.

      • base_vector (int[][]): A list of three-dimensional vectors specifying the base directions around which normals are generated with the given pan and tilt values.

      • publish_rate (int): The publish rate of the visualized normals

  2. Run the generator:
    • After you have set your parameters run the normalsTool file with the following command:
      • python normalsTool.py
  3. Check the normals with rviz:
    • The normals are visualized and can be checked with rviz. Open it up and add a MarkerArray with the topic you have specified in the .yaml file. Each set of normals around a given base vector has its own color.

  4. Copy the generated file the object folder:
    • If you are satisfied with the outcome of your parameters, terminate the running python script and copy the generated normals file to the folder containing the information about your object. The objects can be found at the rsc/databases/ directory in the asr_object_database package.

Wiki: asr_object_database/normal_generation_tutorial (last edited 2017-05-30 12:27:34 by TobiasAllgeyer)