nodelet_utils.hpp
Go to the documentation of this file.
1 #pragma once
2 
71 #include <nodelet/nodelet.h>
72 
80 
81 namespace cras
82 {
83 
88 template <typename BaseNodelet>
89 class NodeletBase :
90  public virtual BaseNodelet, // has to be virtual, most mixins also have BaseNodelet as virtual base class
91  public ::cras::NodeletWithDiagnostics<BaseNodelet>,
92  public ::cras::NodeletWithSharedTfBuffer<BaseNodelet>,
93  public ::cras::ThreadNameUpdatingNodelet<BaseNodelet>,
94  public ::cras::NodeletParamHelper<BaseNodelet>,
95  public ::cras::StatefulNodelet<BaseNodelet>
96 {
97 public:
98  ~NodeletBase() override = default;
99 protected:
100  using BaseNodelet::getName; // for disambiguation because some mixins contain a "using getName()"
101 
102  void onInit() override
103  {
105  }
106 };
107 
111 class Nodelet : public ::cras::NodeletBase<::nodelet::Nodelet>
112 {
113 public:
114  ~Nodelet() override = default;
115 };
116 
117 }
thread_name_updating_nodelet.hpp
ThreadNameUpdatingNodelet mixin allows nodelet to update the name of the thread it gets executed in.
nodelet_with_shared_tf_buffer.hpp
NodeletWithSharedTfBuffer allows you to use a tf2_ros::Buffer provided by the nodelet manager.
stateful_nodelet.hpp
A nodelet mixin that can report that it is being unloaded.
cras
Definition: any.hpp:15
cras::NodeletWithSharedTfBuffer::onInit
virtual void onInit()
nodelet_with_diagnostics.hpp
Helpers for setting up diagnostics for nodelets.
cras::NodeletBase::onInit
void onInit() override
Definition: nodelet_utils.hpp:102
cras::NodeletBase
Base template which adds all defined mixins to BaseNodelet class.
Definition: nodelet_utils.hpp:89
nodelet_aware_tf_buffer.h
TF buffer that can be correctly interrupted by nodelet unload.
cras::NodeletParamHelper
This mixin allows calling the getParam() helpers.
Definition: nodelet_utils/param_helper.hpp:30
cras::NodeletBase::~NodeletBase
~NodeletBase() override=default
cras::NodeletWithDiagnostics
Nodelet mixin that provides helper functions for running a diagnostics updater.
Definition: nodelet_with_diagnostics.hpp:104
log_macros.h
This file adds the missing DELAYED_THROTTLE logging macros for nodelets.
cras::ThreadNameUpdatingNodelet
This mixin allows the nodelet to update the OS name of the thread in which it is currently executing.
Definition: thread_name_updating_nodelet.hpp:21
param_helper.hpp
Utils for getting nodelet parameters.
cras::Nodelet::~Nodelet
~Nodelet() override=default
nodelet.h
cras::Nodelet
Definition: nodelet_utils.hpp:111
cras::NodeletWithSharedTfBuffer
A nodelet mixin that allows to use a tf2_ros::Buffer provided by the nodelet manager (which should sa...
Definition: nodelet_with_shared_tf_buffer.hpp:75
cras::StatefulNodelet
A mixin that can tell when a nodelet is being unloaded.
Definition: stateful_nodelet.hpp:49


cras_cpp_common
Author(s): Martin Pecka
autogenerated on Tue Nov 26 2024 03:49:04