include
cras_topic_tools
relay.h
Go to the documentation of this file.
1
#pragma once
2
3
// SPDX-License-Identifier: BSD-3-Clause
4
// SPDX-FileCopyrightText: Czech Technical University in Prague
5
13
#include <memory>
14
15
#include <
ros/message_event.h
>
16
#include <
ros/publisher.h
>
17
#include <topic_tools/shape_shifter.h>
18
19
#include <
cras_cpp_common/nodelet_utils.hpp
>
20
21
#include <
cras_topic_tools/generic_lazy_pubsub.hpp
>
22
23
namespace
cras
24
{
25
57
class
RelayNodelet
:
public
::cras::Nodelet
58
{
59
protected
:
61
::std::unique_ptr<::cras::GenericLazyPubSub>
pubSub
;
62
63
void
onInit
()
override
;
64
70
virtual
void
processMessage
(
71
const ::ros::MessageEvent<const ::topic_tools::ShapeShifter>& event, ::
ros::Publisher
& pub);
72
};
73
74
}
cras::RelayNodelet::processMessage
virtual void processMessage(const ::ros::MessageEvent< const ::topic_tools::ShapeShifter > &event, ::ros::Publisher &pub)
Republish the received message.
Definition:
relay.cpp:62
ros::Publisher
cras::RelayNodelet::pubSub
::std::unique_ptr<::cras::GenericLazyPubSub > pubSub
The lazy pair of subscriber and publisher.
Definition:
relay.h:61
cras
publisher.h
cras::RelayNodelet
Nodelet for relaying messages on a different topic.
Definition:
relay.h:57
cras::RelayNodelet::onInit
void onInit() override
Definition:
relay.cpp:29
generic_lazy_pubsub.hpp
Lazy subscriber that subscribes only when a paired publisher has subscribers. Version for unknown mes...
cras::Nodelet
message_event.h
nodelet_utils.hpp
cras_topic_tools
Author(s): Martin Pecka
autogenerated on Sun Jan 5 2025 03:50:49