Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions source/includes/namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ Response:
}
```

```python--flyt_python
# Namespace request is not required for any Python API
```


> Example

Expand Down Expand Up @@ -155,6 +159,9 @@ namespace.callService(request, function(result) {
});
```

```python--flyt_python
# Namespace request is not required for any Python API
```

> Example response

Expand Down Expand Up @@ -203,6 +210,10 @@ message: FlytOS namespace is flytpod
}
```

```python--flyt_python
# Namespace request is not required for any Python API
```

### Description:

This API returns the global namespace under which FlytOS's instance is running. For users using RESTful, Websocket or ROS APIs, calling this API is a **MUST**, as the value of this namespace is required to call other APIs.
Expand Down
11 changes: 11 additions & 0 deletions source/includes/navigation/access_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ Response:

```

```python--flyt_python
# Access Request is not required for any Python API
```

> Example

Expand Down Expand Up @@ -196,6 +199,10 @@ access_request.callService(request, function(result) {
});
```

```python--flyt_python
# Access Request is not required for any Python API
```

> Example response

```shell
Expand Down Expand Up @@ -232,6 +239,10 @@ Success: True

```

```python--flyt_python
# Access Request is not required for any Python API
```

###Description:

This API enables API control over drone. Sending vehicle to GUIDED/OFFBOARD mode via RC automatically enables API control, and likewise sending vehicle to RC modes such as MANUAL/STABILIZE/ALTCTL/ALT_HOLD/POSCTL/POSHOLD/LOITER disables API control.
Expand Down
34 changes: 34 additions & 0 deletions source/includes/navigation/arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@ Response:

```

```python--flyt_python

# Python API described below can be used in onboard scripts only. For remote scripts you can use http client libraries to call FlytOS REST endpoints from Python.

Class: flyt_python.flyt_python.DroneApiConnector

Function: arm()


```


> Example

```shell
Expand All @@ -118,6 +130,8 @@ drone = api.navigation()
time.sleep(3.0)

drone.arm()


```

```cpp--ros
Expand Down Expand Up @@ -179,6 +193,19 @@ arm.callService(request, function(result) {
});
```

```python--flyt_python
from flyt_python.flyt_python import DroneApiConnector
token = '' # Personal Access Token
vehicle_id = '' # Vehicle ID

#create an instance of class DroneApiConnector
drone = DroneApiConnector(token,vehicle_id,ip_address='localhost' wait_for_drone_response =True)
drone.connect()

drone.arm()
drone.disconnect()
```


> Example response

Expand Down Expand Up @@ -214,6 +241,13 @@ Success: True
success:True
}

```
```python--flyt_python
{
success: True,
message: message

}
```

###Description:
Expand Down
28 changes: 28 additions & 0 deletions source/includes/navigation/clear_waypoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ Response:

```

```python--flyt_python

# Python API described below can be used in onboard scripts only. For remote scripts you can use http client libraries to call FlytOS REST endpoints from Python.

Class: flyt_python.flyt_python.DroneApiConnector

Function: clear_waypoints()

```

> Example

```shell
Expand Down Expand Up @@ -154,7 +164,19 @@ waypointClear.callService(request, function(result) {
+ result.message);
});
```
```python--flyt_python
from flyt_python.flyt_python import DroneApiConnector
token = '' # Personal Access Token
vehicle_id = '' # Vehicle ID

#create an instance of class DroneApiConnector
drone = DroneApiConnector(token,vehicle_id,ip_address='localhost' wait_for_drone_response =True)
drone.connect()

drone.clear_waypoints()

drone.disconnect()
```
> Example response

```shell
Expand Down Expand Up @@ -191,6 +213,12 @@ success (bool): true if action successful
success:True
}

```
```python--flyt_python
{
success: True,
message: message
}
```

###Description:
Expand Down
28 changes: 28 additions & 0 deletions source/includes/navigation/disarm.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,20 @@ Response:
success: Boolean,
message: String
}
```
```python--flyt_python

# Python API described below can be used in onboard scripts only. For remote scripts you can use http client libraries to call FlytOS REST endpoints from Python.

Class: flyt_python.flyt_python.DroneApiConnector

Function: disarm()

```




> Example

```shell
Expand Down Expand Up @@ -180,7 +189,19 @@ disarm.callService(request, function(result) {
+ result.message);
});
```
```python--flyt_python
from flyt_python.flyt_python import DroneApiConnector
token = '' # Personal Access Token
vehicle_id = '' # Vehicle ID

#create an instance of class DroneApiConnector
drone = DroneApiConnector(token,vehicle_id,ip_address='localhost' wait_for_drone_response =True)
drone.connect()

drone.disarm()

drone.disconnect()
```

> Example response

Expand Down Expand Up @@ -218,6 +239,13 @@ Success: True

```

```python--flyt_python
{
success: True,
message: message
}
```

###Description:

This API disarms the motors. Read API description below before you use it.
Expand Down
31 changes: 31 additions & 0 deletions source/includes/navigation/execute_script.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ Response:
message: String
}

```


```python--flyt_python

# Python API described below can be used in onboard scripts only. For remote scripts you can use http client libraries to call FlytOS REST endpoints from Python.

Class: flyt_python.flyt_python.DroneApiConnector

Function: execute_script(appname, arguments)

```

Expand Down Expand Up @@ -192,6 +202,20 @@ execScript.callService(request, function(result) {
+ result.message);
});
```
```python--flyt_python
from flyt_python.flyt_python import DroneApiConnector
token = '' # Personal Access Token
vehicle_id = '' # Vehicle ID

#create an instance of class DroneApiConnector
drone = DroneApiConnector(token,vehicle_id,ip_address='localhost' wait_for_drone_response =True)
drone.connect()

# execute onboard script with name in app_name and arguments to be passed with it as arguments
drone.execute_script(appname, arguments)

drone.disconnect()
```

> Example response

Expand Down Expand Up @@ -229,6 +253,13 @@ Success: True
success:True
}

```
```python--flyt_python
{
success: True,
message: message

}
```

### Description:
Expand Down
31 changes: 31 additions & 0 deletions source/includes/navigation/execute_waypoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ Response:
message: String, }


```

```python--flyt_python

# Python API described below can be used in onboard scripts only. For remote scripts you can use http client libraries to call FlytOS REST endpoints from Python.

Class: flyt_python.flyt_python.DroneApiConnector

Function: execute_waypoints()

```

> Example
Expand Down Expand Up @@ -155,6 +165,20 @@ waypointExecute.callService(request, function(result) {
});
```

```python--flyt_python
from flyt_python.flyt_python import DroneApiConnector
token = '' # Personal Access Token
vehicle_id = '' # Vehicle ID

#create an instance of class DroneApiConnector
drone = DroneApiConnector(token,vehicle_id,ip_address='localhost' wait_for_drone_response =True)
drone.connect()

drone.execute_waypoints()

drone.disconnect()
```

> Example response

```shell
Expand Down Expand Up @@ -190,6 +214,13 @@ success (bool): true if action successful
success:True
}

```
```python--flyt_python
{
success: True,
message: message

}
```

### Description:
Expand Down
39 changes: 39 additions & 0 deletions source/includes/navigation/get_waypoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,15 @@ Response:
}

```
```python--flyt_python

# Python API described below can be used in onboard scripts only. For remote scripts you can use http client libraries to call FlytOS REST endpoints from Python.

Class: flyt_python.flyt_python.DroneApiConnector

Function: get_waypoints()

```
> Example

```shell
Expand Down Expand Up @@ -196,6 +204,18 @@ waypointGet.callService(request, function(result) {
+ result.message);
});
```
```python--flyt_python
from flyt_python.flyt_python import DroneApiConnector
token = '' # Personal Access Token
vehicle_id = '' # Vehicle ID

#create an instance of class DroneApiConnector
drone = DroneApiConnector(token,vehicle_id,ip_address='localhost' wait_for_drone_response =True)
drone.connect()

drone.get_waypoints()
drone.disconnect()
```

> Example response

Expand Down Expand Up @@ -277,6 +297,25 @@ waypoints (list): consists a list of dictionary, the dictionary consists of (fra

```

```python--flyt_python
{
success: True,
message: message,
waypoints: [{
frame: 3,
command:Int 16,
is_current: true,
autocontinue: true,
param1: 6.0,
param2: 7.0,
param3: 0.0,
param4: 0.0,
x_lat: 65.425532,
y_long: 18.542422,
z_alt: 25},{}]
}
```

###Description:

This API returns list of current waypoints on autopilot.
Expand Down
Loading