Skip to content

Commit

Permalink
remove the cm_update_rate API and only fix the controller update rate…
Browse files Browse the repository at this point in the history
… variable
  • Loading branch information
saikishor committed Nov 7, 2023
1 parent efe6359 commit 7d5a77a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ class ControllerInterfaceBase : public rclcpp_lifecycle::node_interfaces::Lifecy
CONTROLLER_INTERFACE_PUBLIC
unsigned int get_update_rate() const;

CONTROLLER_INTERFACE_PUBLIC
unsigned int get_cm_update_rate() const;

CONTROLLER_INTERFACE_PUBLIC
bool is_async() const;

Expand Down Expand Up @@ -229,7 +226,6 @@ class ControllerInterfaceBase : public rclcpp_lifecycle::node_interfaces::Lifecy
std::vector<hardware_interface::LoanedCommandInterface> command_interfaces_;
std::vector<hardware_interface::LoanedStateInterface> state_interfaces_;
unsigned int update_rate_ = 0;
unsigned int cm_update_rate_ = 0;
bool is_async_ = false;
std::string urdf_ = "";

Expand Down
3 changes: 0 additions & 3 deletions controller_interface/src/controller_interface_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ return_type ControllerInterfaceBase::init(
node_ = std::make_shared<rclcpp_lifecycle::LifecycleNode>(
controller_name, namespace_, node_options, false); // disable LifecycleNode service interfaces
urdf_ = urdf;
cm_update_rate_ = cm_update_rate;

try
{
Expand Down Expand Up @@ -134,8 +133,6 @@ unsigned int ControllerInterfaceBase::get_update_rate() const { return update_ra

bool ControllerInterfaceBase::is_async() const { return is_async_; }

unsigned int ControllerInterfaceBase::get_cm_update_rate() const { return cm_update_rate_; }

const std::string & ControllerInterfaceBase::get_robot_description() const { return urdf_; }

} // namespace controller_interface
1 change: 0 additions & 1 deletion controller_manager/test/test_controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ TEST_P(TestControllerManagerWithUpdateRates, per_controller_equal_and_higher_upd
// similarly incremented
EXPECT_EQ(test_controller->internal_counter, pre_internal_counter + (2 * cm_->get_update_rate()));
EXPECT_EQ(test_controller->get_update_rate(), ctrl_update_rate);
EXPECT_EQ(test_controller->get_cm_update_rate(), cm_->get_update_rate());

auto deactivate_future = std::async(
std::launch::async, &controller_manager::ControllerManager::switch_controller, cm_,
Expand Down

0 comments on commit 7d5a77a

Please sign in to comment.