Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit baa99cf

Browse files
committed
Book - Running a simulation:
- add QGroundControl setup - gzclient connection to docker - mention why `protoc` installation is required
1 parent f9efce7 commit baa99cf

4 files changed

Lines changed: 40 additions & 10 deletions

File tree

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,6 @@ Gazebo doesn't yet have built-in support for ArduPilot and it requires a plugin
9595

9696
- https://ardupilot.org/dev/docs/using-gazebo-simulator-with-sitl.html
9797

98-
Connecting to remote gazebo server:
99-
100-
https://answers.gazebosim.org/question/7117/running-gzserver-on-ec2-and-gzclient-locally-is-not-working/?answer=7172#post-id-7172
101-
102-
```sh
103-
GAZEBO_IP=172.23.3.104 GAZEBO_MASTER_URI=172.23.1.170:12345 gzclient
104-
```
10598
#### MAVLink
10699

107100
- MAVLink basics: https://ardupilot.org/dev/docs/mavlink-basics.html#mavlink-basics

drone-book/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# The Rust book for Drones
22
## by the AeroRust community
33

4-
TODO: who this book is intended for? What will people find in this book? What will they learn?
4+
5+
6+
## TODO:
7+
1. Who this book is intended for?
8+
2. What will people find in this book
9+
3. What will they learn?
85.4 KB
Loading

drone-book/running_a_simulation.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Operating system: Linux / MacOS(?)
1313
- Rust for `cargo run` (Install the [Rust][install-rust] programming language)
1414
- Git
1515
- `ssh` key set on your GitHub profile, see [Connecting to GitHub with SSH][github-ssh]
16-
- QGroundControl (optional)
16+
- [QGroundControl (optional)](#qgroundcontrol-docker)
17+
- `protoc` for running the `mav-sdk` build script when using the examples, see [Protocol Compiler Installation][install-protoc]. Since `prost` version `0.11`, `protoc` is no longer automatically installed on the host machine.
1718

1819
1. `git clone [email protected]:AeroRust/mav.git && cd mav`
1920

@@ -39,8 +40,39 @@ For the time being, however, all you need to know is that this is how we simulat
3940
cargo run -p mav-sdk --example takeoff
4041
```
4142

43+
### QGroundControl Docker
44+
45+
> QGroundControl provides full flight control and mission planning for any MAVLink enabled drone. Its primary goal is ease of use for professional users and developers. All the code is open-source source, so you can contribute and evolve it as you want.
46+
- _[qgroundcontrol.com][qgroundcontrol]_
47+
48+
In order to connect to the PX4 running inside Docker, use this setup:
49+
50+
![The setup required to connect QGroundControl to the MAVLink running in Docker](images/QGroundControl_Docker.png)
51+
52+
### Connecting Gazebo GUI (client) to Gazebo server (in Docker)
53+
54+
The `Gazebo` simulation tool usually runs a server and a GUI on the host machine,
55+
however, our setup is running in `Docker` with mode `headless` for `Gazebo`,
56+
so we only have the server running in `Docker`.
57+
58+
**IMPORTANT:** You must have installed the exact same `Gazebo` version locally as the one found in the Docker setup, otherwise you won't be able to connect
59+
60+
On Linux:
61+
62+
```bash
63+
source /usr/share/gazebo-11/setup.sh && \
64+
gzclient --verbose
65+
```
66+
67+
`/usr/share/gazebo-11/setup.sh` contains a few default environment variables that you don't need to pass, otherwise use:
68+
69+
```
70+
GAZEBO_MASTER_URI=127.0.0.1:11345 gzclient --verbose
71+
```
4272

4373
[install-rust]: https://rustup.rs/
74+
[install-protoc]: https://github.com/protocolbuffers/protobuf#protocol-compiler-installation
4475
[install-docker]: https://docs.docker.com/engine/install/
4576
[install-docker-compose]: https://docs.docker.com/compose/install/
46-
[github-ssh]: https://docs.github.com/en/authentication/connecting-to-github-with-ssh
77+
[github-ssh]: https://docs.github.com/en/authentication/connecting-to-github-with-ssh
78+
[qgroundcontrol]: http://qgroundcontrol.com

0 commit comments

Comments
 (0)