Skip to content

Commit

Permalink
Add namespace (#59)
Browse files Browse the repository at this point in the history
* added tf_prefixes to the urdf

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* add namespace to world list

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* tf_prefix for controller

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* added namespace in mecanum test

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Added namespace to bringup

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* added fixed namespaces to description and controller

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Updated worldlist

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* added multirobot test to controllers

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Added rosbot_xl_bringup multirobot test

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* fixed .repos

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* updated submodules

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* updated industrial

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* first simulation launch

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* moved remapings to the urdf of intel

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* updated submodules

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Added tf fixer | remapped pointcloud topic in .yaml

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* added astra

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Added zed

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Added namespaced velodyne

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* added remappings for velodyne

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* added tests from rosbot_ros | fixed imu

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* add to the worldlist

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* lint | added multirobot simulation tests

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* added multirobot tests | added tf_ros2_py dependency to the rosbot_ros

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* fixed xacro test

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* fixed removeing gz tests

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* created src insisde industrial ci

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* removed geometry2

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Update industrial_ci.yaml

* added psutil dep

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* added psutil dep

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* added psutil dep

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* formatted package.xml files | removed one robot from controller tests

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* updated package.xml in rosbot_xl_description

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* updated tests

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Removed multirobot tests

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Removed multirobot tests

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Revert "Removed multirobot tests"

This reverts commit 30cf4c9.

* Added delayed spawn for controllers

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Added spawner to worldlist

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* bringup and controllers passes industrial

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Testing gazebo

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* industrial passes

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Passing industrial tests

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* removed comments

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Added bringup and controller tests

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* typo

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Update test_multirobot_controllers.py

* updated repos

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* rosbot_hardware_interfaces main to ros2

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>

* Add namespace suggestions (#60)

* Workflow merge many steps and pre-commit

* test bringup refactor

* test controller refactor

* test

* New tests

* typo

* 2024 Husarion copyright

* Jakub suggestions

* revert older version of black

* Add info

* Next suggestions

* spell fix

* remove sleep

* remove submodule

* debug fix

* timeout increase

* Apply suggestions from code review

Co-authored-by: Jakub Delicat <109142865+delihus@users.noreply.github.com>

* Apply suggestions from code review

* Update .github/workflows/bump_version.yaml

---------

Co-authored-by: Jakub Delicat <109142865+delihus@users.noreply.github.com>

---------

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>
Co-authored-by: rafal-gorecki <126687345+rafal-gorecki@users.noreply.github.com>
  • Loading branch information
delihus and rafal-gorecki authored Jan 31, 2024
1 parent cdcc601 commit 3d66da3
Show file tree
Hide file tree
Showing 56 changed files with 2,121 additions and 1,096 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
extend-ignore = E203, B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202
extend-ignore = E203,E501,B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202,E203
import-order-style = google
max-line-length = 99
show-source = true
Expand Down
111 changes: 56 additions & 55 deletions .github/workflows/bump_version.yaml
Original file line number Diff line number Diff line change
@@ -1,64 +1,65 @@
---
name: Bump version
on:
workflow_dispatch:
inputs:
name:
description: Version to bump (major, minor, patch)
default: patch
required: true
pull_request:
branches: master
types: [closed]
workflow_dispatch:
inputs:
name:
description: Version to bump (major, minor, patch)
default: patch
required: true
pull_request:
branches: master
types: [closed]

jobs:
industrial_ci:
name: Industrial CI
uses: ./.github/workflows/industrial_ci.yaml
industrial_ci:
name: Industrial CI
uses: ./.github/workflows/industrial_ci.yaml

get-bump:
get-bump:
name: Get version bump
runs-on: ubuntu-latest
needs: industrial_ci
outputs:
bump: ${{ env.BUMP }}
steps:
- if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
name: Get version bump
runs-on: ubuntu-latest
needs: industrial_ci
outputs:
bump: ${{ env.BUMP }}
steps:
- if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
name: Get version bump
id: get-version-bump
uses: husarion-ci/action-get-version-bump@v0.3.0
- if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
run: echo "BUMP=${{ steps.get-version-bump.outputs.bump }}" >> $GITHUB_ENV
- if: github.event_name == 'workflow_dispatch'
run: echo "BUMP=${{ github.event.inputs.name }}" >> $GITHUB_ENV
id: get-version-bump
uses: husarion-ci/action-get-version-bump@v0.3.0
- if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
run: echo "BUMP=${{ steps.get-version-bump.outputs.bump }}" >> $GITHUB_ENV
- if: github.event_name == 'workflow_dispatch'
run: echo "BUMP=${{ github.event.inputs.name }}" >> $GITHUB_ENV

catkin-release:
name: Bump version
runs-on: ubuntu-latest
needs: get-bump
outputs:
new_version: ${{ steps.catkin-release.outputs.new_version }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Catkin release
id: catkin-release
uses: husarion-ci/action-catkin-release@v0.1.4
with:
bump: ${{ needs.get-bump.outputs.bump }}
github_token: ${{ secrets.GITHUB_TOKEN }}
git_user: action-bot
git_email: action-bot@action-bot.com
catkin-release:
name: Bump version
runs-on: ubuntu-latest
needs: get-bump
outputs:
new_version: ${{ steps.catkin-release.outputs.new_version }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Catkin release
id: catkin-release
uses: husarion-ci/action-catkin-release@v0.1.4
with:
bump: ${{ needs.get-bump.outputs.bump }}
github_token: ${{ secrets.GITHUB_TOKEN }}
git_user: action-bot
git_email: action-bot@action-bot.com

build-and-push-docker-image:
name: Create new docker image
runs-on: ubuntu-latest
needs: catkin-release
steps:
- name: trigger the endpoint
run: >
curl -X POST
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer ${{ secrets.GH_PAT }}"
https://api.github.com/repos/husarion/rosbot-xl-docker/dispatches
-d '{"event_type":"ros-package-update","client_payload":{"image_version":"${{ needs.catkin-release.outputs.new_version }}"}}'
build-docker-image:
name: Trigger rosbot-xl-docker to build image
runs-on: ubuntu-latest
needs: catkin-release
steps:
- name: trigger the endpoint
run: >
curl -X POST
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer ${{ secrets.GH_PAT }}"
https://api.github.com/repos/husarion/rosbot-xl-docker/dispatches
-d '{"event_type":"ros-package-update","client_payload":{"image_version":"${{ needs.catkin-release.outputs.new_version
}}"}}'
84 changes: 47 additions & 37 deletions .github/workflows/industrial_ci.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,56 @@
---
name: Industrial CI
on:
workflow_call:
workflow_dispatch:
push:
workflow_call:
workflow_dispatch:
push:


jobs:
black:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: --line-length=99
black:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: --line-length=99

spellcheck:
spellcheck:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rojopolis/spellcheck-github-actions@0.33.1
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rojopolis/spellcheck-github-actions@0.33.1
name: Spellcheck

ros_industrial_ci:
name: ROS Industrial CI
needs:
- black
- spellcheck
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble]
runs-on: ubuntu-latest
timeout-minutes: 16
steps:
- uses: actions/checkout@v3
- name: Clone installation requirements
shell: bash
run: python3 -m pip install -U vcstool && vcs import . < ./rosbot_xl/rosbot_xl_hardware.repos && vcs import . < ./rosbot_xl/rosbot_xl_simulation.repos
- uses: ros-industrial/industrial_ci@master
env:
ROS_DISTRO: ${{matrix.ROS_DISTRO}}
HUSARION_ROS_BUILD: simulation
ros_industrial_ci:
name: ROS Industrial CI
needs:
- black
- spellcheck
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup ROS2 Workspace and Clone Repositories
run: |
mkdir -p src
find . -maxdepth 1 -not -name src -not -name . -exec mv {} src/ \;
python3 -m pip install -U vcstool
vcs import src < src/rosbot_xl/rosbot_xl_hardware.repos
vcs import src < src/rosbot_xl/rosbot_xl_simulation.repos
cp -r src/ros2_controllers/diff_drive_controller src/
cp -r src/ros2_controllers/imu_sensor_broadcaster src/
rm -rf src/ros2_controllers
- uses: ros-industrial/industrial_ci@master
env:
ROS_DISTRO: ${{matrix.ROS_DISTRO}}
HUSARION_ROS_BUILD: simulation
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ ros_components_description/
rosbot_controllers/
husarion/husarion_office_gz
gazebosim/gz_ros2_control
ros2_controllers/
diff_drive_controller/
imu_sensor_broadcaster/
tf2_ros_py/

# pyspelling
*.dic
98 changes: 50 additions & 48 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,60 +1,62 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-xml
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: name-tests-test
files: ^.*\/test\/.*$
args: [--pytest-test-first]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-xml
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: name-tests-test
files: ^.*\/test\/.*$
args: [--pytest-test-first]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell *
language: python
types: [text]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell *
language: python
types: [text]

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
files: ^.github|./\.yaml
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
files: ^(?!.*compose)(?!.*ekf\.yaml$).*$
args: [--mapping, '2', --sequence, '4', --offset, '2', --width, '100']

- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
args: ["--line-length=99", "--preview"]
# Please keep this version until --experimental-string-processing come back or will be available by default
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
args: [--line-length=99, --experimental-string-processing]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: ["--ignore=E501,W503,E203"] # ignore too long line and line break before binary operator,
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
args: ['--ignore=E501,W503'] # ignore too long line and line break before binary operator,
# black checks it

- repo: local
hooks:
- repo: local
hooks:
- id: ament_lint_cmake
name: ament_lint_cmake
description: Check format of CMakeLists.txt files.
entry: ament_lint_cmake
language: system
files: CMakeLists\.txt$

- repo: local
hooks:
- repo: local
hooks:
- id: ament_copyright
name: ament_copyright
description: Check if copyright notice is available in all files.
Expand All @@ -63,9 +65,9 @@ repos:
language: system

# Docs - RestructuredText hooks
- repo: https://github.com/PyCQA/doc8
rev: v1.1.1
hooks:
- id: doc8
args: ['--max-line-length=100', '--ignore=D001']
exclude: ^.*\/CHANGELOG\.rst/.*$
- repo: https://github.com/PyCQA/doc8
rev: v1.1.1
hooks:
- id: doc8
args: [--max-line-length=100, --ignore=D001]
exclude: ^.*\/CHANGELOG\.rst/.*$
Loading

0 comments on commit 3d66da3

Please sign in to comment.