forked from ros-drivers/nmea_navsat_driver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automated testing (via catkin_virtualenv) (ros-drivers#136)
Automatically test the code on every push or PR by playing back data to the driver and test whether the expected amount of messages is outputted by the driver and the messages contain the expected data. The tester can cover more functionality that the current version of the nmea_navsat_driver supports, for these features new PRs will be created. The full usage can be observed in the boschresearch fork. Signed-off-by: Gabriel Gaessler <[email protected]>
- Loading branch information
Showing
10 changed files
with
631 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: [ubuntu-latest] | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
ros_distro: [noetic] | ||
ubuntu_distro: [focal] | ||
arch: [amd64] | ||
steps: | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: ${{ matrix.ros_distro }} | ||
- name: build and test | ||
uses: ros-tooling/[email protected] | ||
with: | ||
package-name: nmea_navsat_driver | ||
target-ros1-distro: ${{ matrix.ros_distro }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
nmea_navsat_driver testing | ||
========================== | ||
|
||
This folder contains a tester for the nmea_navsat_driver_package as well as configurations and GNSS device logs for playback. | ||
|
||
Configurations | ||
-------------- | ||
|
||
* `config_launch.yaml` defines with launch files should be called, which interface they refer to and which messages are in scope. For `serial` a virtual serial port is created and for `tcp` a TCP-server is created. | ||
* `config_logs.yaml` defines which pre-recorded logs shall be tested in which mode at which speed. And even more important which messages are to be expected from the driver in which quantity and which fields have to stay in which boundaries. These settings determine whether the test will result in pass or fail. Also defines which parameters shall be passed to the launch files. | ||
* `config_tester.yaml` general settings of the tester. | ||
|
||
Running the test | ||
---------------- | ||
|
||
The tester can be automatically executed via Github Actions, running the nosetests defined in the CMakeLists.txt eventually calling the rostest. The workflow configuration is therefore located at `.github/workflows/ci.yaml`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# list of all launch files to be tested | ||
nmea_serial_driver.launch: | ||
# interface, serial or TCP | ||
interface: serial | ||
# messages that are supported by this driver configuration | ||
messages: | ||
- NavSatFix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# list of all raw data logs that shall be tested | ||
nmea.log: | ||
# mode, nmea or binary (u-blox) | ||
mode: nmea | ||
# rate for nmea mode in lines per second | ||
rate: 4 | ||
# additional parameters to pass to the launch file | ||
parameters: [] | ||
topics: | ||
fix: | ||
_message_count: 120 | ||
_type: NavSatFix | ||
latitude: | ||
max: 48.7734 | ||
min: 48.7733 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# speedup in comparison to real time playback | ||
speedup_rate: 20 | ||
# chunksize in bytes to read at once for binary data | ||
binary_read_len: 10 | ||
# tcp host | ||
tcp_host: 127.0.0.1 | ||
# tcp port to start with, will increment from here | ||
tcp_port: 4242 |
Oops, something went wrong.