Skip to content
Penn Biggs edited this page Aug 14, 2014 · 12 revisions

About

Authors: Penn Biggs, Suzanne Dazo

What it's for: Map Registration is used to match a semantic map and a raw-data slam map. It provides the transformation needed between one map and another, so that any point on one map correctly corresponds to a point on the other map. The transformation can be used for a number of other projects with semantic mapping.

Dependencies

In order to run, it needs OpenCV (included with ROS), Python 2.7, PyQT4, A semantic map image file, and a properly created SLAM YAML file

map_registration also includes Jonathan Richard Shewchuk's Triangle library, found here. The executable is included in the repository and has not been tested in Windows.

Getting it to Run

Make sure the workspace is properly sourced.

source /opt/ros/groovy/setup.bash
#Navigate to the root of the workspace folder and run:
source devel/setup.bash
cd <directory of map_registration>
python map_registration.py <directory to semantic map image> <directory to SLAM yaml file>
#For Example:
python map_registration.py maps/labpretty.pgm maps/lab.yaml

The following is an example YAML file produced from the SLAM mapping tutorial It is very important that the image: points to the correct image file

image: lab.pgm
resolution: 0.050000
origin: [-23.400000, -34.600000, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196

Output

Registration will result in a folder in your current working directory. Exporting the transformation allows you to save this anywhere. This folder includes:

map1.png           # The image of the semantic map provided
map2.pgm           # The pgm (occupancy grid) of the SLAM map provided
registration.yaml  # The correspondence between the semantic map, the slam 
                   # map, and the real world 
semantic.1.ele     # List of edges in the semantic map's triangulation
semantic.1.node    # List of nodes in the semantic map's triangulation
slam.1.ele         # List of edges in the slam map's triangulation
slam.1.node        # List of nodes in the slam map's triangulation 

A description of the .node and .ele file types may be found at Shewchuk's webpage.

registration.yaml

The format of the registration.yaml file is as follows:

# Pointer to the image file of the human-readable map
semantic_map: lab_pretty.pgm
# Pointer to the image file of the slam (robot-generated) map
slam_map: betterMap.pgm
# The origin of the map [m, m, rad].  This is the real-world pose of the
# cell (0, 0) in the map, which is in the bottom-left corner
origin: [-25.0, -34.6, 0.0]
# The map resolution [m/cell]
resolution: 0.05
# Dimensions of the image files
slam_width: 1024
slam_height: 1152
semantic_width: 223
semantic_height: 368
# Pointers to files that store the nodes (in pixels) in the maps. These
# nodes are matched with each other
semantic_nodes: semantic.1.node
slam_nodes: slam.1.node
# Pointers to files that store the triangles in the maps. These are 
# generated by Triangle and do not correspond with each other.
semantic_triangles: semantic.1.ele
slam_triangles: slam.1.ele

Known bugs and issues

See the issue tracker

To-Do's and improvements

As a note, known bugs and issues should probably be handled before the improvements, but this is the direction we eventually want to go with our interface and the Privacy Interfaces project as a whole.

  • Move away from Python for efficiency
  • Incorporate into a larger suite of tools for semantic mapping including the privacy zones project

Clone this wiki locally