Robot Dokümantasyonu

Navigasyon API

Robotun hareketini kontrol edin, navigasyon hedefleri belirleyin ve navigasyon yollarını yönetin.

Robotun navigasyon yolunu alma

Robotun navigasyon yolunu döndürür. Yol, x, y koordinatları ve theta (radyan cinsinden yönelim) içeren noktalar dizisi olarak gösterilir.

GET
/navigation/path

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Response Body

Başarılı yanıt

siteRequiredSite

Yolun bulunduğu site.

floorRequiredFloor

Yolun bulunduğu kat.

pointsPoints

Yolu tanımlayan noktaların listesi.

Navigasyon yolu bulunamadı

Navigasyon yolu alınamadı

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path", {
  headers: {
    "x-api-key": "<token>"
  }
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("x-api-key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

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

url = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path"

response = requests.request("GET", url, headers = {
  "x-api-key": "<token>"
})

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"
  }
}

Robotun navigasyon yolunu akış olarak alma

Robotun navigasyon yolunu akış olarak döndürür. Yol, x, y koordinatları ve theta (radyan cinsinden yönelim) içeren noktalar dizisi olarak gösterilir.

GET
/navigation/path/stream

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Response Body

Başarılı yanıt

siteRequiredSite

Yolun bulunduğu site.

floorRequiredFloor

Yolun bulunduğu kat.

pointsPoints

Yolu tanımlayan noktaların listesi.

Navigasyon yolu bulunamadı

Navigasyon yolu akışı alınamadı

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path/stream" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path/stream", {
  headers: {
    "x-api-key": "<token>"
  }
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path/stream"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("x-api-key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

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

url = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path/stream"

response = requests.request("GET", url, headers = {
  "x-api-key": "<token>"
})

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"
  }
}

Robotun bir hedefe hesaplanan navigasyon yolunu alma

Robotun belirtilen hedefe hesaplanan navigasyon yolunu döndürür. Yol, x, y koordinatları ve theta (radyan cinsinden yönelim) içeren noktalar dizisi olarak gösterilir.

GET
/navigation/path/calculate

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Query Parameters

target_uidRequiredTarget Uid

Response Body

Başarılı yanıt

siteRequiredSite

Yolun bulunduğu site.

floorRequiredFloor

Yolun bulunduğu kat.

pointsPoints

Yolu tanımlayan noktaların listesi.

Navigasyon yolu bulunamadı

Doğrulama hatası

detailDetail

Navigasyon yolu hesaplanamadı

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path/calculate?target_uid=string" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path/calculate?target_uid=string", {
  headers: {
    "x-api-key": "<token>"
  }
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path/calculate?target_uid=string"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("x-api-key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

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

url = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/path/calculate?target_uid=string"

response = requests.request("GET", url, headers = {
  "x-api-key": "<token>"
})

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"
  }
}

Robotun güncel konumunu alma

Robotun güncel konumunu ve hızını döndürür. Konum, x, y koordinatlarını ve theta (radyan cinsinden yönelim) değerini içerir.

GET
/navigation/position

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Response Body

Başarılı yanıt

positionPosition

Robotun ortamdaki güncel konumu.

twistTwistModel

Robotun ortamdaki güncel hızı.

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/position" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/position", {
  headers: {
    "x-api-key": "<token>"
  }
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/position"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("x-api-key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

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

url = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/position"

response = requests.request("GET", url, headers = {
  "x-api-key": "<token>"
})

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

Robotun güncel konumunu akış olarak alma

Robotun güncel konumunu ve hızını gerçek zamanlı akış olarak gönderir. Konum, x, y koordinatlarını ve theta (radyan cinsinden yönelim) değerini içerir.

GET
/navigation/position/stream

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Response Body

Başarılı yanıt

positionPosition

Robotun ortamdaki güncel konumu.

twistTwistModel

Robotun ortamdaki güncel hızı.

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/position/stream" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/position/stream", {
  headers: {
    "x-api-key": "<token>"
  }
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/position/stream"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("x-api-key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

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

url = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/position/stream"

response = requests.request("GET", url, headers = {
  "x-api-key": "<token>"
})

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

Belirli bir poza navigasyon hedefi belirleme

Robotun belirli bir konuma ve yönelime (theta) ulaşması için navigasyon hedefi belirler. Konum x ve y koordinatlarıyla tanımlanır, theta ise radyan cinsinden yönelimdir.

POST
/navigation/goal/pose

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Request Body

application/jsonRequired
xX

Metre cinsinden X koordinatı.

Default: 0
yY

Metre cinsinden Y koordinatı.

Default: 0
thetaTheta

Radyan cinsinden yönelim.

Default: 0

Response Body

Başarılı yanıt

status_codeStatus Code

Yanıtın HTTP durum kodu.

Default: 200
successSuccess

İşlemin başarılı olup olmadığını belirtir.

Default: true
messageMessage

İşlem hakkında ek bilgi veren mesaj.

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

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/goal/pose" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "x": 0,
    "y": 0,
    "theta": 0
  }'
const body = JSON.stringify({
  "x": 0,
  "y": 0,
  "theta": 0
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/goal/pose", {
  headers: {
    "x-api-key": "<token>"
  },
  body
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/goal/pose"
  body := strings.NewReader(`{
    "x": 0,
    "y": 0,
    "theta": 0
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("x-api-key", "<token>")
  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 = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/goal/pose"
body = {
  "x": 0,
  "y": 0,
  "theta": 0
}
response = requests.request("POST", url, json = body, headers = {
  "x-api-key": "<token>",
  "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"
    }
  ]
}

Robotun benzersiz tanımlayıcısıyla (UID) belirtilen bir hedefe ulaşması için navigasyon hedefi belirler. Hedef sistemde kayıtlı olmalıdır.

POST
/navigation/goal/target

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Request Body

application/jsonRequired
target_uidTarget Uid

Gidilecek hedefin benzersiz tanımlayıcısı.

Default: ""

Response Body

Başarılı yanıt

status_codeStatus Code

Yanıtın HTTP durum kodu.

Default: 200
successSuccess

İşlemin başarılı olup olmadığını belirtir.

Default: true
messageMessage

İşlem hakkında ek bilgi veren mesaj.

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

Hedef UID'si zorunludur

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/goal/target" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "target_uid": "site_floor_target-1"
  }'
const body = JSON.stringify({
  "target_uid": "site_floor_target-1"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/goal/target", {
  headers: {
    "x-api-key": "<token>"
  },
  body
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/goal/target"
  body := strings.NewReader(`{
    "target_uid": "site_floor_target-1"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("x-api-key", "<token>")
  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 = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/goal/target"
body = {
  "target_uid": "site_floor_target-1"
}
response = requests.request("POST", url, json = body, headers = {
  "x-api-key": "<token>",
  "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"
    }
  ]
}

Robotun güncel acil stop durumunu alma

Robotun güncel acil stop durumunu döndürür. Yanıt, acil stopun etkin olup olmadığını belirtir.

GET
/navigation/stop

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Response Body

Başarılı yanıt

stopStop

Robotun durması gerekip gerekmediğini belirtir.

Default: false
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/stop" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/stop", {
  headers: {
    "x-api-key": "<token>"
  }
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/stop"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("x-api-key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

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

url = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/stop"

response = requests.request("GET", url, headers = {
  "x-api-key": "<token>"
})

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

Robotu durdurma

Robotun acil stop durumunu ayarlar. Bu işlem robotu hemen durdurur ve acil stop kaldırılana kadar başka bir hareket yapmasını engeller.

POST
/navigation/stop

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Request Body

application/jsonRequired
stopStop

Robotun durması gerekip gerekmediğini belirtir.

Default: false

Response Body

Başarılı yanıt

status_codeStatus Code

Yanıtın HTTP durum kodu.

Default: 200
successSuccess

İşlemin başarılı olup olmadığını belirtir.

Default: true
messageMessage

İşlem hakkında ek bilgi veren mesaj.

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

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/stop" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "stop": true
  }'
const body = JSON.stringify({
  "stop": true
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/stop", {
  headers: {
    "x-api-key": "<token>"
  },
  body
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/stop"
  body := strings.NewReader(`{
    "stop": true
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("x-api-key", "<token>")
  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 = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/stop"
body = {
  "stop": true
}
response = requests.request("POST", url, json = body, headers = {
  "x-api-key": "<token>",
  "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"
    }
  ]
}

Robota güvenli hız komutu gönderme

Robota güvenli hız komutu gönderir. Bu komut, robotun hareketini güvenlik sınırlarını aşmayacak şekilde güvenli biçimde kontrol etmek için kullanılır.

POST
/navigation/vel/safe

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Request Body

application/jsonRequired
vel_xVel X

x yönündeki doğrusal hız (metre/saniye).

Default: 0
vel_zVel Z

z ekseni etrafındaki açısal hız (radyan/saniye).

Default: 0

Response Body

Başarılı yanıt

status_codeStatus Code

Yanıtın HTTP durum kodu.

Default: 200
successSuccess

İşlemin başarılı olup olmadığını belirtir.

Default: true
messageMessage

İşlem hakkında ek bilgi veren mesaj.

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

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/vel/safe" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "vel_x": 0,
    "vel_z": 0
  }'
const body = JSON.stringify({
  "vel_x": 0,
  "vel_z": 0
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/vel/safe", {
  headers: {
    "x-api-key": "<token>"
  },
  body
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/vel/safe"
  body := strings.NewReader(`{
    "vel_x": 0,
    "vel_z": 0
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("x-api-key", "<token>")
  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 = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/vel/safe"
body = {
  "vel_x": 0,
  "vel_z": 0
}
response = requests.request("POST", url, json = body, headers = {
  "x-api-key": "<token>",
  "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"
    }
  ]
}

Robota hız komutu gönderme

Robota hız komutu gönderir. Bu komut, doğrusal ve açısal hızlar belirtilerek robotun hareketini kontrol etmek için kullanılır.

POST
/navigation/vel

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Request Body

application/jsonRequired
vel_xVel X

x yönündeki doğrusal hız (metre/saniye).

Default: 0
vel_zVel Z

z ekseni etrafındaki açısal hız (radyan/saniye).

Default: 0

Response Body

Başarılı yanıt

status_codeStatus Code

Yanıtın HTTP durum kodu.

Default: 200
successSuccess

İşlemin başarılı olup olmadığını belirtir.

Default: true
messageMessage

İşlem hakkında ek bilgi veren mesaj.

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

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/vel" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "vel_x": 0,
    "vel_z": 0
  }'
const body = JSON.stringify({
  "vel_x": 0,
  "vel_z": 0
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/vel", {
  headers: {
    "x-api-key": "<token>"
  },
  body
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/vel"
  body := strings.NewReader(`{
    "vel_x": 0,
    "vel_z": 0
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("x-api-key", "<token>")
  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 = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/vel"
body = {
  "vel_x": 0,
  "vel_z": 0
}
response = requests.request("POST", url, json = body, headers = {
  "x-api-key": "<token>",
  "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"
    }
  ]
}

Konumlandırma işlemini başlatma

Robot için konumlandırma işlemini başlatır. Bu uç nokta, gönderilen site ve kat bilgisini kullanarak konumlandırmayı başlatır.

POST
/navigation/localization

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Request Body

application/jsonRequired
siteSite

Hedefin bulunduğu site.

Default: ""
floorFloor

Hedefin bulunduğu kat.

Default: ""

Response Body

Başarılı yanıt

status_codeStatus Code

Yanıtın HTTP durum kodu.

Default: 200
successSuccess

İşlemin başarılı olup olmadığını belirtir.

Default: true
messageMessage

İşlem hakkında ek bilgi veren mesaj.

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

Konumlandırma başlatılamadı

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/localization" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "site": "site",
    "floor": "floor"
  }'
const body = JSON.stringify({
  "site": "site",
  "floor": "floor"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/localization", {
  headers: {
    "x-api-key": "<token>"
  },
  body
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/localization"
  body := strings.NewReader(`{
    "site": "site",
    "floor": "floor"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("x-api-key", "<token>")
  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 = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/navigation/localization"
body = {
  "site": "site",
  "floor": "floor"
}
response = requests.request("POST", url, json = body, headers = {
  "x-api-key": "<token>",
  "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"
    }
  ]
}