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.
Response Body
Successful Response
responseRequiredResponse Get Available Maps Api V1 Mapping Getcurl -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.
Response Body
Successful Response
siteSiteThe site where the target is located.
""floorFloorThe floor where the target is located.
""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.
Request Body
application/jsonRequiredsiteSiteThe site where the target is located.
""floorFloorThe floor where the target is located.
""Response Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
200successSuccessIndicates whether the operation was successful.
truemessageMessageA message providing additional information about the operation.
""dataobject | null | nullerrorobject | null | nullFailed to set default map
Validation Error
detailDetailcurl -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.
Response Body
Successful Response
site_floorSiteFloorModelThe site and floor of the map.
resolutionRequiredResolutionThe resolution of the map in meters per pixel.
widthRequiredWidthThe width of the map in pixels.
heightRequiredHeightThe height of the map in pixels.
originVector3The origin of the map in the robot's coordinate system.
map_png_base64RequiredMap Png Base64Base64 encoded PNG image of the map.
1Default 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.
Path Parameters
siteRequiredSitefloorRequiredFloorResponse Body
Successful Response
site_floorSiteFloorModelThe site and floor of the map.
resolutionRequiredResolutionThe resolution of the map in meters per pixel.
widthRequiredWidthThe width of the map in pixels.
heightRequiredHeightThe height of the map in pixels.
originVector3The origin of the map in the robot's coordinate system.
map_png_base64RequiredMap Png Base64Base64 encoded PNG image of the map.
1Validation Error
detailDetailcurl -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.
Path Parameters
siteRequiredSitefloorRequiredFloorResponse Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
200successSuccessIndicates whether the operation was successful.
truemessageMessageA message providing additional information about the operation.
""dataobject | null | nullerrorobject | null | nullValidation Error
detailDetailcurl -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.
Request Body
application/jsonRequiredsite_floorSiteFloorModelThe site and floor of the mapping.
titleTitleThe title of the mapping.
""Minimum length: 1has_mapHas MapfalseResponse Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
200successSuccessIndicates whether the operation was successful.
truemessageMessageA message providing additional information about the operation.
""dataobject | null | nullerrorobject | null | nullValidation Error
detailDetailcurl -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.
Response Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
200successSuccessIndicates whether the operation was successful.
truemessageMessageA message providing additional information about the operation.
""dataobject | null | nullerrorobject | null | nullcurl -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.
Request Body
application/jsonRequiredsiteSiteThe site where the target is located.
""floorFloorThe floor where the target is located.
""Response Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
200successSuccessIndicates whether the operation was successful.
truemessageMessageA message providing additional information about the operation.
""dataobject | null | nullerrorobject | null | nullFailed to change map
Validation Error
detailDetailcurl -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.
Request Body
application/jsonRequiredsiteSiteThe site where the target is located.
""floorFloorThe floor where the target is located.
""Response Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
200successSuccessIndicates whether the operation was successful.
truemessageMessageA message providing additional information about the operation.
""dataobject | null | nullerrorobject | null | nullValidation Error
detailDetailcurl -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.
Response Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
200successSuccessIndicates whether the operation was successful.
truemessageMessageA message providing additional information about the operation.
""dataobject | null | nullerrorobject | null | nullcurl -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"
}
}