Robot Dokümantasyonu

Robot Durumu API

Robotun güncel durumu, donanım bileşenleri ve sistem bilgileri hakkında bilgi alın.

Robotun güncel durumunu alma

Robotun şarj durumu, batarya yüzdesi, acil stop durumu, mevcut durumu ve hizmet dışı durumu dahil güncel durumunu döndürür.

GET
/status

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

is_chargingIs Charging

Robotun şu anda şarj olup olmadığını belirtir.

Default: false
battery_percentBattery Percent

Robotun batarya yüzdesi.

Default: 100
is_estopIs Estop

Robotun acil stop durumunda olup olmadığını belirtir.

Default: false
navigation_blockedNavigation Blocked

Robotun navigasyonunun şu anda engellenip engellenmediğini belirtir.

Default: false
stationary_awhileStationary Awhile

Robotun bir süredir hareketsiz olup olmadığını belirtir.

Default: false
soft_estopSoft Estop

Robotun yazılımsal acil stop durumunda olup olmadığını belirtir.

Default: false
is_obstacle_to_robotIs Obstacle To Robot

Robota yakın bir engel olup olmadığını belirtir.

Default: false
stateState

Robotun mevcut durumunu gösteren sayısal kod.

Default: 0
state_labelState Label

Robotun mevcut durumu.

Default: ""
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status", {
  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/status"

  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/status"

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

print(response.text)
{
  "is_charging": false,
  "battery_percent": 100,
  "is_estop": false,
  "navigation_blocked": false,
  "stationary_awhile": false,
  "soft_estop": false,
  "is_obstacle_to_robot": false,
  "state": 0,
  "state_label": "READY_FOR_MISSION"
}

Robotun donanım durumunu alma

Lidarlar, kameralar ve internet bağlantısı dahil robotun donanım bileşenlerinin durumunu döndürür.

GET
/status/hardware

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

lidarsLidars

Lidar sensörlerinin ve durumlarının listesi.

camerasCameras

Kamera sensörlerinin ve durumlarının listesi.

internet_statusInternetStatus

Robotun internet bağlantı durumu.

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/hardware" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/hardware", {
  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/status/hardware"

  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/status/hardware"

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

print(response.text)
{
  "lidars": [
    {
      "name": "main_lidar",
      "is_working": true,
      "state": "WORKING",
      "error": "No error"
    }
  ],
  "cameras": [
    {
      "name": "front_camera",
      "is_working": true,
      "state": "WORKING",
      "error": "No error"
    }
  ],
  "internet_status": {
    "state": "DISCONNECTED",
    "error": "No error",
    "wifi_enabled": false,
    "wifi_connected": false,
    "wifi_ssid": "MyRobotWiFi",
    "wifi_ip_addr": "",
    "wifi_mac_addr": "00:11:22:33:44:55",
    "mobile_enabled": false,
    "mobile_connected": false
  }
}

Robot bilgilerini alma

Robot ID'si, adı, modeli, yazılım sürümü, donanım sürümü, site, kat ve mevcut görev ayrıntıları dahil robotun bilgilerini döndürür.

GET
/status/info

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

robot_uidRobot Uid

Robotun benzersiz tanımlayıcısı.

Default: ""
project_idProject Id

Robotun proje ID'si.

Default: ""
site_floorSiteFloorModel

Robotun site ve katı.

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/info" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/info", {
  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/status/info"

  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/status/info"

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

print(response.text)
{
  "robot_uid": "robot-1",
  "project_id": "project-1",
  "site_floor": {
    "site": "site",
    "floor": "floor"
  }
}

Robotun güncel durumunu akış olarak alma

Robotun şarj durumu, batarya yüzdesi, acil stop durumu, mevcut durumu ve hizmet dışı durumu dahil güncel durumunu gerçek zamanlı akış olarak gönderir.

GET
/status/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

is_chargingIs Charging

Robotun şu anda şarj olup olmadığını belirtir.

Default: false
battery_percentBattery Percent

Robotun batarya yüzdesi.

Default: 100
is_estopIs Estop

Robotun acil stop durumunda olup olmadığını belirtir.

Default: false
navigation_blockedNavigation Blocked

Robotun navigasyonunun şu anda engellenip engellenmediğini belirtir.

Default: false
stationary_awhileStationary Awhile

Robotun bir süredir hareketsiz olup olmadığını belirtir.

Default: false
soft_estopSoft Estop

Robotun yazılımsal acil stop durumunda olup olmadığını belirtir.

Default: false
is_obstacle_to_robotIs Obstacle To Robot

Robota yakın bir engel olup olmadığını belirtir.

Default: false
stateState

Robotun mevcut durumunu gösteren sayısal kod.

Default: 0
state_labelState Label

Robotun mevcut durumu.

Default: ""

Robot durumu akış olarak gönderilemedi

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/stream" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/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/status/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/status/stream"

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

print(response.text)
{
  "is_charging": false,
  "battery_percent": 100,
  "is_estop": false,
  "navigation_blocked": false,
  "stationary_awhile": false,
  "soft_estop": false,
  "is_obstacle_to_robot": false,
  "state": 0,
  "state_label": "READY_FOR_MISSION"
}
{
  "status_code": 500,
  "success": false,
  "message": "Failed to stream robot status",
  "error": {
    "code": "ROBOT_STATUS_STREAM_ERROR",
    "message": "Failed to stream robot status"
  }
}

Robotun yazılım sürümlerini alma

Robotun ros, dep ve scu yazılım sürümlerini döndürür.

GET
/status/version

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

ros_versionRos Version

Robot ana paketinin sürümü.

Default: ""
dep_versionDep Version

Robot ana paketinin bağımlılıklarının sürümleri.

Default: ""
scu_versionScu Version

SCU yazılımının (firmware) sürümü.

Default: ""
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/version" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/version", {
  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/status/version"

  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/status/version"

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

print(response.text)
{
  "ros_version": "1.0.0",
  "dep_version": "1.0.0",
  "scu_version": "1.0.0"
}

Robotun aktif alarmlarını alma

Robottaki aktif alarmların listesini alarm kodu, mesajı ve önem derecesiyle birlikte döndürür.

GET
/status/alarms

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

warningsWarnings

Robottaki aktif uyarıların listesi.

errorsErrors

Robottaki aktif hataların listesi.

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/alarms" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/alarms", {
  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/status/alarms"

  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/status/alarms"

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

print(response.text)
{
  "warnings": [
    "509"
  ],
  "errors": [
    "510"
  ]
}

Robotun aktif alarmlarını akış olarak alma

Robottaki aktif alarmların listesini alarm kodu, mesajı ve önem derecesiyle birlikte gerçek zamanlı akış olarak gönderir.

GET
/status/alarms/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

warningsWarnings

Robottaki aktif uyarıların listesi.

errorsErrors

Robottaki aktif hataların listesi.

Robot alarmları akış olarak gönderilemedi

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/alarms/stream" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/alarms/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/status/alarms/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/status/alarms/stream"

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

print(response.text)
{
  "warnings": [
    "509"
  ],
  "errors": [
    "510"
  ]
}
{
  "status_code": 500,
  "success": false,
  "message": "Failed to stream robot alarms",
  "error": {
    "code": "ROBOT_ALARMS_STREAM_ERROR",
    "message": "Failed to stream robot alarms"
  }
}

Ekran arayüzü yapılandırmasını alma

Robotun güncel ekran arayüzü yapılandırmasını JSON nesnesi olarak döndürür.

GET
/status/screen-config

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

[key: string]any
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/screen-config" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/screen-config", {
  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/status/screen-config"

  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/status/screen-config"

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

print(response.text)
{}

Ekran arayüzü yapılandırmasını akış olarak alma

Robotun ekran arayüzü yapılandırmasını SSE olayları olarak gerçek zamanlı akışla gönderir.

GET
/status/screen-config/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

responseRequiredunknown

Ekran yapılandırması akış olarak gönderilemedi

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/screen-config/stream" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/status/screen-config/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/status/screen-config/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/status/screen-config/stream"

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

print(response.text)
null
{
  "status_code": 500,
  "success": false,
  "message": "Failed to stream screen config",
  "error": {
    "code": "SCREEN_CONFIG_STREAM_ERROR",
    "message": "Failed to stream screen config"
  }
}