Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
bounding_box_to_detected_object_node.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 LEIDOS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
6 * the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16
17#pragma once
18
19#include <rclcpp/rclcpp.hpp>
20#include <functional>
21#include <autoware_auto_msgs/msg/detected_objects.hpp>
22#include <autoware_auto_msgs/msg/bounding_box_array.hpp>
23
24#include "carma_ros2_utils/carma_lifecycle_node.hpp"
25
27
28class Node : public carma_ros2_utils::CarmaLifecycleNode
29{
30
31 private:
32
33 //subscriber
34 carma_ros2_utils::SubPtr<autoware_auto_msgs::msg::BoundingBoxArray> bbox_sub_;
35
36 //publisher
37 carma_ros2_utils::PubPtr<autoware_auto_msgs::msg::DetectedObjects> object_pub_;
38
39 public:
40
44 explicit Node(const rclcpp::NodeOptions& );
45
51 void bbox_callback(autoware_auto_msgs::msg::BoundingBoxArray::UniquePtr msg);
52
54 // Overrides
56 carma_ros2_utils::CallbackReturn handle_on_configure(const rclcpp_lifecycle::State &);
57
58};
59
60}//bounding_box_to_detected_object
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_
carma_ros2_utils::SubPtr< autoware_auto_msgs::msg::BoundingBoxArray > bbox_sub_
carma_ros2_utils::CallbackReturn handle_on_configure(const rclcpp_lifecycle::State &)