Go to the documentation of this file.
37 #ifndef DIAGNOSTIC_UPDATER__PUBLISHER_HPP_
38 #define DIAGNOSTIC_UPDATER__PUBLISHER_HPP_
43 #include "diagnostic_msgs/msg/diagnostic_array.hpp"
44 #include "diagnostic_updater/update_functions.hpp"
46 #include "rclcpp/publisher.hpp"
47 #include "rclcpp/subscription.hpp"
60 class HeaderlessTopicDiagnostic :
public CompositeDiagnosticTask
107 class TopicDiagnostic :
public HeaderlessTopicDiagnostic
131 error_logger_(rclcpp::get_logger(
"TopicDiagnostic_error_logger"))
146 std::string error_msg =
"tick(void) has been called on a TopicDiagnostic.";
147 error_msg +=
" This is never correct. Use tick(rclcpp::Time &) instead.";
148 RCLCPP_FATAL(error_logger_, error_msg);
165 rclcpp::Logger error_logger_;
176 class DiagnosedPublisher :
public TopicDiagnostic
195 const rclcpp::Publisher<
232 rclcpp::Publisher<diagnostic_msgs::msg::DiagnosticArray>::SharedPtr
242 rclcpp::Publisher<diagnostic_msgs::msg::DiagnosticArray>::SharedPtr
pub)
248 rclcpp::Publisher<diagnostic_msgs::msg::DiagnosticArray>::SharedPtr
publisher_;
252 #endif // DIAGNOSTIC_UPDATER__PUBLISHER_HPP_
void addTask(DiagnosticTask *t)
A diagnostic task that monitors the frequency of an event.
virtual ~DiagnosedPublisher()
A structure that holds the constructor parameters for the TimeStampStatus class.
DiagnosedPublisher(const ros::Publisher &pub, diagnostic_updater::Updater &diag, const diagnostic_updater::FrequencyStatusParam &freq, const diagnostic_updater::TimeStampStatusParam &stamp)
Manages a list of diagnostic tasks, and calls them in a rate-limited manner.
TopicDiagnostic(std::string name, diagnostic_updater::Updater &diag, const diagnostic_updater::FrequencyStatusParam &freq, const diagnostic_updater::TimeStampStatusParam &stamp)
void publish(const boost::shared_ptr< M > &message) const
def message(msg, *args, **kwargs)
virtual void publish(const boost::shared_ptr< T > &message)
void tick(const ros::Time t)
virtual ~TopicDiagnostic()
::std_msgs::Time_< std::allocator< void > > Time
ros::Publisher getPublisher() const
CompositeDiagnosticTask(const std::string name)
void setPublisher(ros::Publisher pub)
void add(const std::string &name, TaskFunction f)
::diagnostic_msgs::DiagnosticArray_< std::allocator< void > > DiagnosticArray
ros::Publisher publisher_
A structure that holds the constructor parameters for the FrequencyStatus class.
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:10