Skip to content

Commit 2948580

Browse files
authored
Change multiple object tracker timer (#2261)
The timer was a wall timer, which is tied to system time. The new general timer can switch between system and simulation time.
1 parent 4651dc4 commit 2948580

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

carma_cooperative_perception/src/multiple_object_tracker_component.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ auto MultipleObjectTrackerNode::handle_on_activate(
354354
}
355355

356356
const std::chrono::duration<double, std::nano> period_ns{mot::remove_units(execution_period_)};
357-
pipeline_execution_timer_ = create_wall_timer(period_ns, [this] { execute_pipeline(); });
357+
pipeline_execution_timer_ =
358+
rclcpp::create_timer(this, this->get_clock(), period_ns, [this] { execute_pipeline(); });
358359

359360
RCLCPP_INFO(get_logger(), "Lifecycle transition: successfully activated");
360361

0 commit comments

Comments
 (0)