You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The key feature of this simulation is to run it in such a way that the hardware knows nothing about the simulation. This can be done with Cyphal/DroneCAN. It covers more PX4 modules than standard SITL and HITL.
8
8
9
9
## 1. Design
10
10
11
-
VTOL HITL Dynamics Simulator is designed to be flexible.
It is expected to use either PX4 or ArduPilot autopilots.
23
-
24
-
The simulator is divided into the following main components:
11
+
VTOL HITL Dynamics Simulator is designed to be modular. It is divided into the following main components:
25
12
26
13
1.`UAV dynamics` is the main node that handles actuator commands from the communicator, performs dynamics simulation, and publishes vehicle and sensors states.
27
14
2.`Communicator` is the set of nodes that communicate with the `PX4 flight stack` in HITL (via Cyphal/DroneCAN) and SITL (via MAVLink) modes.
28
-
3.`inno_sim_interface` is a bridge for interaction with `Inno Simulator` through ROS.
15
+
3.`inno_sim_interface` is a bridge for interaction with `3D-Simulator` through ROS.
The instruction below discribes the most common use case: PX4 v1.13 in DroneCAN VTOL and Cyphal Quadcopter modes. If you want to use ArduPilot, another dynamic, airframe or SITL mode, you can still use this instruction, but it is recommended to read additional instructions.
58
-
59
-
The simulator is distributed as a Docker image. If you want to contribute or try it without Docker, you can find more details in [the developer docs](docs/dev_docs.md).
23
+
The simulator is distributed as a Docker image. It is recommended to use the `./scripts/docker.sh` script. It configures all the necessary Docker flags, performs automatic firmware upload,
24
+
configuration, creates a CAN interface, and generally provides a simple interface to interact with
It is recommended to use the `./scripts/docker.sh` script. It configures all the necessary Docker flags, SLCAN and provides a simple interface to interact with the simulator.
76
-
77
-
To get help, just type:
78
-
79
-
```bash
80
-
./scripts/docker.sh --help
81
-
```
82
-
83
41
To build docker image, type:
84
42
85
43
```bash
86
44
./scripts/docker.sh build
87
45
```
88
46
89
-
To pull docker image, type:
90
-
91
-
```bash
92
-
./scripts/docker.sh pull
93
-
```
47
+
> An image on dockerhub usually is not up to date, so it's better to build manually
94
48
95
-
**Step 3. Connect everything together**
49
+
**Step 3. Connect everything together for HITL**
96
50
97
-
> This step is not necessary if you want to run PX4 MAVLink SITL mode. Please follow [docs/px4/mavlink](docs/px4/mavlink.md)instead.
51
+
> You should skip this step if you want to run PX4 MAVLink SITL mode. Please follow [docs/px4/mavlink](docs/px4/mavlink.md)for details.
98
52
99
53
Typically we use [CUAV v5+](https://docs.px4.io/master/en/flight_controller/cuav_v5_plus.html) and [RL-programmer-sniffer](https://docs.raccoonlab.co/guide/programmer_sniffer/), but it might be anything else.
100
54
101
55
An example of a connection is shown in the picture below.
If you have a choice, it is sometimes preferable to use CAN1 on the autopilot side.
59
+
All default parameters expect that you use CAN1 on the autopilot side.
106
60
107
-
**Step 4. Upload firmware**
61
+
**Step 4. Run the container in force mode**
108
62
109
-
HITL simulator may require some additional features that the official PX4 and ArduPilot doesn't have.
63
+
In `--force` mode the script automatically upload the required firmware and parameters corresponded
64
+
to the specified mode, create SLCAN and run the container with required docker flags.
110
65
111
-
The appropriated and ready to use binaries are uploaded here: [PX4](https://github.com/ZilantRobotics/PX4-Autopilot/releases) and [ArduPilot](https://github.com/ZilantRobotics/ardupilot/releases). Alternativelly, you can build the firmware manually.
66
+
To run force mode you need to install [autopilot-tools](https://pypi.org/project/autopilot-tools/) python package: `pip install autopilot-tools`.
112
67
113
-
For PX4 DroneCAN you can upload the firmware by typing the following 2 lines:
You need to run the [scripts/parameters_configurator.py](scripts/parameters_configurator.py). It will automatically will reset your parameters to default, and then configure exactly the parameters your autopilot needs for the HITL simulation. It will automatically restart the autopilot a few times.
0 commit comments