Skip to content

Commit

Permalink
Merge branch 'master' into fix_full_list_controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
bmagyar authored Aug 22, 2024
2 parents 8f3d23e + cdfc0af commit d4c28a9
Show file tree
Hide file tree
Showing 44 changed files with 145 additions and 88 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/humble-abi-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '.github/workflows/humble-abi-compatibility.yml'
- '**.py'
- '**.yaml'
- '.github/workflows/humble-abi-compatibility.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers-not-released.humble.repos'
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/humble-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '.github/workflows/humble-binary-build.yml'
- '**.py'
- '**.yaml'
- '.github/workflows/humble-binary-build.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers-not-released.humble.repos'
Expand All @@ -23,8 +24,9 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '.github/workflows/humble-binary-build.yml'
- '**.py'
- '**.yaml'
- '.github/workflows/humble-binary-build.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers-not-released.humble.repos'
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/humble-coverage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/humble-coverage-build.yml'
- 'codecov.yml'
- '**.yaml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers.humble.repos'
Expand All @@ -21,9 +22,10 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/humble-coverage-build.yml'
- 'codecov.yml'
- '**.yaml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers.humble.repos'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/humble-debian-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '.github/workflows/humble-debian-build.yml'
- '**.py'
- '**.yaml'
- '.github/workflows/humble-debian-build.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers.humble.repos'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/humble-rhel-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '.github/workflows/humble-rhel-semi-binary-build.yml'
- '**.py'
- '**.yaml'
- '.github/workflows/humble-rhel-semi-binary-build.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers.humble.repos'
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/humble-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '.github/workflows/humble-semi-binary-build.yml'
- '**.py'
- '**.yaml'
- '.github/workflows/humble-semi-binary-build.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers.humble.repos'
Expand All @@ -22,8 +23,9 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '.github/workflows/humble-semi-binary-build.yml'
- '**.py'
- '**.yaml'
- '.github/workflows/humble-semi-binary-build.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers.humble.repos'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/humble-source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/humble-source-build.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/iron-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '.github/workflows/iron-binary-build.yml'
- '**.py'
- '**.yaml'
- '.github/workflows/iron-binary-build.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers-not-released.iron.repos'
Expand All @@ -25,8 +26,9 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '.github/workflows/iron-binary-build.yml'
- '**.py'
- '**.yaml'
- '.github/workflows/iron-binary-build.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
- 'ros2_controllers-not-released.iron.repos'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/iron-coverage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/iron-coverage-build.yml'
- 'codecov.yml'
Expand All @@ -21,6 +22,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/iron-coverage-build.yml'
- 'codecov.yml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/iron-debian-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/iron-debian-build.yml'
- '**/package.xml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/iron-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/iron-semi-binary-build.yml'
- '**/package.xml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/iron-source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/iron-source-build.yml'
- '**/package.xml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jazzy-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/jazzy-binary-build.yml'
- '**/package.xml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jazzy-debian-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/jazzy-debian-build.yml'
- '**/package.xml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jazzy-rhel-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/jazzy-rhel-semi-binary-build.yml'
- '**/package.xml'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/jazzy-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/jazzy-semi-binary-build.yml'
- '**/package.xml'
Expand All @@ -24,6 +25,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/jazzy-semi-binary-build.yml'
- '**/package.xml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jazzy-source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/jazzy-source-build.yml'
- '**/package.xml'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rolling-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/rolling-binary-build.yml'
- '**/package.xml'
- '**/CMakeLists.txt'
Expand All @@ -24,6 +26,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/rolling-binary-build.yml'
- '**/package.xml'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rolling-coverage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/rolling-coverage-build.yml'
- 'codecov.yml'
Expand All @@ -21,6 +22,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/rolling-coverage-build.yml'
- 'codecov.yml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rolling-debian-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/rolling-debian-build.yml'
- '**/package.xml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rolling-rhel-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/rolling-rhel-semi-binary-build.yml'
- '**/package.xml'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rolling-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/rolling-semi-binary-build.yml'
- '**/package.xml'
Expand All @@ -24,6 +25,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/rolling-semi-binary-build.yml'
- '**/package.xml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rolling-source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.hpp'
- '**.h'
- '**.cpp'
- '**.py'
- '**.yaml'
- '.github/workflows/rolling-source-build.yml'
- '**/package.xml'
Expand Down
6 changes: 2 additions & 4 deletions ackermann_steering_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ if(BUILD_TESTING)
find_package(ros2_control_test_assets REQUIRED)


add_rostest_with_parameters_gmock(test_load_ackermann_steering_controller
test/test_load_ackermann_steering_controller.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test/ackermann_steering_controller_params.yaml
)
add_definitions(-DTEST_FILES_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}/test")
ament_add_gmock(test_load_ackermann_steering_controller test/test_load_ackermann_steering_controller.cpp)
ament_target_dependencies(test_load_ackermann_steering_controller
controller_manager
hardware_interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ TEST(TestLoadAckermannSteeringController, load_controller)

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");
const std::string test_file_path =
std::string(TEST_FILES_DIRECTORY) + "/ackermann_steering_controller_params.yaml";

ASSERT_NE(
cm.load_controller(
"test_ackermann_steering_controller",
"ackermann_steering_controller/AckermannSteeringController"),
nullptr);
cm.set_parameter({"test_ackermann_steering_controller.params_file", test_file_path});
cm.set_parameter(
{"test_ackermann_steering_controller.type",
"ackermann_steering_controller/AckermannSteeringController"});

ASSERT_NE(cm.load_controller("test_ackermann_steering_controller"), nullptr);
}

int main(int argc, char ** argv)
Expand Down
6 changes: 2 additions & 4 deletions admittance_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ if(BUILD_TESTING)
find_package(kinematics_interface_kdl REQUIRED)

# test loading admittance controller
add_rostest_with_parameters_gmock(test_load_admittance_controller
test/test_load_admittance_controller.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test/test_params.yaml
)
add_definitions(-DTEST_FILES_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}/test")
ament_add_gmock(test_load_admittance_controller test/test_load_admittance_controller.cpp)
ament_target_dependencies(test_load_admittance_controller
controller_manager
hardware_interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,17 @@ controller_interface::return_type AdmittanceRule::configure(
{
try
{
// Make sure we destroy the interface first. Otherwise we might run into a segfault
if (kinematics_loader_)
{
kinematics_.reset();
}
kinematics_loader_ =
std::make_shared<pluginlib::ClassLoader<kinematics_interface::KinematicsInterface>>(
parameters_.kinematics.plugin_package, "kinematics_interface::KinematicsInterface");
kinematics_ = std::unique_ptr<kinematics_interface::KinematicsInterface>(
kinematics_loader_->createUnmanagedInstance(parameters_.kinematics.plugin_name));

if (!kinematics_->initialize(
node->get_node_parameters_interface(), parameters_.kinematics.tip))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ TEST(TestLoadAdmittanceController, load_controller)

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");
const std::string test_file_path = std::string(TEST_FILES_DIRECTORY) + "/test_params.yaml";

ASSERT_EQ(
cm.load_controller("load_admittance_controller", "admittance_controller/AdmittanceController"),
nullptr);
cm.set_parameter({"load_admittance_controller.params_file", test_file_path});
cm.set_parameter(
{"load_admittance_controller.type", "admittance_controller/AdmittanceController"});

ASSERT_EQ(cm.load_controller("load_admittance_controller"), nullptr);
}

int main(int argc, char ** argv)
Expand Down
6 changes: 2 additions & 4 deletions bicycle_steering_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ if(BUILD_TESTING)
find_package(hardware_interface REQUIRED)
find_package(ros2_control_test_assets REQUIRED)

add_rostest_with_parameters_gmock(test_load_bicycle_steering_controller
test/test_load_bicycle_steering_controller.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test/bicycle_steering_controller_params.yaml
)
add_definitions(-DTEST_FILES_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}/test")
ament_add_gmock(test_load_bicycle_steering_controller test/test_load_bicycle_steering_controller.cpp)
ament_target_dependencies(test_load_bicycle_steering_controller
controller_manager
hardware_interface
Expand Down
Loading

0 comments on commit d4c28a9

Please sign in to comment.