Skip to content

Commit

Permalink
[CR-578] Add slamcore-convert-rosbag2 top-level script
Browse files Browse the repository at this point in the history
See the README for more information on the tool's goal and usage.
  • Loading branch information
nikoskoukis-slamcore committed May 31, 2023
1 parent ceeee91 commit 3a03e98
Show file tree
Hide file tree
Showing 52 changed files with 7,734 additions and 178 deletions.
94 changes: 75 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,69 +6,125 @@ on:

jobs:
install_with_pip3:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install with pip3
run: |
pip3 install .
pip3 show slamcore_utils
- name: Install with pip3 + extras
run: |
pip3 install .[ros2]
pip3 show slamcore_utils
unittests:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9"]
include:
- os: "ubuntu-22.04"
python-version: "3.10.4"

steps:
- name: Set Env Variables
run: |
echo "APT_PACKAGES=ros-humble-ros2bag ros-humble-rosbag2 ros-humble-rosbag2-compression ros-humble-rosbag2-compression-zstd ros-humble-rosbag2-cpp ros-humble-rosbag2-interfaces ros-humble-rosbag2-py ros-humble-rosbag2-storage ros-humble-rosbag2-storage-default-plugins ros-humble-rosbag2-storage-mcap ros-humble-rosbag2-transport" >> "$GITHUB_ENV"
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Setup ROS
uses: ros-tooling/setup-ros@v0.6
with:
use-ros2-testing: false
required-ros-distributions: humble
- name: Install extras
run: "sudo apt-get update && sudo apt-get install $APT_PACKAGES"
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Python Poetry Action
# Remove this section when this gets fixed
# https://stackoverflow.com/questions/76175361/firebase-authentication-httpresponse-object-has-no-attribute-strict-status
# https://github.com/ionrock/cachecontrol/issues/292
- name: Fix urllib / cachecontrol incompatibility
run: python -m pip install urllib3==1.26.15

- name: Setup Python Poetry
uses: abatilo/actions-poetry@v2.1.3

- name: Install prerequisites
run: poetry install
run: "poetry version && poetry install --extras ros2"
- name: Run tests
run: poetry run pytest --doctest-modules
run: "source /opt/ros/humble/setup.bash && poetry run pytest -v --doctest-modules"

check_style:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Setup ROS
uses: ros-tooling/setup-ros@v0.6
with:
use-ros2-testing: false
required-ros-distributions: humble
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"

- name: Python Poetry Action
# Remove this section when this gets fixed
# https://stackoverflow.com/questions/76175361/firebase-authentication-httpresponse-object-has-no-attribute-strict-status
# https://github.com/ionrock/cachecontrol/issues/292
- name: Fix urllib / cachecontrol incompatibility
run: python -m pip install urllib3==1.26.15

- name: Setup Python Poetry
uses: abatilo/actions-poetry@v2.1.3
- name: Install prerequisites
run: poetry install
run: poetry install --extras ros2
- name: Check style
run: poetry run ./misc/check_style.py --check-only
run: "source /opt/ros/humble/setup.bash && poetry run ./misc/check_style.py --check-only"
lint_code:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Setup ROS
uses: ros-tooling/setup-ros@v0.6
with:
use-ros2-testing: false
required-ros-distributions: humble
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Python Poetry Action

# Remove this section when this gets fixed
# https://stackoverflow.com/questions/76175361/firebase-authentication-httpresponse-object-has-no-attribute-strict-status
# https://github.com/ionrock/cachecontrol/issues/292
- name: Fix urllib / cachecontrol incompatibility
run: python -m pip install urllib3==1.26.15

- name: Setup Python Poetry
uses: abatilo/actions-poetry@v2.1.3
- name: Install prerequisites
run: poetry install
run: poetry install --extras ros2
- name: Lint code
run: poetry run ./misc/lint_code.py --check-only
run: "source /opt/ros/humble/setup.bash && poetry run ./misc/lint_code.py --check-only"

publish_package:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Setup ROS
uses: ros-tooling/setup-ros@v0.6
with:
use-ros2-testing: false
required-ros-distributions: humble
- name: Publish package to pypi
uses: JRubics/poetry-publish@v1.9
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,16 @@ ENV/

# vim
Session.vim
.vim/
.lvimrc

# asdf
.tool-versions

#############################

/cafe1-1_converted
/cafe1-1
/sample_dataset_converted
/test_rosbag2_with_slamcore_ros2_topics.jsonc
/output/
Loading

0 comments on commit 3a03e98

Please sign in to comment.