Skip to content

Commit

Permalink
add naming changes from state to lifecycle_state
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Sep 26, 2024
1 parent e7b3b5e commit fc2dfe3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ void ControllerManager::activate_controllers(
}
controller->assign_interfaces(std::move(command_loans), std::move(state_loans));

auto new_state = controller->get_state();
auto new_state = controller->get_lifecycle_state();
try
{
new_state = controller->get_node()->activate();
Expand Down
12 changes: 6 additions & 6 deletions controller_manager/test/test_release_interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ TEST_F(TestReleaseExclusiveInterfaces, test_exclusive_interface_switching_failur

ASSERT_EQ(
lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE,
abstract_test_controller1.c->get_state().id());
abstract_test_controller1.c->get_lifecycle_state().id());
ASSERT_EQ(
lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE,
abstract_test_controller2.c->get_state().id());
abstract_test_controller2.c->get_lifecycle_state().id());

{ // Test starting the first controller
RCLCPP_INFO(cm_->get_logger(), "Starting controller #1");
Expand All @@ -251,10 +251,10 @@ TEST_F(TestReleaseExclusiveInterfaces, test_exclusive_interface_switching_failur
EXPECT_EQ(controller_interface::return_type::OK, switch_future.get());
ASSERT_EQ(
lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE,
abstract_test_controller1.c->get_state().id());
abstract_test_controller1.c->get_lifecycle_state().id());
ASSERT_EQ(
lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE,
abstract_test_controller2.c->get_state().id());
abstract_test_controller2.c->get_lifecycle_state().id());
}

{ // Test starting the second controller when the first is running
Expand All @@ -271,9 +271,9 @@ TEST_F(TestReleaseExclusiveInterfaces, test_exclusive_interface_switching_failur
EXPECT_EQ(controller_interface::return_type::OK, switch_future.get());
ASSERT_EQ(
lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE,
abstract_test_controller1.c->get_state().id());
abstract_test_controller1.c->get_lifecycle_state().id());
ASSERT_EQ(
lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE,
abstract_test_controller2.c->get_state().id());
abstract_test_controller2.c->get_lifecycle_state().id());
}
}

0 comments on commit fc2dfe3

Please sign in to comment.