mirror of
https://github.com/okalachev/flix.git
synced 2026-09-06 00:10:58 +00:00
Test simulation run with example pyflix script
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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,3 +1,4 @@
|
|||||||
|
pymavlink
|
||||||
docopt
|
docopt
|
||||||
matplotlib
|
matplotlib
|
||||||
mcap
|
mcap
|
||||||
|
|||||||
Reference in New Issue
Block a user