MCPcopy Create free account
hub / github.com/ROBOTIS-GIT/turtlebot3 / publish_timer

Method publish_timer

turtlebot3_node/src/turtlebot3.cpp:232–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232void TurtleBot3::publish_timer(const std::chrono::milliseconds timeout)
233{
234 publish_timer_ = this->create_wall_timer(
235 timeout,
236 [this]() -> void
237 {
238 rclcpp::Time now = this->now();
239
240 dxl_sdk_wrapper_->read_data_set();
241
242 for (const auto & sensor : sensors_) {
243 sensor->publish(now, dxl_sdk_wrapper_);
244 }
245 }
246 );
247}
248
249void TurtleBot3::heartbeat_timer(const std::chrono::milliseconds timeout)
250{

Callers

nothing calls this directly

Calls 2

read_data_setMethod · 0.80
publishMethod · 0.45

Tested by

no test coverage detected