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.
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
siteRequiredSiteYolun bulunduğu site.
floorRequiredFloorYolun bulunduğu kat.
pointsPointsYolu 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.
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
siteRequiredSiteYolun bulunduğu site.
floorRequiredFloorYolun bulunduğu kat.
pointsPointsYolu 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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Query Parameters
target_uidRequiredTarget UidResponse Body
Başarılı yanıt
siteRequiredSiteYolun bulunduğu site.
floorRequiredFloorYolun bulunduğu kat.
pointsPointsYolu tanımlayan noktaların listesi.
Navigasyon yolu bulunamadı
Doğrulama hatası
detailDetailNavigasyon 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.
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
positionPositionRobotun ortamdaki güncel konumu.
twistTwistModelRobotun 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.
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
positionPositionRobotun ortamdaki güncel konumu.
twistTwistModelRobotun 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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredxXMetre cinsinden X koordinatı.
0yYMetre cinsinden Y koordinatı.
0thetaThetaRadyan cinsinden yönelim.
0Response Body
Başarılı yanıt
status_codeStatus CodeYanıtın HTTP durum kodu.
200successSuccessİşlemin başarılı olup olmadığını belirtir.
truemessageMessageİşlem hakkında ek bilgi veren mesaj.
""dataobject | null | nullerrorobject | null | nullDoğrulama hatası
detailDetailcurl -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"
}
]
}Navigasyon hedefini kayıtlı bir hedef olarak belirleme
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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredtarget_uidTarget UidGidilecek hedefin benzersiz tanımlayıcısı.
""Response Body
Başarılı yanıt
status_codeStatus CodeYanıtın HTTP durum kodu.
200successSuccessİşlemin başarılı olup olmadığını belirtir.
truemessageMessageİşlem hakkında ek bilgi veren mesaj.
""dataobject | null | nullerrorobject | null | nullHedef UID'si zorunludur
Doğrulama hatası
detailDetailcurl -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.
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
stopStopRobotun durması gerekip gerekmediğini belirtir.
falsecurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredstopStopRobotun durması gerekip gerekmediğini belirtir.
falseResponse Body
Başarılı yanıt
status_codeStatus CodeYanıtın HTTP durum kodu.
200successSuccessİşlemin başarılı olup olmadığını belirtir.
truemessageMessageİşlem hakkında ek bilgi veren mesaj.
""dataobject | null | nullerrorobject | null | nullDoğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredvel_xVel Xx yönündeki doğrusal hız (metre/saniye).
0vel_zVel Zz ekseni etrafındaki açısal hız (radyan/saniye).
0Response Body
Başarılı yanıt
status_codeStatus CodeYanıtın HTTP durum kodu.
200successSuccessİşlemin başarılı olup olmadığını belirtir.
truemessageMessageİşlem hakkında ek bilgi veren mesaj.
""dataobject | null | nullerrorobject | null | nullDoğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredvel_xVel Xx yönündeki doğrusal hız (metre/saniye).
0vel_zVel Zz ekseni etrafındaki açısal hız (radyan/saniye).
0Response Body
Başarılı yanıt
status_codeStatus CodeYanıtın HTTP durum kodu.
200successSuccessİşlemin başarılı olup olmadığını belirtir.
truemessageMessageİşlem hakkında ek bilgi veren mesaj.
""dataobject | null | nullerrorobject | null | nullDoğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredsiteSiteHedefin bulunduğu site.
""floorFloorHedefin bulunduğu kat.
""Response Body
Başarılı yanıt
status_codeStatus CodeYanıtın HTTP durum kodu.
200successSuccessİşlemin başarılı olup olmadığını belirtir.
truemessageMessageİşlem hakkında ek bilgi veren mesaj.
""dataobject | null | nullerrorobject | null | nullKonumlandırma başlatılamadı
Doğrulama hatası
detailDetailcurl -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"
}
]
}