Skip to content

Commit

Permalink
rename macro to REGISTER_ROS2_CONTROL_INTROSPECTION
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Dec 5, 2024
1 parent b77fadc commit c4f104c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions controller_interface/src/controller_interface_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ const rclcpp_lifecycle::State & ControllerInterfaceBase::configure()
thread_priority);
async_handler_->start_thread();
}
REGISTER_DEFAULT_INTROSPECTION("total_triggers", &trigger_stats_.total_triggers);
REGISTER_DEFAULT_INTROSPECTION("failed_triggers", &trigger_stats_.failed_triggers);
REGISTER_ROS2_CONTROL_INTROSPECTION("total_triggers", &trigger_stats_.total_triggers);
REGISTER_ROS2_CONTROL_INTROSPECTION("failed_triggers", &trigger_stats_.failed_triggers);
trigger_stats_.reset();

return get_node()->configure();
Expand Down
5 changes: 1 addition & 4 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,7 @@ ControllerManager::ControllerManager(
init_controller_manager();
}

ControllerManager::~ControllerManager()
{
CLEAR_ALL_REGISTRIES();
}
ControllerManager::~ControllerManager() { CLEAR_ALL_REGISTRIES(); }

void ControllerManager::init_controller_manager()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace hardware_interface
constexpr char DEFAULT_REGISTRY_KEY[] = "ros2_control";
constexpr char DEFAULT_INTROSPECTION_TOPIC[] = "~/introspection_data";

#define REGISTER_DEFAULT_INTROSPECTION(ID, ENTITY) \
#define REGISTER_ROS2_CONTROL_INTROSPECTION(ID, ENTITY) \
REGISTER_ENTITY( \
hardware_interface::DEFAULT_REGISTRY_KEY, get_name() + "." + ID, ENTITY, \
&stats_registrations_, false)
Expand Down

0 comments on commit c4f104c

Please sign in to comment.