Skip to content

Commit 1ff5a2b

Browse files
authored
Always publish debug messages (#493)
2 parents bfb9a40 + f8c298a commit 1ff5a2b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

bitbots_motion/bitbots_quintic_walk/src/walk_node.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,12 @@ void WalkNode::run() {
185185
pub_support_->publish(support_state);
186186
current_support_foot_ = support_state.phase;
187187
}
188-
189-
// publish debug information
190-
if (config_.node.debug_active) {
191-
publish_debug();
192-
}
193188
}
194189
}
190+
// publish debug information
191+
if (config_.node.debug_active) {
192+
publish_debug();
193+
}
195194
// always publish odometry to not confuse odometry fuser
196195
pub_odometry_->publish(getOdometry());
197196
}

bitbots_motion/bitbots_quintic_walk/src/walk_visualizer.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,10 @@ void WalkVisualizer::publishArrowMarker(std::string name_space, std::string fram
329329
}
330330

331331
void WalkVisualizer::publishWalkMarkers(WalkResponse response) {
332+
// only do something if someone is listing
333+
if (pub_debug_marker_->get_subscription_count() == 0) {
334+
return;
335+
}
332336
// publish markers
333337
visualization_msgs::msg::Marker marker_msg;
334338
marker_msg.header.stamp = node_->now();

0 commit comments

Comments
 (0)