Robot Documentations
Autonomy API
Start and stop the robot's autonomous state machine for autonomous operation.
Start the autonomy
Start the robot's autonomous state machine. This reinitializes the state machine and enables autonomous operation.
Response Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
Default:
200successSuccessIndicates whether the operation was successful.
Default:
truemessageMessageA message providing additional information about the operation.
Default:
""dataobject | null | nullerrorobject | null | nullcurl -X POST "http://localhost:7242/api/v1/autonomy/start"fetch("http://localhost:7242/api/v1/autonomy/start")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/autonomy/start"
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/autonomy/start"
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"
}
}Stop the autonomy
Stop the robot's autonomous state machine. This stops the state machine and disables autonomous operation.
Response Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
Default:
200successSuccessIndicates whether the operation was successful.
Default:
truemessageMessageA message providing additional information about the operation.
Default:
""dataobject | null | nullerrorobject | null | nullcurl -X POST "http://localhost:7242/api/v1/autonomy/stop"fetch("http://localhost:7242/api/v1/autonomy/stop")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/autonomy/stop"
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/autonomy/stop"
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"
}
}