diff --git a/docs/en/sim_sih/index.md b/docs/en/sim_sih/index.md index 026696fb4e..a5520f73b3 100644 --- a/docs/en/sim_sih/index.md +++ b/docs/en/sim_sih/index.md @@ -93,7 +93,7 @@ In this case you will have to add them to your board configuration and then rebu ### Adding SIH to the Firmware Add the following key to the configuration file for your flight controller to include all the required modules (for an example see [boards/px4/fmu-v6x/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6x/default.px4board)). -Then re-built the firmware and flash it to the board. +Then re-build the firmware and flash it to the board. ```text CONFIG_MODULES_SIMULATION_SIMULATOR_SIH=y diff --git a/docs/en/simulation/hitl.md b/docs/en/simulation/hitl.md index f539982472..7da9cfeeca 100644 --- a/docs/en/simulation/hitl.md +++ b/docs/en/simulation/hitl.md @@ -59,24 +59,33 @@ In summary, HITL runs PX4 on the actual hardware using standard firmware, but SI ## Setting up HITL -## Add HITL to Firmware +## Check if HITL is in Firmware -The modules required for HITL are not built into all PX4 firmware by default, so you may need to add them to the configuration and then rebuild and install the firmware. +The module required for HITL ([`pwm_out_sim`](../modules/modules_driver.md#pwm-out-sim)) is not built into all PX4 firmware by default. -You can check that the modules are present using QGroundControl: +To check if the module is present on your Flight Controller: -1. Open **Analyze Tools > Mavlink Console**. -2. Type `pwm_out_sim status` in the console. -3. If the returned value is `nsh: pwm_out_sim: command not found`, then you don't have the module installed. +1. Open QGroundControl +2. Open **Analyze Tools > Mavlink Console**. +3. Type the following command in the console: -If it is not present you can add it to the configuration file for your target flight controller (such as [boards/px4/fmu-v6x/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6x/default.px4board) FMUv6x based boards). + ```sh + pwm_out_sim status + ``` + +4. If the returned value is `nsh: pwm_out_sim: command not found`, then you don't have the module installed. + +If `pwm_out_sim` is not present you will need to add it to the firmware in order to use HITL simulation. + +### Adding HITL modules to the Firmware + +Add the following key to the configuration file for your flight controller to include the required module (for an example see [boards/px4/fmu-v6x/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6x/default.px4board)). +Then re-build the firmware and flash it to the board. ```text CONFIG_MODULES_SIMULATION_PWM_OUT_SIM=y ``` -Add the keys if necessary then re-built the firmware and flash it to the board. - You can alternatively use the following command to launch a GUI configuration tool, and interactively enable them at the path: **modules > Simulation > pwm_out_sim**. For example, to update fmu-v6x you would use: @@ -88,21 +97,18 @@ make px4_fmu-v6x boardconfig 1. Connect the autopilot directly to _QGroundControl_ via USB. 2. Select Airframe - 1. Open **Setup > Airframes** 2. Select a [compatible airframe](#compatible_airframe) you want to test. Then click **Apply and Restart** on top-right of the _Airframe Setup_ page. 3. Calibrate your RC or Joystick, if needed. 4. Setup UDP - 1. Under the _General_ tab of the settings menu, uncheck all _AutoConnect_ boxes except for **UDP**. ![QGC Auto-connect settings for HITL](../../assets/gcs/qgc_hitl_autoconnect.png) 5. (Optional) Configure Joystick and Failsafe. Set the following [parameters](../advanced_config/parameters.md) in order to use a joystick instead of an RC remote control transmitter: - - [COM_RC_IN_MODE](../advanced_config/parameter_reference.md#COM_RC_IN_MODE) to "Joystick/No RC Checks". This allows joystick input and disables RC input checks. - [NAV_RCL_ACT](../advanced_config/parameter_reference.md#NAV_RCL_ACT) to "Disabled". This ensures that no RC failsafe actions interfere when not running HITL with a radio control.