Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add offboard control docs #53

Merged
merged 4 commits into from Oct 31, 2017

Conversation

Projects
None yet
2 participants
@hamishwillee
Copy link
Collaborator

commented Oct 27, 2017

This adds example and guide docs for offboard mode. It is based on the updated example and behaviour documented in Dronecode/DronecodeSDK#134

@julianoes The example page needs a bit more work (I'll update when you submit the PR), but would be good to get your comment on the guide document.

@hamishwillee hamishwillee requested a review from julianoes Oct 27, 2017

@julianoes
Copy link
Contributor

left a comment

Awesome, thanks for that!

## Velocity Setpoints

The API provides methods to set velocity and yaw components using the NED frame (`set_velocity_ned()`) and the body frame (`set_velocity_body()`).
The difference is that NED is relative to an absolute co-ordinate system (North, East, Down) while Body frame is relative to the vehicle orientation (front, right, down).

This comment has been minimized.

Copy link
@julianoes

julianoes Oct 27, 2017

Contributor

Body -> body I'd say.

```
* Head North-West with 5 m/s on each velocity component (notice that a negative value is required on the `east_m_s` value to move West).
```cpp
device.offboard().set_velocity_ned({5.0f, -5.0f, 0.0f, 0.0f});

This comment has been minimized.

Copy link
@julianoes

julianoes Oct 27, 2017

Contributor

Yep, that's good examples.

device.offboard().set_velocity_ned({0.0f, 0.0f, 0.0f, 0.0f});
```

It is not possible to control the rate or direction that the vehicle will use to turn towards the setpoint direction (it will turn in whatever direction reaches the setpoint fastest).

This comment has been minimized.

Copy link
@julianoes

julianoes Oct 27, 2017

Contributor

Correct.

@hamishwillee

This comment has been minimized.

Copy link
Collaborator Author

commented Oct 29, 2017

@julianoes Thanks for the review. I made some minor fixes (e.g. to "Body") - no need to re-review. I'll update the example and merge once you merge Dronecode/DronecodeSDK#134

@hamishwillee hamishwillee merged commit f5cc328 into dronecore:develop Oct 31, 2017

@hamishwillee hamishwillee deleted the hamishwillee:offboard_control branch Oct 31, 2017

@@ -20,10 +20,19 @@ DroneCore APIs do not raise exceptions! Instead, methods that can fail return su
The various classes also all provide methods getting human readable strings from their associated enum (e.g. [DroneCore::connection_result_str()](../api_reference/classdronecore_1_1_drone_core.md#classdronecore_1_1_drone_core_1a84c40dcefcafe888c38a5ed8dd93b0af), [Telemetry::result_str()](../api_reference/classdronecore_1_1_telemetry.md#classdronecore_1_1_telemetry_1a05c6355b7f8743250b2a7a611ea5fb4a)). You can see how these are used in the example code.


This comment has been minimized.

Copy link
@hamishwillee

hamishwillee Oct 31, 2017

Author Collaborator

@julianoes FYI, I added this "general" note that vehicles potentially having multiple command sources. Of course monitoring flight modes alone isn't a complete solution, but "better than nothing".

real-world use case you might use telemetry or sensors to control when the setpoint is changed.


## Monitoring Offboard Mode

This comment has been minimized.

Copy link
@hamishwillee

hamishwillee Oct 31, 2017

Author Collaborator

@julianoes FYI, I added this "specific" note that vehicles potentially having multiple command sources in offboard mode. This is merged now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.