diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..05a48fc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + # Workflow files stored in the + # default location of `.github/workflows` + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/ci-format.yml b/.github/workflows/ci-format.yml new file mode 100644 index 0000000..a03f398 --- /dev/null +++ b/.github/workflows/ci-format.yml @@ -0,0 +1,23 @@ +# This is a format job. Pre-commit has a first-party GitHub action, so we use +# that: https://github.com/pre-commit/action + +name: Format + +on: + workflow_dispatch: + pull_request: + +jobs: + pre-commit: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4.7.0 + with: + python-version: '3.10' + - name: Install system hooks + run: sudo apt install -qq clang-format-14 cppcheck + - uses: pre-commit/action@v3.0.0 + with: + extra_args: --all-files --hook-stage manual diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7f587a1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,67 @@ +name: CI +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + CI: + runs-on: ubuntu-latest + permissions: + contents: read + issues: read + checks: write + pull-requests: write + steps: + - name: Prepare + run: | + mkdir -p ${{github.workspace}}/src + - uses: actions/checkout@v4 + with: + path: src/ft_tools_ros2 + + - name: Build Docker Image + uses: docker/build-push-action@v5 + with: + tags: ft_tools_ros2:humble + file: .docker/ci/Dockerfile + push: false + + - name: Build + uses: addnab/docker-run-action@v3 + with: + image: ft_tools_ros2:humble + options: -v ${{github.workspace}}/:/ros/ + run: | + cd /ros # structure = <...>/ros/src/ft_tools_ros2/<...> + . /opt/ros/humble/setup.sh + # vcs import src < src/ft_tools_ros2/ft_tools_ros2.repos + rosdep install --ignore-src --from-paths . -y -r + colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install + + - name: Tests + uses: addnab/docker-run-action@v3 + with: + image: ft_tools_ros2:humble + options: -v ${{github.workspace}}/:/ros/ + run: | + cd /ros + . /opt/ros/humble/setup.sh + # vcs import src < src/ft_tools_ros2/ft_tools_ros2.repos + rosdep install --ignore-src --from-paths . -y -r + colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install + colcon test + colcon test-result + + - name: Upload Tests to Artifacts + uses: actions/upload-artifact@v3 + if: always() + with: + name: test-results + path: build/*/test_results/*/*.xml + + - name: Publish Unit Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + files: build/*/test_results/*/*.xml diff --git a/README.md b/README.md index bde903a..20e2d87 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # ft_tools_ros2 Wrench estimation and calibration of F/T sensor for ROS2 applications. + + +***The current devs are based on the humble ROS 2 distribution (Ubuntu 22.04 LTS)*** + +[![CI](https://github.com/tpoignonec/ft_tools_ros2/actions/workflows/ci.yml/badge.svg)](https://github.com/tpoignonec/ft_tools_ros2/actions/workflows/ci.yml) diff --git a/ft_tools/config/config_ft_estimation_node.yaml b/ft_tools/config/config_ft_estimation_node.yaml new file mode 100644 index 0000000..e535ad9 --- /dev/null +++ b/ft_tools/config/config_ft_estimation_node.yaml @@ -0,0 +1,30 @@ +wrench_estimator_node: + ros__parameters: + topic_raw_wrench: raw_wrench + topic_joint_state: joint_states + topic_estimated_wrench: ft_sensor_wrench + topic_interaction_wrench: ft_interaction_wrench + + reference_frame: world + sensor_frame: ft_sensor + interaction_frame: tool0 + + raw_torque_is_in_mm: true + gravity_in_robot_base_frame: + - 0.0 + - 0.0 + - -9.81 + + wrench_deadband: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + - 0.0 + - 0.0 + + ft_calibration: + mass: 0.0 + sensor_frame_to_com: [0.0, 0.0, 0.0] + force_offset: [0.0, 0.0, 0.0] + torque_offset: [0.0, 0.0, 0.0] diff --git a/ft_tools/launch/.gitkeep b/ft_tools/launch/.gitkeep new file mode 100644 index 0000000..e69de29