7.7 Map Management Section

7.7 Map Management Section

7.7.1 Overview

The Map Management (MM) module on ORIN is responsible for managing the robot's maps, including functions such as map acquisition, storage, and updates.

SLAM mapping, relocalization, and other features do not currently provide secondary development interfaces and can only be used in conjunction with the AimMaster client software.

Secondary development interfaces for querying map information are provided, making it convenient to obtain map feature data and navigation point data (for use with planning and control navigation interfaces).

7.7.2 Get 2D Map Data RPC Interface

Interface Namepb:/aimdk.protocol.MappingService/Get2DWholeMap
Function SummaryGet 2D map data
Interface TypeHTTP JSON RPC
URLhttp://192.168.100.110:50807/rpc/aimdk.protocol.MappingService/Get2DWholeMap
Input Parameters
text
{
  "command": "MappingCommand_GET_2D_WHOLE_MAP",
  "map_id": "1764059676131"
}
  • command: Keep it as is
  • map_id: Fill in the ID of the map for which you want to get information
Output Parameters
text
{
  "data": {
    "map_id": "1764059676131",
    "map_name": "Park",
    "width": 2898,
    "height": 2603,
    "resolution": 20,
    "origin_x": 1274,
    "origin_y": 1371,
    "map_data": "...",
    "rotate_angle": -5.512457272434708,
    "map_url": ""
  }
}
  • map_id: Map ID
  • map_name: Map name
  • width: Map width
  • height: Map height
  • resolution: Resolution
  • origin_x, origin_y: Origin coordinates at the time of mapping, can be considered as the map origin
  • map_data: Map data, in PNG format
  • rotate_angle: Rotation angle, indicates the display method for the client, can be ignored
  • map_url: Invalid field
Example Scriptexamples/mm/get_2d_whole_map.sh
Notes
  • You can calculate the robot's position in the pixel map using the following formula:
    text
    pixel_x = origin_x + x * resolution
    pixel_y = origin_y - y * resolution
    

    Where x, y are the transformation coordinates from the map coordinate system to the robot's base_link coordinate system, which can be obtained through the /tf topic.

7.7.3 Get Map List RPC Interface

Interface Namepb:/aimdk.protocol.MappingService/GetStoredMapNames
Function SummaryGet map list
Interface TypeHTTP JSON RPC
URLhttp://192.168.100.110:50807/rpc/aimdk.protocol.MappingService/GetStoredMapNames
Input Parameters
text
{
  "command": "MappingCommand_GET_STORED_MAP_NAME"
}
  • Keep it fixed as is
Output Parameters
text
{
  "data": {
    "map_lists": [
      {
        "map_id": "1764137567113",
        "map_name": "River Park",
        "map_index": 5
      },
      {
        "map_id": "1764059676131",
        "map_name": "Park",
        "map_index": 3
      },
      {
        "map_id": "1762584133656",
        "map_name": "e2-8",
        "map_index": 2
      }
    ]
  }
}
  • map_id: Map ID
  • map_name: Map name
  • map_index: Map index
Example Scriptexamples/mm/get_stored_map_names.sh
Notes

7.7.4 Get Current Working Map ID RPC Interface

Interface Namepb:/aimdk.protocol.MappingService/GetCurrentWorkingMap
Function SummaryGet current working map ID
Interface TypeHTTP JSON RPC
URLhttp://192.168.100.110:50807/rpc/aimdk.protocol.MappingService/GetCurrentWorkingMap
Input Parameters
text
{
  "command": "MappingCommand_GET_CURRENT_WORKING_MAP"
}
Fixed as is
Output Parameters
text
{
  "data": {
    "map_id": "1764059676131"
  }
}
map_id: The ID of the currently used map
Example Scriptexamples/mm/get_current_working_map.sh
Notes

7.7.5 Get Map Topology Data RPC Interface

Interface Namepb:/aimdk.protocol.LocalizationService/GetTopoMsgs
Function SummaryGet map topology data
Interface TypeHTTP JSON RPC
URLhttp://192.168.100.110:50807/rpc/aimdk.protocol.LocalizationService/GetTopoMsgs
Input Parameters
text
{
  "command": "TopoCommand_GET_TOPO_MSG",
  "map_id": 1764059676131
}
  • command field should be fixed as TopoCommand_GET_TOPO_MSG
  • map_id: Map ID
Output Parameters
text
{
  "data": {
    "points": [
      {
        "point_id": 1,
        "name": "Navigation Point 1",
        "point_type": "NaviPointType_NAVI_POINT",
        "pixel_pose": {
          "position": {
            "u": 1506,
            "v": 1420
          },
          "angle": 0
        },
        "pose": {
          "position": {
            "x": 11.6,
            "y": -2.45,
            "z": 0
          }
        }
      }
    ],
    "paths": [],
    "regions": []
  }
}
  • points, paths, regions represent points, routes, and regions, respectively. Points can be used for route explanations and navigation, while the latter two are generally not used and do not need to be concerned about.
  • point_id: Point ID
  • name: Point name
  • point_type: Point type
  • pixel_pose: Pixel coordinates
  • pose: World coordinates
Example Scriptexamples/mm/get_topo_msgs.sh
Notes