Test simulation run with example pyflix script

This commit is contained in:
Oleg Kalachev
2026-08-28 16:41:01 +03:00
parent 11c5dc5676
commit 42b1685546
3 changed files with 6 additions and 4 deletions
+4 -4
View File
@@ -82,15 +82,15 @@ jobs:
run: sudo apt-get install -y libsdl2-dev run: sudo apt-get install -y libsdl2-dev
- name: Build simulator - name: Build simulator
run: make build_simulator run: make build_simulator
- name: Install pyflix requirements
run: sudo apt install -y python3-pip && pip3 install -r tools/requirements.txt
- name: Run simulator - name: Run simulator
env: env:
GAZEBO_MODEL_PATH: ${{ github.workspace }}/gazebo/models GAZEBO_MODEL_PATH: ${{ github.workspace }}/gazebo/models
GAZEBO_PLUGIN_PATH: ${{ github.workspace }}/gazebo/build GAZEBO_PLUGIN_PATH: ${{ github.workspace }}/gazebo/build
run: | run: |
OUT=$(timeout -k 10s 120s gzserver --verbose gazebo/flix.world 2>&1 | tee /dev/stderr) gzserver --verbose gazebo/flix.world &
if echo "$OUT" | grep -Pq "\[Err\](?! \[RenderEngine)"; then timeout -k 10s 120s tools/example.py
exit 1
fi
- uses: actions/upload-artifact@v7 - uses: actions/upload-artifact@v7
with: with:
name: gazebo-plugin-binary name: gazebo-plugin-binary
+1
View File
@@ -138,6 +138,7 @@ public:
int available() { int available() {
// to implement for Windows, see https://stackoverflow.com/a/71992965/6850197 // to implement for Windows, see https://stackoverflow.com/a/71992965/6850197
if (!isatty(STDIN_FILENO)) return 0;
struct pollfd pfd = { .fd = STDIN_FILENO, .events = POLLIN }; struct pollfd pfd = { .fd = STDIN_FILENO, .events = POLLIN };
return poll(&pfd, 1, 0) > 0; return poll(&pfd, 1, 0) > 0;
} }
+1
View File
@@ -1,3 +1,4 @@
pymavlink
docopt docopt
matplotlib matplotlib
mcap mcap