Skip to content

Commit 560fb9f

Browse files
authored
[JSB] cleanup the activation error message (#1584)
1 parent 210358b commit 560fb9f

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

joint_state_broadcaster/src/joint_state_broadcaster.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,23 +179,14 @@ controller_interface::CallbackReturn JointStateBroadcaster::on_activate(
179179
if (!init_joint_data())
180180
{
181181
RCLCPP_ERROR(
182-
get_node()->get_logger(), "None of requested interfaces exist. Controller will not run.");
182+
get_node()->get_logger(),
183+
"Error initializing joint data. JointStateBroadcaster will not run.");
183184
return CallbackReturn::ERROR;
184185
}
185186

186187
init_joint_state_msg();
187188
init_dynamic_joint_state_msg();
188189

189-
if (
190-
!use_all_available_interfaces() &&
191-
state_interfaces_.size() != (params_.joints.size() * params_.interfaces.size()))
192-
{
193-
RCLCPP_WARN(
194-
get_node()->get_logger(),
195-
"Not all requested interfaces exists. "
196-
"Check ControllerManager output for more detailed information.");
197-
}
198-
199190
return CallbackReturn::SUCCESS;
200191
}
201192

@@ -230,6 +221,7 @@ bool JointStateBroadcaster::init_joint_data()
230221
joint_names_.clear();
231222
if (state_interfaces_.empty())
232223
{
224+
RCLCPP_ERROR(get_node()->get_logger(), "No state interfaces found to publish.");
233225
return false;
234226
}
235227

0 commit comments

Comments
 (0)