Skip to content

Commit

Permalink
Make nice user interface to export controllers.
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl committed May 16, 2022
1 parent 648d039 commit 65bcd7c
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,5 @@ void TestChainableController::set_reference_interface_names(
#include "pluginlib/class_list_macros.hpp"

PLUGINLIB_EXPORT_CLASS(
test_chainable_controller::TestChainableController, controller_interface::ControllerInterfaceBase)
test_chainable_controller::TestChainableController,
controller_interface::ChainableControllerInterface)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<class name="controller_manager/test_chainable_controller"
type="test_chainable_controller::TestChainableController"
base_class_type="controller_interface::ControllerInterfaceBase">
base_class_type="controller_interface::ChainableControllerInterface">
<description>
Controller used for testing
</description>
Expand Down
3 changes: 1 addition & 2 deletions controller_manager/test/test_controller/test_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,4 @@ void TestController::set_state_interface_configuration(

#include "pluginlib/class_list_macros.hpp"

PLUGINLIB_EXPORT_CLASS(
test_controller::TestController, controller_interface::ControllerInterfaceBase)
PLUGINLIB_EXPORT_CLASS(test_controller::TestController, controller_interface::ControllerInterface)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<library path="test_controller">

<class name="controller_manager/test_controller" type="test_controller::TestController" base_class_type="controller_interface::ControllerInterfaceBase">
<class name="controller_manager/test_controller" type="test_controller::TestController" base_class_type="controller_interface::ControllerInterface">
<description>
Controller used for testing
</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@ controller_interface::return_type TestControllerFailedInit::update(
#include "pluginlib/class_list_macros.hpp"

PLUGINLIB_EXPORT_CLASS(
test_controller_failed_init::TestControllerFailedInit,
controller_interface::ControllerInterfaceBase)
test_controller_failed_init::TestControllerFailedInit, controller_interface::ControllerInterface)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<library path="test_controller_failed_init">

<class name="controller_manager/test_controller_failed_init" type="test_controller_failed_init::TestControllerFailedInit" base_class_type="controller_interface::ControllerInterfaceBase">
<class name="controller_manager/test_controller_failed_init" type="test_controller_failed_init::TestControllerFailedInit" base_class_type="controller_interface::ControllerInterface">
<description>
Controller used for testing
</description>
Expand Down
5 changes: 4 additions & 1 deletion controller_manager/test/test_controller_manager_srvs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ TEST_F(TestControllerManagerSrvs, list_controller_types)
ASSERT_EQ(controller_types, result->base_classes.size());
ASSERT_THAT(result->types, ::testing::Contains(test_controller::TEST_CONTROLLER_CLASS_NAME));
ASSERT_THAT(
result->base_classes, ::testing::Contains("controller_interface::ControllerInterfaceBase"));
result->base_classes, ::testing::Contains("controller_interface::ControllerInterface"));
ASSERT_THAT(
result->base_classes,
::testing::Contains("controller_interface::ChainableControllerInterface"));
}

TEST_F(TestControllerManagerSrvs, list_controllers_srv)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ TestControllerWithInterfaces::on_cleanup(const rclcpp_lifecycle::State & /*previ

PLUGINLIB_EXPORT_CLASS(
test_controller_with_interfaces::TestControllerWithInterfaces,
controller_interface::ControllerInterfaceBase)
controller_interface::ControllerInterface)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<library path="test_controller_with_interfaces">

<class name="controller_manager/test_controller_with_interfaces" type="test_controller_with_interfaces::TestControllerWithInterfaces" base_class_type="controller_interface::ControllerInterfaceBase">
<class name="controller_manager/test_controller_with_interfaces" type="test_controller_with_interfaces::TestControllerWithInterfaces" base_class_type="controller_interface::ControllerInterface">
<description>
Controller used for testing
</description>
Expand Down

0 comments on commit 65bcd7c

Please sign in to comment.