Autoware.Auto
cluster_projection_node.hpp
Go to the documentation of this file.
1 // Copyright 2021 The Autoware Foundation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //    http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 // Co-developed by Tier IV, Inc. and Apex.AI, Inc.
16 
20 
21 #ifndef CLUSTER_PROJECTION_NODE__CLUSTER_PROJECTION_NODE_HPP_
22 #define CLUSTER_PROJECTION_NODE__CLUSTER_PROJECTION_NODE_HPP_
23 
24 #include <autoware_auto_perception_msgs/msg/classified_roi_array.hpp>
25 #include <autoware_auto_perception_msgs/msg/detected_objects.hpp>
27 #include <rclcpp/rclcpp.hpp>
28 #include <tracking/projection.hpp>
29 #include <tf2/buffer_core.h>
30 #include <tf2_ros/transform_listener.h>
31 
32 #include <memory>
33 #include <string>
34 
35 namespace autoware
36 {
37 namespace cluster_projection_node
38 {
39 
41 class CLUSTER_PROJECTION_NODE_PUBLIC ClusterProjectionNode : public rclcpp::Node
42 {
43 public:
44  explicit ClusterProjectionNode(const rclcpp::NodeOptions & options);
45 
47  void cluster_callback(
48  autoware_auto_perception_msgs::msg::DetectedObjects::ConstSharedPtr objects_msg);
49 
50 private:
51  rclcpp::Subscription<autoware_auto_perception_msgs::msg::DetectedObjects>::SharedPtr
52  m_clusters_sub;
53  rclcpp::Publisher<autoware_auto_perception_msgs::msg::ClassifiedRoiArray>::SharedPtr
54  m_projection_pub;
56  tf2::BufferCore m_buffer;
57  tf2_ros::TransformListener m_tf_listener;
58  std::string m_camera_frame;
59 };
60 } // namespace cluster_projection_node
61 } // namespace autoware
62 
63 #endif // CLUSTER_PROJECTION_NODE__CLUSTER_PROJECTION_NODE_HPP_
projection.hpp
autoware::cluster_projection_node::ClusterProjectionNode
Class receives object clusters, projects them and publisheas the projections as a roi array.
Definition: cluster_projection_node.hpp:41
autoware
This file defines the lanelet2_map_provider_node class.
Definition: quick_sort.hpp:24
autoware::perception::tracking::CameraModel
This model represents a camera in 3D space and can project 3D shapes into an image.
Definition: projection.hpp:60
visibility_control.hpp