#include <sdsm_to_detection_list_component.hpp>
◆ input_msg_shared_pointer
◆ input_msg_type
◆ output_msg_type
◆ SdsmToDetectionListNode()
carma_cooperative_perception::SdsmToDetectionListNode::SdsmToDetectionListNode |
( |
const rclcpp::NodeOptions & |
options | ) |
|
|
inlineexplicit |
Definition at line 38 of file sdsm_to_detection_list_component.hpp.
39 : CarmaLifecycleNode{options},
40 publisher_{create_publisher<output_msg_type>(
"output/detections", 1)},
44 "input/georeference", 1,
45 [
this](std_msgs::msg::String::SharedPtr msg_ptr) {
georeference_ = msg_ptr->data; })},
47 "input/cdasim_clock", 1,
48 [
this](rosgraph_msgs::msg::Clock::ConstSharedPtr msg_ptr) {
cdasim_time_ = msg_ptr->clock; })}
49 {
50 }
rclcpp::Subscription< input_msg_type >::SharedPtr subscription_
rclcpp::Subscription< std_msgs::msg::String >::SharedPtr georeference_subscription_
rclcpp::Publisher< output_msg_type >::SharedPtr publisher_
std::string georeference_
rclcpp::Subscription< rosgraph_msgs::msg::Clock >::SharedPtr cdasim_clock_sub_
auto sdsm_msg_callback(const input_msg_type &msg) const -> void
std::optional< rclcpp::Time > cdasim_time_
typename input_msg_type::SharedPtr input_msg_shared_pointer
References sdsm_msg_callback().
◆ sdsm_msg_callback()
auto carma_cooperative_perception::SdsmToDetectionListNode::sdsm_msg_callback |
( |
const input_msg_type & |
msg | ) |
const -> void
|
|
inline |
Definition at line 52 of file sdsm_to_detection_list_component.hpp.
53 {
54 try {
56
58
60
61 for (auto & detection : detection_list_msg.detections) {
62 detection.header.stamp = rclcpp::Time(detection.header.stamp) + time_delta;
63 }
64 }
65
67 } catch (const std::runtime_error & e) {
68 RCLCPP_ERROR_STREAM(get_logger(), "Failed to convert SDSM to detection list: " << e.what());
69 }
70 }
auto to_detection_list_msg(const carma_v2x_msgs::msg::SensorDataSharingMessage &sdsm, std::string_view georeference) -> carma_cooperative_perception_interfaces::msg::DetectionList
References carma_cooperative_perception::to_detection_list_msg().
Referenced by SdsmToDetectionListNode().
◆ cdasim_clock_sub_
rclcpp::Subscription<rosgraph_msgs::msg::Clock>::SharedPtr carma_cooperative_perception::SdsmToDetectionListNode::cdasim_clock_sub_ |
|
private |
◆ cdasim_time_
std::optional<rclcpp::Time> carma_cooperative_perception::SdsmToDetectionListNode::cdasim_time_ {std::nullopt} |
|
private |
◆ georeference_
std::string carma_cooperative_perception::SdsmToDetectionListNode::georeference_ {""} |
|
private |
◆ georeference_subscription_
rclcpp::Subscription<std_msgs::msg::String>::SharedPtr carma_cooperative_perception::SdsmToDetectionListNode::georeference_subscription_ |
|
private |
◆ publisher_
rclcpp::Publisher<output_msg_type>::SharedPtr carma_cooperative_perception::SdsmToDetectionListNode::publisher_ |
|
private |
◆ subscription_
rclcpp::Subscription<input_msg_type>::SharedPtr carma_cooperative_perception::SdsmToDetectionListNode::subscription_ |
|
private |
The documentation for this class was generated from the following file: