Skip to content

Commit

Permalink
Merge branch 'master' into jtc/fix_state_offset_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich authored Nov 11, 2023
2 parents 3ca34f9 + 0196eeb commit 8937354
Show file tree
Hide file tree
Showing 37 changed files with 302 additions and 137 deletions.
10 changes: 10 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ pull_request_rules:
branches:
- humble


- name: Backport to iron at reviewers discretion
conditions:
- base=master
- "label=backport-iron"
actions:
backport:
branches:
- iron

- name: Ask to resolve conflict
conditions:
- conflict
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/ci-coverage-build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Coverage Build
on:
workflow_dispatch:
branches:
- master
push:
branches:
- master
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/iron-abi-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Iron - ABI Compatibility Check
on:
workflow_dispatch:
branches:
- iron
pull_request:
branches:
- iron

jobs:
abi_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ros-industrial/industrial_ci@master
env:
ROS_DISTRO: iron
ROS_REPO: main
ABICHECK_URL: github:${{ github.repository }}#${{ github.base_ref }}
NOT_TEST_BUILD: true
30 changes: 30 additions & 0 deletions .github/workflows/iron-binary-build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Iron Binary Build - main
# author: Denis Štogl <denis@stoglrobotics.de>
# description: 'Build & test all dependencies from released (binary) packages.'

on:
workflow_dispatch:
branches:
- iron
- '*feature*'
- '*feature/**'
pull_request:
branches:
- iron
- '*feature*'
- '*feature/**'
push:
branches:
- iron
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '03 1 * * *'

jobs:
binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
with:
ros_distro: iron
ros_repo: main
upstream_workspace: ros2_controllers-not-released.iron.repos
ref_for_scheduled_build: iron
30 changes: 30 additions & 0 deletions .github/workflows/iron-binary-build-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Iron Binary Build - testing
# author: Denis Štogl <denis@stoglrobotics.de>
# description: 'Build & test all dependencies from released (binary) packages.'

on:
workflow_dispatch:
branches:
- iron
- '*feature*'
- '*feature/**'
pull_request:
branches:
- iron
- '*feature*'
- '*feature/**'
push:
branches:
- iron
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '03 1 * * *'

jobs:
binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
with:
ros_distro: iron
ros_repo: testing
upstream_workspace: ros2_controllers-not-released.iron.repos
ref_for_scheduled_build: iron
28 changes: 28 additions & 0 deletions .github/workflows/iron-rhel-binary-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Iron RHEL Binary Build
on:
workflow_dispatch:
push:
branches:
- iron
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: '03 1 * * *'


jobs:
iron_rhel_binary:
name: Iron RHEL binary build
runs-on: ubuntu-latest
env:
ROS_DISTRO: iron
container: ghcr.io/ros-controls/ros:iron-rhel
steps:
- uses: actions/checkout@v4
with:
path: src/ros2_controllers
- run: |
rosdep update
rosdep install -iy --from-path src/ros2_controllers
source /opt/ros/${{ env.ROS_DISTRO }}/setup.bash
colcon build
colcon test
29 changes: 29 additions & 0 deletions .github/workflows/iron-semi-binary-build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Iron Semi-Binary Build - main
# description: 'Build & test that compiles the main dependencies from source.'

on:
workflow_dispatch:
branches:
- iron
- '*feature*'
- '*feature/**'
pull_request:
branches:
- iron
- '*feature*'
- '*feature/**'
push:
branches:
- iron
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '33 1 * * *'

jobs:
semi_binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
with:
ros_distro: iron
ros_repo: main
upstream_workspace: ros2_controllers.iron.repos
ref_for_scheduled_build: iron
29 changes: 29 additions & 0 deletions .github/workflows/iron-semi-binary-build-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Iron Semi-Binary Build - testing
# description: 'Build & test that compiles the main dependencies from source.'

on:
workflow_dispatch:
branches:
- iron
- '*feature*'
- '*feature/**'
pull_request:
branches:
- iron
- '*feature*'
- '*feature/**'
push:
branches:
- iron
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '33 1 * * *'

jobs:
semi_binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
with:
ros_distro: iron
ros_repo: testing
upstream_workspace: ros2_controllers.iron.repos
ref_for_scheduled_build: iron
19 changes: 19 additions & 0 deletions .github/workflows/iron-source-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Iron Source Build
on:
workflow_dispatch:
branches:
- iron
push:
branches:
- iron
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: '03 3 * * *'

jobs:
source:
uses: ./.github/workflows/reusable-ros-tooling-source-build.yml
with:
ros_distro: iron
ref: iron
ros2_repo_branch: iron
2 changes: 2 additions & 0 deletions .github/workflows/prerelease-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
type: choice
options:
- humble
- iron
- rolling
branch:
description: 'Chose branch for distro'
Expand All @@ -18,6 +19,7 @@ on:
type: choice
options:
- humble
- iron
- master

jobs:
Expand Down
15 changes: 2 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,10 @@ repos:
args: ["--ignore=E501"]

# CPP hooks
- repo: local
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
hooks:
- id: clang-format
name: clang-format
description: Format files with ClangFormat.
entry: clang-format-14
language: system
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ['-fallback-style=none', '-i']
# The same options as in ament_cppcheck are used, but its not working...
#- repo: https://github.com/pocc/pre-commit-hooks
#rev: v1.1.1
#hooks:
#- id: cppcheck
#args: ['--error-exitcode=1', '-f', '--inline-suppr', '-q', '-rp', '--suppress=internalAstError', '--suppress=unknownMacro', '--verbose']

- repo: local
hooks:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# ros2_controllers

[![Licence](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![codecov](https://codecov.io/gh/ros-controls/ros2_controllers/graph/badge.svg?token=KSdY0tsHm6)](https://codecov.io/gh/ros-controls/ros2_controllers)

Commonly used and generalized controllers for ros2-control framework that are ready to use with many robots, MoveIt2 and Navigation2.

## Build status

ROS2 Distro | Branch | Build status | Documentation | Released packages
:---------: | :----: | :----------: | :-----------: | :---------------:
**Rolling** | [`rolling`](https://github.com/ros-controls/ros2_controllers/tree/rolling) | [![Rolling Binary Build](https://github.com/ros-controls/ros2_controllers/actions/workflows/rolling-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/ros2_controllers/actions/workflows/rolling-binary-build-main.yml?branch=master) <br /> [![Rolling Semi-Binary Build](https://github.com/ros-controls/ros2_controllers/actions/workflows/rolling-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/ros2_controllers/actions/workflows/rolling-semi-binary-build-main.yml?branch=master) | | [ros2_controllers](https://index.ros.org/p/ros2_controllers/#rolling)
**Iron** | [`iron`](https://github.com/ros-controls/ros2_controllers/tree/iron) | [![Iron Binary Build](https://github.com/ros-controls/ros2_controllers/actions/workflows/iron-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/ros2_controllers/actions/workflows/iron-binary-build-main.yml?branch=master) <br /> [![Iron Semi-Binary Build](https://github.com/ros-controls/ros2_controllers/actions/workflows/iron-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/ros2_controllers/actions/workflows/iron-semi-binary-build-main.yml?branch=master) | | [ros2_controllers](https://index.ros.org/p/ros2_controllers/#iron)
**Humble** | [`humble`](https://github.com/ros-controls/ros2_controllers/tree/humble) | [![Humble Binary Build](https://github.com/ros-controls/ros2_controllers/actions/workflows/humble-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/ros2_controllers/actions/workflows/humble-binary-build-main.yml?branch=master) <br /> [![Humble Semi-Binary Build](https://github.com/ros-controls/ros2_controllers/actions/workflows/humble-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/ros2_controllers/actions/workflows/humble-semi-binary-build-main.yml?branch=master) | | [ros2_controllers](https://index.ros.org/p/ros2_controllers/#humble)

### Explanation of different build types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class AckermannSteeringControllerFixture : public ::testing::Test
protected:
void SetUpController(const std::string controller_name = "test_ackermann_steering_controller")
{
ASSERT_EQ(controller_->init(controller_name), controller_interface::return_type::OK);
ASSERT_EQ(controller_->init(controller_name, ""), controller_interface::return_type::OK);

if (position_feedback_ == true)
{
Expand Down
2 changes: 1 addition & 1 deletion admittance_controller/test/test_admittance_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class AdmittanceControllerTest : public ::testing::Test
controller_interface::return_type SetUpControllerCommon(
const std::string & controller_name, const rclcpp::NodeOptions & options)
{
auto result = controller_->init(controller_name, "", options);
auto result = controller_->init(controller_name, "", "", options);

controller_->export_reference_interfaces();
assign_interfaces();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class BicycleSteeringControllerFixture : public ::testing::Test
protected:
void SetUpController(const std::string controller_name = "test_bicycle_steering_controller")
{
ASSERT_EQ(controller_->init(controller_name), controller_interface::return_type::OK);
ASSERT_EQ(controller_->init(controller_name, ""), controller_interface::return_type::OK);

if (position_feedback_ == true)
{
Expand Down
3 changes: 0 additions & 3 deletions diff_drive_controller/doc/userdoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ Subscribers
~/cmd_vel [geometry_msgs/msg/TwistStamped]
Velocity command for the controller, if ``use_stamped_vel=true``. The controller extracts the x component of the linear velocity and the z component of the angular velocity. Velocities on other components are ignored.

~/cmd_vel_unstamped [geometry_msgs::msg::Twist]
Velocity command for the controller, if ``use_stamped_vel=false``. The controller extracts the x component of the linear velocity and the z component of the angular velocity. Velocities on other components are ignored.


Publishers
,,,,,,,,,,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ class DiffDriveController : public controller_interface::ControllerInterface

bool subscriber_is_active_ = false;
rclcpp::Subscription<Twist>::SharedPtr velocity_command_subscriber_ = nullptr;
rclcpp::Subscription<geometry_msgs::msg::Twist>::SharedPtr
velocity_command_unstamped_subscriber_ = nullptr;

realtime_tools::RealtimeBox<std::shared_ptr<Twist>> received_velocity_msg_ptr_{nullptr};

Expand All @@ -151,7 +149,6 @@ class DiffDriveController : public controller_interface::ControllerInterface
rclcpp::Time previous_publish_timestamp_{0, 0, RCL_CLOCK_UNINITIALIZED};

bool is_halted = false;
bool use_stamped_vel_ = true;

bool reset();
void halt();
Expand Down
Loading

0 comments on commit 8937354

Please sign in to comment.