Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ros2-humble] change(diagnosed-publisher): allow specifying node clock (#340) #370

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions diagnostic_updater/include/diagnostic_updater/publisher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,9 @@ class DiagnosedPublisher : public TopicDiagnostic
const typename PublisherT::SharedPtr & pub,
diagnostic_updater::Updater & diag,
const diagnostic_updater::FrequencyStatusParam & freq,
const diagnostic_updater::TimeStampStatusParam & stamp)
: TopicDiagnostic(pub->get_topic_name(), diag, freq, stamp),
const diagnostic_updater::TimeStampStatusParam & stamp,
const rclcpp::Clock::SharedPtr & clock = std::make_shared<rclcpp::Clock>())
: TopicDiagnostic(pub->get_topic_name(), diag, freq, stamp, clock),
publisher_(pub)
{
static_assert(has_header<MessageT>::value, "Message type has to have a header.");
Expand Down
Loading