mirror of
https://codeberg.org/portospaceteam/E-42.git
synced 2024-10-31 22:09:44 +00:00
Finished px4_simulation report
This commit is contained in:
parent
e635aa40a0
commit
1c4e139df6
@ -71,7 +71,7 @@ sudo apt install protobuf-compiler
|
||||
|
||||
I was able to replicate the setup in a second computer and, at the second time, this *protobuf* error didn't occur.
|
||||
|
||||
To sum up the installation steps present at the [guide](https://docs.px4.io/main/en/dev_setup/dev_env_windows_wsl.html):
|
||||
To sum up the installation steps present in the [guide](https://docs.px4.io/main/en/dev_setup/dev_env_windows_wsl.html):
|
||||
|
||||
1. Install WSL2 according to the docs in the specific version (Ubuntu-20.04)
|
||||
2. Install the PX4 toolchain
|
||||
@ -87,32 +87,43 @@ bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
|
||||
HEADLESS=1 make px4_sitl_default jmavsim
|
||||
```
|
||||
|
||||
The `HEADLESS` flag avoids running the jMAVSim GUI, as it does not seem to work with the WSL2. However, I did not consider this to be a problem, as *QGroundControl* will be used during testing as a ground station.
|
||||
The `HEADLESS` flag avoids running the jMAVSim GUI, as it does not seem to work with the WSL2. However, I did not consider this to be a problem, as *QGroundControl* will be used during development as a ground station.
|
||||
|
||||
4. Install *QGroundControl* to visualize the simulation and control the vehicle. You can follow [these instructions](https://docs.px4.io/main/en/dev_setup/dev_env_windows_wsl.html#qgroundcontrol) to install it. It can be installed on Windows or directly on WSL2. Personally, I installed it on Windows as it allows to flash the firmware to the Pixhawk board later on. However, to work on windows, it's necessary to create a **communication link** in the QGroundControl Settings, as explained in the guide.
|
||||
|
||||
---
|
||||
|
||||
## jMAVSim Simulator
|
||||
https://docs.px4.io/main/en/simulation/jmavsim.html#jmavsim-with-sitl
|
||||
jMAVSim is a simple multirotor/Quad simulator that allows you to fly *copter* type vehicles running *PX4* around a simulated world.
|
||||
|
||||
- Talk about jmavSim
|
||||
- Coding Environment (Works on Linux & Windows) but with specific configurations.
|
||||
After running the simulation, through `HEADLESS=1 make px4_sitl_default jmavsim`, you should see the terminal output similar to the one below, mentioning that the vehicle is ready for takeoff.
|
||||
![SITL terminal upon start](assets/Pixhawk/px4_sitl_terminal_start.png)
|
||||
|
||||
Additionally, if you setup the QGroundControl comm link correctly, you should see the vehicle in the simulation environment with the indicator on the top right corner, indicating that the vehicle is ready to be controlled.
|
||||
![QGroundControl connected](assets/Pixhawk/qgroundcontrol_ready.png)
|
||||
|
||||
There you have it. That wraps up the setup of the simulation environment. Now, it is possible to start developing the software for the rocket. To test the PX4 firmware is working, type `help` in the terminal to see the available commands and execute one of them, for example `commander takeoff` to make the vehicle takeoff.
|
||||
|
||||
---
|
||||
|
||||
## Conclusion and Next Steps
|
||||
|
||||
After analyzing this information, *Pixhawk* seems to be a promising board to introduce in our model rocket. However, the current information isn't enough to reach a conclusion. To do so, we must convert this theoretical information into a practical example. Thankfully, the *Software in the Loop* solution mentioned in this report provides a way to simulate the *Pixhawk* and the rocket model. Thus, the next steps involve testing this *PX4* and *Ardupilot* software, to ensure they fit our needs and are capable of adapting to our scenario.
|
||||
This report covered the necessary information to start developing the software for the rocket in a simulation environment. As shown, the initial configuration is far from ideal, but this document should help to avoid most of the problems during the setup.
|
||||
|
||||
As of right now, I only created a simple `hello world` command to test the software. The next steps involve experimenting the PX4 software in more complex scenarios, more fitting to a rocket use case. Furthermore, the vehicle setup requires some fine tuning to enable some sensors, such as the *radio transceiver*.
|
||||
![QGroundControl summary](assets/Pixhawk/qgroundcontrol_summary.png)
|
||||
|
||||
Finally, there's more work to be done in other areas, namely: Choosing the Pixhawk board, the sensors and investigating how to relate the [SAVOIR architecture](https://savoir.estec.esa.int/) with the current software.
|
||||
|
||||
## References
|
||||
|
||||
\[1\] [PX4 Docs](https://docs.px4.io/main/en)
|
||||
|
||||
\[2\] [PX4 User Guide](https://docs.px4.io/main/en/)
|
||||
\[2\] [QGroundControl](http://qgroundcontrol.com/)
|
||||
|
||||
\[3\] [Ardupilot](https://ardupilot.org/)
|
||||
\[3\] [SAVOIR](https://savoir.estec.esa.int/)
|
||||
|
||||
\[4\] [Microsft WSL Installation](https://learn.microsoft.com/en-us/windows/wsl/install)
|
||||
|
||||
<br>
|
||||
<div style="text-align: right">Published by João Mesquita</div>
|
||||
|
BIN
reports/assets/Pixhawk/px4_sitl_terminal_start.png
Normal file
BIN
reports/assets/Pixhawk/px4_sitl_terminal_start.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
BIN
reports/assets/Pixhawk/qgroundcontrol_ready.png
Normal file
BIN
reports/assets/Pixhawk/qgroundcontrol_ready.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 MiB |
BIN
reports/assets/Pixhawk/qgroundcontrol_summary.png
Normal file
BIN
reports/assets/Pixhawk/qgroundcontrol_summary.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
Loading…
Reference in New Issue
Block a user