forked from autowarefoundation/autoware_universe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode.hpp
53 lines (42 loc) · 1.83 KB
/
node.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright 2018 Autoware Foundation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef NODE_HPP_
#define NODE_HPP_
#include "shape_estimation/shape_estimator.hpp"
#include <rclcpp/rclcpp.hpp>
#include <tier4_autoware_utils/ros/debug_publisher.hpp>
#include <tier4_autoware_utils/system/stop_watch.hpp>
#include <autoware_auto_perception_msgs/msg/detected_objects.hpp>
#include <tier4_perception_msgs/msg/detected_objects_with_feature.hpp>
#include <memory>
using autoware_auto_perception_msgs::msg::DetectedObjects;
using tier4_perception_msgs::msg::DetectedObjectsWithFeature;
class ShapeEstimationNode : public rclcpp::Node
{
private:
// ros
rclcpp::Publisher<DetectedObjectsWithFeature>::SharedPtr pub_;
rclcpp::Subscription<DetectedObjectsWithFeature>::SharedPtr sub_;
// debug publisher
std::unique_ptr<tier4_autoware_utils::StopWatch<std::chrono::milliseconds>> stop_watch_ptr_;
std::unique_ptr<tier4_autoware_utils::DebugPublisher> processing_time_publisher_;
void callback(const DetectedObjectsWithFeature::ConstSharedPtr input_msg);
std::unique_ptr<ShapeEstimator> estimator_;
bool use_vehicle_reference_yaw_;
bool use_vehicle_reference_shape_size_;
bool keep_supper_large_vehicle_;
public:
explicit ShapeEstimationNode(const rclcpp::NodeOptions & node_options);
};
#endif // NODE_HPP_