mirror of
https://github.com/okalachev/flix.git
synced 2026-09-05 16:00:56 +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
|
||||
- name: 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
|
||||
env:
|
||||
GAZEBO_MODEL_PATH: ${{ github.workspace }}/gazebo/models
|
||||
GAZEBO_PLUGIN_PATH: ${{ github.workspace }}/gazebo/build
|
||||
run: |
|
||||
OUT=$(timeout -k 10s 120s gzserver --verbose gazebo/flix.world 2>&1 | tee /dev/stderr)
|
||||
if echo "$OUT" | grep -Pq "\[Err\](?! \[RenderEngine)"; then
|
||||
exit 1
|
||||
fi
|
||||
gzserver --verbose gazebo/flix.world &
|
||||
timeout -k 10s 120s tools/example.py
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: gazebo-plugin-binary
|
||||
|
||||
@@ -138,6 +138,7 @@ public:
|
||||
|
||||
int available() {
|
||||
// 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 };
|
||||
return poll(&pfd, 1, 0) > 0;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
pymavlink
|
||||
docopt
|
||||
matplotlib
|
||||
mcap
|
||||
|
||||
Reference in New Issue
Block a user