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

ROS integration test updates #2970

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions en/ros2/px4_ros2_interface_lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ The following steps are required to get started:
The following sections describe specific functionality provided by this library.
In addition, any other PX4 topic can be subscribed or published.

Detailed API usage can be found here: https://auterion.github.io/px4-ros2-interface-lib/modules.html
hamishwillee marked this conversation as resolved.
Show resolved Hide resolved

### Mode Class Definition

This section steps through an example of how to create a class for a custom mode.
Expand Down
5 changes: 2 additions & 3 deletions en/simulation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,8 @@ make px4_sitl none_iris

The simulation can be further configured via environment variables:

- `PX4_ESTIMATOR`: This variable configures which estimator to use.
Possible options are: `ekf2` (default), `lpe` (deprecated).
It can be set via `export PX4_ESTIMATOR=lpe` before running the simulation.
- Any of the [PX4 parameters](../advanced_config/parameter_reference.md) can be overridden via `export PX4_PARAM_{name}={value}`.
hamishwillee marked this conversation as resolved.
Show resolved Hide resolved
For example changing the estimator: `export PX4_PARAM_SYS_MC_EST_GROUP=3`.

The syntax described here is simplified, and there are many other options that you can configure via _make_ - for example, to set that you wish to connect to an IDE or debugger.
For more information see: [Building the Code > PX4 Make Build Targets](../dev_setup/building_px4.md#px4-make-build-targets).
Expand Down
7 changes: 6 additions & 1 deletion en/test_and_ci/integration_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ This topic explains how to run (and extend) PX4's ROS-based integration tests.
[MAVSDK Integration Testing](../test_and_ci/integration_testing_mavsdk.md) is preferred when writing new tests.
Use the ROS-based integration test framework for use cases that _require_ ROS (e.g. object avoidance).

All PX4 integraton tests are executed automatically by our [Continuous Integration](../test_and_ci/continous_integration.md) system.
All PX4 integration tests are executed automatically by our [Continuous Integration](../test_and_ci/continous_integration.md) system.
:::

:::note
This page is about MAVROS integration tests.
hamishwillee marked this conversation as resolved.
Show resolved Hide resolved
If you are looking for PX4 ROS 2 Interface Library integration tests, see [here](../ros2/px4_ros2_interface_lib.md#ci-integration-tests).
hamishwillee marked this conversation as resolved.
Show resolved Hide resolved
:::

## Prerequisites:
Expand Down
17 changes: 10 additions & 7 deletions en/test_and_ci/integration_testing_mavsdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,20 @@ To run all SITL tests as defined in [sitl.json](https://github.com/PX4/PX4-Autop
test/mavsdk_tests/mavsdk_test_runner.py test/mavsdk_tests/configs/sitl.json --speed-factor 10
```

This will list all of the tests and then run them sequentially.
This will list all the tests and then run them sequentially.

To see all possible command line arguments use the `-h` argument:

```sh
test/mavsdk_tests/mavsdk_test_runner.py -h

usage: mavsdk_test_runner.py [-h] [--log-dir LOG_DIR] [--speed-factor SPEED_FACTOR] [--iterations ITERATIONS] [--abort-early] [--gui] [--model MODEL]
[--case CASE] [--debugger DEBUGGER] [--verbose]
usage: mavsdk_test_runner.py [-h] [--log-dir LOG_DIR] [--speed-factor SPEED_FACTOR] [--iterations ITERATIONS] [--abort-early]
[--gui] [--model MODEL] [--case CASE] [--debugger DEBUGGER] [--upload] [--force-color]
[--verbose] [--build-dir BUILD_DIR]
config_file

positional arguments:
config_file JSON config file to use

optional arguments:
options:
-h, --help show this help message and exit
--log-dir LOG_DIR Directory for log files
--speed-factor SPEED_FACTOR
Expand All @@ -71,9 +70,13 @@ optional arguments:
--abort-early abort on first unsuccessful test
--gui display the visualization for a simulation
--model MODEL only run tests for one model
--case CASE only run tests for one case
--case CASE only run tests for one case (or multiple cases with wildcard '*')
--debugger DEBUGGER choice from valgrind, callgrind, gdb, lldb
--upload Upload logs to logs.px4.io
--force-color Force colorized output
--verbose enable more verbose output
--build-dir BUILD_DIR
relative path where the built files are stored
```

## Run a Single Test
Expand Down