Skip to content

7.7 Map Management Section

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).

Interface Name pb:/aimdk.protocol.MappingService/Get2DWholeMap
Function Summary Get 2D map data
Interface Type HTTP JSON RPC
URL http://192.168.100.110:50807/rpc/aimdk.protocol.MappingService/Get2DWholeMap
Input Parameters
{
  "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
{
  "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 Script examples/mm/get_2d_whole_map.sh
Notes
  • You can calculate the robot's position in the pixel map using the following formula:

    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.

Interface Name pb:/aimdk.protocol.MappingService/GetStoredMapNames
Function Summary Get map list
Interface Type HTTP JSON RPC
URL http://192.168.100.110:50807/rpc/aimdk.protocol.MappingService/GetStoredMapNames
Input Parameters
{
  "command": "MappingCommand_GET_STORED_MAP_NAME"
}
  • Keep it fixed as is
Output Parameters
{
  "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 Script examples/mm/get_stored_map_names.sh
Notes

7.7.4 Get Current Working Map ID RPC Interface

Section titled “7.7.4 Get Current Working Map ID RPC Interface”
Interface Name pb:/aimdk.protocol.MappingService/GetCurrentWorkingMap
Function Summary Get current working map ID
Interface Type HTTP JSON RPC
URL http://192.168.100.110:50807/rpc/aimdk.protocol.MappingService/GetCurrentWorkingMap
Input Parameters
{
  "command": "MappingCommand_GET_CURRENT_WORKING_MAP"
}
Fixed as is
Output Parameters
{
  "data": {
    "map_id": "1764059676131"
  }
}
map_id: The ID of the currently used map
Example Script examples/mm/get_current_working_map.sh
Notes
Interface Name pb:/aimdk.protocol.LocalizationService/GetTopoMsgs
Function Summary Get map topology data
Interface Type HTTP JSON RPC
URL http://192.168.100.110:50807/rpc/aimdk.protocol.LocalizationService/GetTopoMsgs
Input Parameters
{
  "command": "TopoCommand_GET_TOPO_MSG",
  "map_id": 1764059676131
}
  • command field should be fixed as TopoCommand_GET_TOPO_MSG
  • map_id: Map ID
Output Parameters
{
  "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 Script examples/mm/get_topo_msgs.sh
Notes