The Map Editor window allows you to visualize and annotate different map layers. When the page is first loaded, the first map from the map editor is activated by default.
The upper section of the window  shows the map layers from the currently selected map. The remainder of the window  shows information about maps and layers. Three types of layers are supported.
- OccucpancyGridMapLayer: A dense rectangular map which stores certain information per pixel.
- WaypointMapLayer: A simple layer which stores annotatable points of interest.
- PolygonMapLayer: A layer which stores multiple polygons in the local layer coordinate frame.
The information section shows information about all of the maps:
- Symbols representing different type of map layers:
- First symbol represents OccupancyGridMapLayer.
- Second symbol represents WaypointMapLayer.
- Third symbol represents PolygonMapLayer.
- Check box for each layer. Clicking selects/deselects corresponding layer for visualization.
- Name of the layers and type in brackets.
- List of maps in map editor. Selecting a map enables that map and loads all the layer information for that map.
- Button to create new WaypointMapLayer, clicking shows a dialog for new layer.
- Button to create new PolygonMapLayer, clicking shows a dialog for new layer.
Running Map Editor¶
Start Map Editor with the following command:
bob@desktop:~/isaac$ bazel run apps/map_editor -- --config <path_to_config_file> --graph <path_to_graph_file> --config_backup <path_to_backup_file>
<path_to_config_file>is the full path to the file where the current map configuration is stored.
<path_to_graph_file>is the full path to the file where the current map graph is stored.
<path_to_backup_file>is the full path to the file where the edited config is saved when there is an update to the map. This file must exist prior to running the map editor application.
To run the Map Editor on a provided map of Nvidia’s Building R:
bob@desktop:~/isaac$ bazel run apps/map_editor -- --config apps/assets/maps/nvidia_R_180306.config.json --graph apps/assets/maps/nvidia_R_180306.graph.json --config_backup apps/assets/maps/nvidia_R_180306_backup.config.json
Running Map Editor using the above command will open the Map Container in Sight:
Any edits to the map will be saved into the file specified by
<path_to_backup_file> on exit of the map editor application.
Editing Existing Map Layers¶
Use the procedures in this section to edit existing map layers.
Adding New Waypoints or Polygons¶
- Click on edit icon for the layer.
The name of the layer that is enabled for editing is shown in bold. All other layers of the same type are disabled.
2. Once the layer is enabled for editing, use the controls at the top of the window to edit the layer.
Editing tools for waypoint layer are shown in the following screenshot:
The first button at the top left is for selecting a waypoint color, and the first button at the top right is to start drawing waypoints. Clicking opens a dialog for specifying waypoint input like radius and name:
After clicking OK a new waypoint of the specified color, radius, and name is drawn at the current mouse position. The arrow direction indicates waypoint rotation.
Click the second button at top right to start removing waypoints. Subsequent mouse clicks on waypoints delete selected waypoints.
Editing tools for polygon layer are shown in the following screenshot:
Click the first button at top right start to begin drawing polygons. Click on the occupancy map to select polygon point. Every mouse left click marks a polygon point and a line is drawn from the previous marked point to this point. Right clicking closes the polygon, drawing it in the color specified for the layer.
Click the second button at top right to start removing polygons. Subsequent mouse clicks on polygons delete selected polygons.
Modifying Existing Waypoints and Polygons¶
To modify existing waypoints or polygons:
- Enable the layer for editing.
- Click Stop Drawing Objects if you were previously drawing objects with mouse clicks.
- Click on the waypoint or polygon to edit. Controls are displayed as shown in the following screenshot:
The following controls shown in the above screenshot:
- Top left control
- Top right control
- Bottom left control
- Bottom right control
- Rotation control
Using these controls you can scale, reposition, or rotate waypoints and polygons. To reposition, Click a waypoint or polygon and drag it to new position.
There are similar controls for polygon objects, as shown below:
Creating a New WaypointMapLayer¶
- Click Add new waypoint layer as shown in the following screenshot:
A new dialog box opens for specification of a new layer.
- Enter the name of the waypoint layer and click OK to create the new layer, or click cancel.
Creating a New PolygonMapLayer¶
- Click Add new polygon layer as shown below:
A new dialog box opens for specification of input for the new layer.
- Click the color picker to select a color for this layer.
- Enter the name of the polygon layer and click OK to create the new layer, or click Cancel.
- Click on the delete layer button shown in the following screenshot:
- At the confirmation dialog box, click OK to delete the layer or click Cancel.
Click the check box before each layer to enable/disable layers. A green checkbox means the layer is enabled and its contents are displayed. A gray check box means the layer is disabled.