17#include <geometry/bounding_box/bounding_box_common.hpp>
21 using std::placeholders::_1;
22 using std::placeholders::_2;
23 using std::placeholders::_3;
26 : carma_ros2_utils::CarmaLifecycleNode(options)
33 bbox_sub_= create_subscription<autoware_auto_msgs::msg::BoundingBoxArray>(
"bounding_boxes",10,
37 object_pub_= create_publisher<autoware_auto_msgs::msg::DetectedObjects>(
"lidar_detected_objects", 10);
39 return CallbackReturn::SUCCESS;
44 autoware_auto_msgs::msg::DetectedObject obj;
48 obj = autoware::common::geometry::bounding_box::details::make_detected_object(box);
50 obj.kinematics.orientation.x = box.orientation.x;
51 obj.kinematics.orientation.y = box.orientation.y;
52 obj.kinematics.orientation.z = box.orientation.z;
53 obj.kinematics.orientation.w = box.orientation.w;
54 obj.kinematics.orientation_availability = autoware_auto_msgs::msg::DetectedObjectKinematics::SIGN_UNKNOWN;
61 autoware_auto_msgs::msg::DetectedObjects objects;
63 objects.header = msg->header;
64 objects.objects.reserve(msg->boxes.size());
66 for (
const auto& bb : msg->boxes) {
77#include "rclcpp_components/register_node_macro.hpp"
void bbox_callback(autoware_auto_msgs::msg::BoundingBoxArray::UniquePtr msg)
Callback for bounding box data to be converted. Publishes a DetectedObjects message from the bounding...
carma_ros2_utils::PubPtr< autoware_auto_msgs::msg::DetectedObjects > object_pub_
Node(const rclcpp::NodeOptions &)
carma_ros2_utils::SubPtr< autoware_auto_msgs::msg::BoundingBoxArray > bbox_sub_
carma_ros2_utils::CallbackReturn handle_on_configure(const rclcpp_lifecycle::State &)
autoware_auto_msgs::msg::DetectedObject detected_obj_from_bounding_box(const autoware_auto_msgs::msg::BoundingBox &box)