Robot Documentations

Navigation API

Control robot movement, set navigation goals, and manage navigation paths.

Get the navigation path of the robot

Retrieve the navigation path of the robot. The path is represented as a series of points with x, y coordinates and theta (orientation in radians).

GET
/api/v1/navigation/path

Response Body

Successful Response

siteRequiredSite

The site where the path is located.

floorRequiredFloor

The floor where the path is located.

pointsPoints

List of points defining the path.

Navigation path not found

Failed to retrieve navigation path

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

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

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

  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/navigation/path"

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

print(response.text)
{
  "site": "site",
  "floor": "floor",
  "points": [
    {
      "theta": 0,
      "x": 0,
      "y": 0
    },
    {
      "theta": 1.57,
      "x": 1,
      "y": 1
    }
  ]
}
{
  "status_code": 404,
  "success": false,
  "message": "Navigation path not found",
  "error": {
    "code": "NAVIGATION_PATH_NOT_FOUND",
    "message": "Navigation path not found"
  }
}
{
  "status_code": 500,
  "success": false,
  "message": "Failed to retrieve navigation path",
  "error": {
    "code": "NAVIGATION_PATH_ERROR",
    "message": "Failed to retrieve navigation path"
  }
}

Get the navigation path stream of the robot

Retrieve the navigation path stream of the robot. The path is represented as a series of points with x, y coordinates and theta (orientation in radians).

GET
/api/v1/navigation/path/stream

Response Body

Successful Response

siteRequiredSite

The site where the path is located.

floorRequiredFloor

The floor where the path is located.

pointsPoints

List of points defining the path.

Navigation path not found

Failed to retrieve navigation path stream

curl -X GET "http://localhost:7242/api/v1/navigation/path/stream"
fetch("http://localhost:7242/api/v1/navigation/path/stream")
package main

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

func main() {
  url := "http://localhost:7242/api/v1/navigation/path/stream"

  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/navigation/path/stream"

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

print(response.text)
{
  "site": "site",
  "floor": "floor",
  "points": [
    {
      "theta": 0,
      "x": 0,
      "y": 0
    },
    {
      "theta": 1.57,
      "x": 1,
      "y": 1
    }
  ]
}
{
  "status_code": 404,
  "success": false,
  "message": "Navigation path not found",
  "error": {
    "code": "NAVIGATION_PATH_NOT_FOUND",
    "message": "Navigation path not found"
  }
}
{
  "status_code": 500,
  "success": false,
  "message": "Failed to retrieve navigation path stream",
  "error": {
    "code": "NAVIGATION_PATH_STREAM_ERROR",
    "message": "Failed to retrieve navigation path stream"
  }
}

Get the calculated navigation path of the robot to a target

Retrieve the calculated navigation path of the robot to a specified target. The path is represented as a series of points with x, y coordinates and theta (orientation in radians).

GET
/api/v1/navigation/path/calculate

Query Parameters

target_uidRequiredTarget Uid

Response Body

Successful Response

siteRequiredSite

The site where the path is located.

floorRequiredFloor

The floor where the path is located.

pointsPoints

List of points defining the path.

Navigation path not found

Validation Error

detailDetail

Failed to calculate navigation path

curl -X GET "http://localhost:7242/api/v1/navigation/path/calculate?target_uid=string"
fetch("http://localhost:7242/api/v1/navigation/path/calculate?target_uid=string")
package main

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

func main() {
  url := "http://localhost:7242/api/v1/navigation/path/calculate?target_uid=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/navigation/path/calculate?target_uid=string"

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

print(response.text)
{
  "site": "site",
  "floor": "floor",
  "points": [
    {
      "theta": 0,
      "x": 0,
      "y": 0
    },
    {
      "theta": 1.57,
      "x": 1,
      "y": 1
    }
  ]
}
{
  "status_code": 404,
  "success": false,
  "message": "Navigation path not found",
  "error": {
    "code": "NAVIGATION_PATH_NOT_FOUND",
    "message": "Navigation path not found"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
{
  "status_code": 500,
  "success": false,
  "message": "Failed to calculate navigation path",
  "error": {
    "code": "NAVIGATION_PATH_CALCULATION_ERROR",
    "message": "Failed to calculate navigation path"
  }
}

Get the current position of the robot

Retrieve the current position and velocity of the robot. The position includes x, y coordinates and theta (orientation in radians).

GET
/api/v1/navigation/position

Response Body

Successful Response

positionPosition

Current position of the robot in the environment.

twistTwistModel

Current velocity of the robot in the environment.

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

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

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

  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/navigation/position"

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

print(response.text)
{
  "position": {
    "x": 0,
    "y": 0,
    "theta": 0
  },
  "twist": {
    "vel_x": 0,
    "vel_z": 0
  }
}

Stream the current position of the robot

Stream the current position and velocity of the robot in real-time. The position includes x, y coordinates and theta (orientation in radians).

GET
/api/v1/navigation/position/stream

Response Body

Successful Response

positionPosition

Current position of the robot in the environment.

twistTwistModel

Current velocity of the robot in the environment.

curl -X GET "http://localhost:7242/api/v1/navigation/position/stream"
fetch("http://localhost:7242/api/v1/navigation/position/stream")
package main

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

func main() {
  url := "http://localhost:7242/api/v1/navigation/position/stream"

  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/navigation/position/stream"

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

print(response.text)
{
  "position": {
    "x": 0,
    "y": 0,
    "theta": 0
  },
  "twist": {
    "vel_x": 0,
    "vel_z": 0
  }
}

Set a navigation goal to a specific pose

Set a navigation goal for the robot to reach a specific position and orientation (theta). The position is defined by x and y coordinates, and theta is the orientation in radians.

POST
/api/v1/navigation/goal/pose

Request Body

application/jsonRequired
xX

X coordinate in meters.

Default: 0
yY

Y coordinate in meters.

Default: 0
thetaTheta

Orientation in radians.

Default: 0

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/navigation/goal/pose" \
  -H "Content-Type: application/json" \
  -d '{
    "x": 0,
    "y": 0,
    "theta": 0
  }'
const body = JSON.stringify({
  "x": 0,
  "y": 0,
  "theta": 0
})

fetch("http://localhost:7242/api/v1/navigation/goal/pose", {
  body
})
package main

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

func main() {
  url := "http://localhost:7242/api/v1/navigation/goal/pose"
  body := strings.NewReader(`{
    "x": 0,
    "y": 0,
    "theta": 0
  }`)
  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/navigation/goal/pose"
body = {
  "x": 0,
  "y": 0,
  "theta": 0
}
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"
    }
  ]
}

Set a navigation goal to a target

Set a navigation goal for the robot to reach a specific target by its unique identifier (UID). The target must exist in the system.

POST
/api/v1/navigation/goal/target

Request Body

application/jsonRequired
target_uidTarget Uid

The unique identifier of the target to navigate to.

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

Target UID is required

Validation Error

detailDetail
curl -X POST "http://localhost:7242/api/v1/navigation/goal/target" \
  -H "Content-Type: application/json" \
  -d '{
    "target_uid": "site_floor_target-1"
  }'
const body = JSON.stringify({
  "target_uid": "site_floor_target-1"
})

fetch("http://localhost:7242/api/v1/navigation/goal/target", {
  body
})
package main

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

func main() {
  url := "http://localhost:7242/api/v1/navigation/goal/target"
  body := strings.NewReader(`{
    "target_uid": "site_floor_target-1"
  }`)
  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/navigation/goal/target"
body = {
  "target_uid": "site_floor_target-1"
}
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": "Target UID is required",
  "error": {
    "code": "BAD_REQUEST",
    "message": "Target UID is required"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get the current emergency stop status of the robot

Retrieve the current emergency stop status of the robot. The response indicates whether the emergency stop is enabled or disabled.

GET
/api/v1/navigation/stop

Response Body

Successful Response

stopStop

Indicates whether the robot should stop or not.

Default: false
curl -X GET "http://localhost:7242/api/v1/navigation/stop"
fetch("http://localhost:7242/api/v1/navigation/stop")
package main

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

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

  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/navigation/stop"

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

print(response.text)
{
  "stop": true
}

Stop the robot

Set the emergency stop status of the robot. This will stop the robot immediately and prevent any further movement until the emergency stop is cleared.

POST
/api/v1/navigation/stop

Request Body

application/jsonRequired
stopStop

Indicates whether the robot should stop or not.

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/navigation/stop" \
  -H "Content-Type: application/json" \
  -d '{
    "stop": true
  }'
const body = JSON.stringify({
  "stop": true
})

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

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

func main() {
  url := "http://localhost:7242/api/v1/navigation/stop"
  body := strings.NewReader(`{
    "stop": true
  }`)
  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/navigation/stop"
body = {
  "stop": true
}
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"
    }
  ]
}

Send a safety velocity command to the robot

Send a safety velocity command to the robot. This command is used to control the robot's movement in a safe manner, ensuring it does not exceed safety limits.

POST
/api/v1/navigation/vel/safe

Request Body

application/jsonRequired
vel_xVel X

Linear velocity in the x direction in meters per second.

Default: 0
vel_zVel Z

Angular velocity around the z axis in radians per second.

Default: 0

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/navigation/vel/safe" \
  -H "Content-Type: application/json" \
  -d '{
    "vel_x": 0,
    "vel_z": 0
  }'
const body = JSON.stringify({
  "vel_x": 0,
  "vel_z": 0
})

fetch("http://localhost:7242/api/v1/navigation/vel/safe", {
  body
})
package main

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

func main() {
  url := "http://localhost:7242/api/v1/navigation/vel/safe"
  body := strings.NewReader(`{
    "vel_x": 0,
    "vel_z": 0
  }`)
  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/navigation/vel/safe"
body = {
  "vel_x": 0,
  "vel_z": 0
}
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"
    }
  ]
}

Send a velocity command to the robot

Send a velocity command to the robot. This command is used to control the robot's movement by specifying linear and angular velocities.

POST
/api/v1/navigation/vel

Request Body

application/jsonRequired
vel_xVel X

Linear velocity in the x direction in meters per second.

Default: 0
vel_zVel Z

Angular velocity around the z axis in radians per second.

Default: 0

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/navigation/vel" \
  -H "Content-Type: application/json" \
  -d '{
    "vel_x": 0,
    "vel_z": 0
  }'
const body = JSON.stringify({
  "vel_x": 0,
  "vel_z": 0
})

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

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

func main() {
  url := "http://localhost:7242/api/v1/navigation/vel"
  body := strings.NewReader(`{
    "vel_x": 0,
    "vel_z": 0
  }`)
  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/navigation/vel"
body = {
  "vel_x": 0,
  "vel_z": 0
}
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"
    }
  ]
}

Start the localization process

Start the localization process for the robot. This endpoint initiates the localization process using the provided site and floor information.

POST
/api/v1/navigation/localization

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 start localization

Validation Error

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

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

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

func main() {
  url := "http://localhost:7242/api/v1/navigation/localization"
  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/navigation/localization"
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 start localization",
  "error": {
    "code": "LOCALIZATION_ERROR",
    "message": "Failed to start localization"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}