14 #ifndef POSE_BROADCASTER__POSE_BROADCASTER_HPP_
15 #define POSE_BROADCASTER__POSE_BROADCASTER_HPP_
22 #include "controller_interface/controller_interface.hpp"
23 #include "geometry_msgs/msg/pose_stamped.hpp"
24 #include "pose_broadcaster/visibility_control.h"
25 #include "pose_broadcaster_parameters.hpp"
26 #include "rclcpp/publisher.hpp"
27 #include "rclcpp_lifecycle/state.hpp"
28 #include "realtime_tools/realtime_publisher.hpp"
29 #include "semantic_components/pose_sensor.hpp"
30 #include "tf2_msgs/msg/tf_message.hpp"
32 namespace pose_broadcaster
44 POSE_BROADCASTER_PUBLIC controller_interface::CallbackReturn
on_init()
override;
46 POSE_BROADCASTER_PUBLIC controller_interface::CallbackReturn on_configure(
47 const rclcpp_lifecycle::State & previous_state)
override;
49 POSE_BROADCASTER_PUBLIC controller_interface::CallbackReturn on_activate(
50 const rclcpp_lifecycle::State & previous_state)
override;
52 POSE_BROADCASTER_PUBLIC controller_interface::CallbackReturn on_deactivate(
53 const rclcpp_lifecycle::State & previous_state)
override;
55 POSE_BROADCASTER_PUBLIC controller_interface::return_type
update(
56 const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
59 std::shared_ptr<ParamListener> param_listener_;
62 std::unique_ptr<semantic_components::PoseSensor> pose_sensor_;
64 rclcpp::Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr pose_publisher_;
65 std::unique_ptr<realtime_tools::RealtimePublisher<geometry_msgs::msg::PoseStamped>>
68 std::optional<rclcpp::Duration> tf_publish_period_;
69 rclcpp::Time tf_last_publish_time_{0, 0, RCL_CLOCK_UNINITIALIZED};
70 rclcpp::Publisher<tf2_msgs::msg::TFMessage>::SharedPtr tf_publisher_;
71 std::unique_ptr<realtime_tools::RealtimePublisher<tf2_msgs::msg::TFMessage>>
72 realtime_tf_publisher_;
Definition: controller_interface.hpp:28
Definition: pose_broadcaster.hpp:36
POSE_BROADCASTER_PUBLIC controller_interface::InterfaceConfiguration state_interface_configuration() const override
Get configuration for controller's required state interfaces.
Definition: pose_broadcaster.cpp:35
POSE_BROADCASTER_PUBLIC controller_interface::return_type update(const rclcpp::Time &time, const rclcpp::Duration &period) override
Definition: pose_broadcaster.cpp:138
POSE_BROADCASTER_PUBLIC controller_interface::CallbackReturn on_init() override
Extending interface with initialization method which is individual for each controller.
Definition: pose_broadcaster.cpp:44
POSE_BROADCASTER_PUBLIC controller_interface::InterfaceConfiguration command_interface_configuration() const override
Get configuration for controller's required command interfaces.
Definition: pose_broadcaster.cpp:27
Configuring what command/state interfaces to claim.
Definition: controller_interface_base.hpp:58