Open
Description
Is your feature request related to a problem? Please describe.
JTC for instance error log when it is not active:
I would like something equivalent for ForwardCommandController
Describe the solution you'd like
I've tried some solutions, but not quite sure why this does not work
joints_command_subscriber_ = this->get_node()->create_subscription<
std_msgs::msg::Float64MultiArray>(
"commands", rclcpp::SystemDefaultsQoS(),
[this](const forward_command_controller::CmdType::SharedPtr msg) {
auto current_state = this->get_node()->get_current_state().id();
if (current_state != lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE) {
RCLCPP_WARN(this->get_node()->get_logger(),
"Received command while controller is not active");
return;
}
rt_command_ptr_.writeFromNonRT(msg);
});
Describe alternatives you've considered
N/A
Additional context
N/A