Robot Documentations

Mapping API

Manage robot maps, start mapping processes, and handle localization.

Get the list of available maps

Retrieve the list of available maps (floors) for the robot. Each map is represented by its site and floor information.

GET
/api/v1/mapping

Response Body

Successful Response

responseRequiredResponse Get Available Maps Api V1 Mapping Get
curl -X GET "http://localhost:7242/api/v1/mapping"
fetch("http://localhost:7242/api/v1/mapping")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping"

response = requests.request("GET", url)

print(response.text)
[
  {
    "site": "",
    "name": "",
    "title": "",
    "elev_groups_default": "",
    "elev_groups": "[]",
    "has_map": false
  }
]

Get the default map for the robot

Retrieve the default map for the robot. This endpoint returns the site and floor that the robot is currently configured to use as its default map.

GET
/api/v1/mapping/default-map

Response Body

Successful Response

siteSite

The site where the target is located.

Default: ""
floorFloor

The floor where the target is located.

Default: ""

Default site and floor information is not set in the configuration.

curl -X GET "http://localhost:7242/api/v1/mapping/default-map"
fetch("http://localhost:7242/api/v1/mapping/default-map")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping/default-map"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping/default-map"

response = requests.request("GET", url)

print(response.text)
{
  "site": "site",
  "floor": "floor"
}
{
  "status_code": 400,
  "success": false,
  "message": "Default site and floor information is not set in the configuration.",
  "error": {
    "code": "DEFAULT_MAP_ERROR",
    "message": "Default site and floor information is not set in the configuration."
  }
}

Set the default map for the robot

Set the default map for the robot. This endpoint allows you to specify the default site and floor that the robot should use for navigation and mapping.

POST
/api/v1/mapping/default-map

Request Body

application/jsonRequired
siteSite

The site where the target is located.

Default: ""
floorFloor

The floor where the target is located.

Default: ""

Response Body

Successful Response

status_codeStatus Code

HTTP status code of the response.

Default: 200
successSuccess

Indicates whether the operation was successful.

Default: true
messageMessage

A message providing additional information about the operation.

Default: ""
dataobject | null | null
errorobject | null | null

Failed to set default map

Validation Error

detailDetail
curl -X POST "http://localhost:7242/api/v1/mapping/default-map" \
  -H "Content-Type: application/json" \
  -d '{
    "site": "site",
    "floor": "floor"
  }'
const body = JSON.stringify({
  "site": "site",
  "floor": "floor"
})

fetch("http://localhost:7242/api/v1/mapping/default-map", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping/default-map"
  body := strings.NewReader(`{
    "site": "site",
    "floor": "floor"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping/default-map"
body = {
  "site": "site",
  "floor": "floor"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "status_code": 200,
  "success": true,
  "message": "Operation successful",
  "data": {
    "key": "value"
  },
  "error": {
    "code": "ERROR_CODE",
    "message": "An error occurred"
  }
}
{
  "status_code": 400,
  "success": false,
  "message": "Failed to set default map",
  "error": {
    "code": "DEFAULT_MAP_ERROR",
    "message": "Failed to set default map"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get the current map of the robot encoded in base64

Retrieve the current map of the robot in base64 encoded PNG format. The map includes site and floor information, resolution, dimensions, and origin coordinates.

GET
/api/v1/mapping/map

Response Body

Successful Response

site_floorSiteFloorModel

The site and floor of the map.

resolutionRequiredResolution

The resolution of the map in meters per pixel.

widthRequiredWidth

The width of the map in pixels.

heightRequiredHeight

The height of the map in pixels.

originVector3

The origin of the map in the robot's coordinate system.

map_png_base64RequiredMap Png Base64

Base64 encoded PNG image of the map.

Minimum length: 1

Default site and floor information is not set in the configuration.

Internal server error during map processing

curl -X GET "http://localhost:7242/api/v1/mapping/map"
fetch("http://localhost:7242/api/v1/mapping/map")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping/map"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping/map"

response = requests.request("GET", url)

print(response.text)
{
  "site_floor": {
    "floor": "floor",
    "site": "site"
  },
  "resolution": 0.05,
  "width": 1024,
  "height": 1024,
  "origin": {
    "x": 0,
    "y": 0,
    "z": 0
  },
  "map_png_base64": "iVBORw0KGgoAAAANSUhEUgAA..."
}
{
  "status_code": 400,
  "success": false,
  "message": "Default site and floor information is not set in the configuration.",
  "error": {
    "code": "DEFAULT_MAP_ERROR",
    "message": "Default site and floor information is not set in the configuration."
  }
}
{
  "status_code": 500,
  "success": false,
  "message": "Internal server error during map processing",
  "error": {
    "code": "MAP_PROCESSING_ERROR",
    "message": "Internal server error during map processing"
  }
}

Get the selected map of the robot encoded in base64

Retrieve the selected map of the robot for a specific site and floor in base64 encoded PNG format. The map includes resolution, dimensions, origin coordinates, and the map image encoded in base64.

GET
/api/v1/mapping/{site}/{floor}

Path Parameters

siteRequiredSite
floorRequiredFloor

Response Body

Successful Response

site_floorSiteFloorModel

The site and floor of the map.

resolutionRequiredResolution

The resolution of the map in meters per pixel.

widthRequiredWidth

The width of the map in pixels.

heightRequiredHeight

The height of the map in pixels.

originVector3

The origin of the map in the robot's coordinate system.

map_png_base64RequiredMap Png Base64

Base64 encoded PNG image of the map.

Minimum length: 1

Validation Error

detailDetail
curl -X GET "http://localhost:7242/api/v1/mapping/string/string"
fetch("http://localhost:7242/api/v1/mapping/string/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping/string/string"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping/string/string"

response = requests.request("GET", url)

print(response.text)
{
  "site_floor": {
    "floor": "floor",
    "site": "site"
  },
  "resolution": 0.05,
  "width": 1024,
  "height": 1024,
  "origin": {
    "x": 0,
    "y": 0,
    "z": 0
  },
  "map_png_base64": "iVBORw0KGgoAAAANSUhEUgAA..."
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete the selected map of the robot

Delete the selected map of the robot for a specific site and floor. This endpoint allows you to remove the map data for a specific site and floor combination.

DELETE
/api/v1/mapping/{site}/{floor}

Path Parameters

siteRequiredSite
floorRequiredFloor

Response Body

Successful Response

status_codeStatus Code

HTTP status code of the response.

Default: 200
successSuccess

Indicates whether the operation was successful.

Default: true
messageMessage

A message providing additional information about the operation.

Default: ""
dataobject | null | null
errorobject | null | null

Validation Error

detailDetail
curl -X DELETE "http://localhost:7242/api/v1/mapping/string/string"
fetch("http://localhost:7242/api/v1/mapping/string/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping/string/string"

  req, _ := http.NewRequest("DELETE", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping/string/string"

response = requests.request("DELETE", url)

print(response.text)
{
  "status_code": 200,
  "success": true,
  "message": "Operation successful",
  "data": {
    "key": "value"
  },
  "error": {
    "code": "ERROR_CODE",
    "message": "An error occurred"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Start the mapping process

Start the mapping process for the robot. This endpoint allows you to initiate the mapping process with the specified site, floor, title, and whether the robot has a map.

POST
/api/v1/mapping/start

Request Body

application/jsonRequired
site_floorSiteFloorModel

The site and floor of the mapping.

titleTitle

The title of the mapping.

Default: ""Minimum length: 1
has_mapHas Map
Default: false

Response Body

Successful Response

status_codeStatus Code

HTTP status code of the response.

Default: 200
successSuccess

Indicates whether the operation was successful.

Default: true
messageMessage

A message providing additional information about the operation.

Default: ""
dataobject | null | null
errorobject | null | null

Validation Error

detailDetail
curl -X POST "http://localhost:7242/api/v1/mapping/start" \
  -H "Content-Type: application/json" \
  -d '{
    "site_floor": {
      "site": "site",
      "floor": "floor"
    },
    "title": "site_floor",
    "has_map": false
  }'
const body = JSON.stringify({
  "site_floor": {
    "site": "site",
    "floor": "floor"
  },
  "title": "site_floor",
  "has_map": false
})

fetch("http://localhost:7242/api/v1/mapping/start", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping/start"
  body := strings.NewReader(`{
    "site_floor": {
      "site": "site",
      "floor": "floor"
    },
    "title": "site_floor",
    "has_map": false
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping/start"
body = {
  "site_floor": {
    "site": "site",
    "floor": "floor"
  },
  "title": "site_floor",
  "has_map": false
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "status_code": 200,
  "success": true,
  "message": "Operation successful",
  "data": {
    "key": "value"
  },
  "error": {
    "code": "ERROR_CODE",
    "message": "An error occurred"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Cancel the current mapping process

Cancel the current mapping process of the robot. This endpoint allows you to stop the ongoing mapping process and clear any temporary data.

POST
/api/v1/mapping/cancel

Response Body

Successful Response

status_codeStatus Code

HTTP status code of the response.

Default: 200
successSuccess

Indicates whether the operation was successful.

Default: true
messageMessage

A message providing additional information about the operation.

Default: ""
dataobject | null | null
errorobject | null | null
curl -X POST "http://localhost:7242/api/v1/mapping/cancel"
fetch("http://localhost:7242/api/v1/mapping/cancel")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping/cancel"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping/cancel"

response = requests.request("POST", url)

print(response.text)
{
  "status_code": 200,
  "success": true,
  "message": "Operation successful",
  "data": {
    "key": "value"
  },
  "error": {
    "code": "ERROR_CODE",
    "message": "An error occurred"
  }
}

Change the current map of the robot

Change the current map of the robot to a new site and floor. This endpoint allows you to switch the robot's current map to a different site and floor.

POST
/api/v1/mapping/change

Request Body

application/jsonRequired
siteSite

The site where the target is located.

Default: ""
floorFloor

The floor where the target is located.

Default: ""

Response Body

Successful Response

status_codeStatus Code

HTTP status code of the response.

Default: 200
successSuccess

Indicates whether the operation was successful.

Default: true
messageMessage

A message providing additional information about the operation.

Default: ""
dataobject | null | null
errorobject | null | null

Failed to change map

Validation Error

detailDetail
curl -X POST "http://localhost:7242/api/v1/mapping/change" \
  -H "Content-Type: application/json" \
  -d '{
    "site": "site",
    "floor": "floor"
  }'
const body = JSON.stringify({
  "site": "site",
  "floor": "floor"
})

fetch("http://localhost:7242/api/v1/mapping/change", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping/change"
  body := strings.NewReader(`{
    "site": "site",
    "floor": "floor"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping/change"
body = {
  "site": "site",
  "floor": "floor"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "status_code": 200,
  "success": true,
  "message": "Operation successful",
  "data": {
    "key": "value"
  },
  "error": {
    "code": "ERROR_CODE",
    "message": "An error occurred"
  }
}
{
  "status_code": 400,
  "success": false,
  "message": "Failed to change map",
  "error": {
    "code": "MAP_CHANGE_ERROR",
    "message": "Failed to change map"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Start the Remapping process

Start the remapping process for the robot. This endpoint allows you to initiate the remapping process with the specified site and floor.

POST
/api/v1/mapping/remap

Request Body

application/jsonRequired
siteSite

The site where the target is located.

Default: ""
floorFloor

The floor where the target is located.

Default: ""

Response Body

Successful Response

status_codeStatus Code

HTTP status code of the response.

Default: 200
successSuccess

Indicates whether the operation was successful.

Default: true
messageMessage

A message providing additional information about the operation.

Default: ""
dataobject | null | null
errorobject | null | null

Validation Error

detailDetail
curl -X POST "http://localhost:7242/api/v1/mapping/remap" \
  -H "Content-Type: application/json" \
  -d '{
    "site": "site",
    "floor": "floor"
  }'
const body = JSON.stringify({
  "site": "site",
  "floor": "floor"
})

fetch("http://localhost:7242/api/v1/mapping/remap", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping/remap"
  body := strings.NewReader(`{
    "site": "site",
    "floor": "floor"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping/remap"
body = {
  "site": "site",
  "floor": "floor"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "status_code": 200,
  "success": true,
  "message": "Operation successful",
  "data": {
    "key": "value"
  },
  "error": {
    "code": "ERROR_CODE",
    "message": "An error occurred"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Save the current map of the robot

Save the current map of the robot. This endpoint allows you to save the current map data, including the site and floor information.

POST
/api/v1/mapping/save

Response Body

Successful Response

status_codeStatus Code

HTTP status code of the response.

Default: 200
successSuccess

Indicates whether the operation was successful.

Default: true
messageMessage

A message providing additional information about the operation.

Default: ""
dataobject | null | null
errorobject | null | null
curl -X POST "http://localhost:7242/api/v1/mapping/save"
fetch("http://localhost:7242/api/v1/mapping/save")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/mapping/save"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/mapping/save"

response = requests.request("POST", url)

print(response.text)
{
  "status_code": 200,
  "success": true,
  "message": "Operation successful",
  "data": {
    "key": "value"
  },
  "error": {
    "code": "ERROR_CODE",
    "message": "An error occurred"
  }
}