Autoware.Auto
voxel_cloud_node.hpp
Go to the documentation of this file.
1 // Copyright 2017-2019 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 #ifndef VOXEL_GRID_NODES__VOXEL_CLOUD_NODE_HPP_
21 #define VOXEL_GRID_NODES__VOXEL_CLOUD_NODE_HPP_
22 
24 #include <rclcpp/rclcpp.hpp>
25 #include <common/types.hpp>
26 #include <memory>
27 #include <string>
28 
30 
31 namespace autoware
32 {
33 namespace perception
34 {
35 namespace filters
36 {
38 namespace voxel_grid_nodes
39 {
40 rmw_qos_durability_policy_t parse_durability_parameter(
41  const std::string & durability);
42 
44 class VOXEL_GRID_NODES_PUBLIC VoxelCloudNode : public rclcpp::Node
45 {
46 public:
50  const rclcpp::NodeOptions & node_options);
51 
53  void callback(const sensor_msgs::msg::PointCloud2::SharedPtr msg);
54 
55 private:
59  void VOXEL_GRID_NODES_LOCAL init(const voxel_grid::Config & cfg, const bool8_t is_approximate);
60 
61  using Message = sensor_msgs::msg::PointCloud2;
62 
63  const rclcpp::Subscription<Message>::SharedPtr m_sub_ptr;
64  const std::shared_ptr<rclcpp::Publisher<Message>> m_pub_ptr;
65  std::unique_ptr<algorithm::VoxelCloudBase> m_voxelgrid_ptr;
66  bool8_t m_has_failed;
67 }; // VoxelCloudNode
68 } // namespace voxel_grid_nodes
69 } // namespace filters
70 } // namespace perception
71 } // namespace autoware
72 
73 #endif // VOXEL_GRID_NODES__VOXEL_CLOUD_NODE_HPP_
types.hpp
This file includes common type definition.
autoware::perception::filters::voxel_grid_nodes::VoxelCloudNode
Boilerplate node that subscribes to point clouds and publishes a downsampled version.
Definition: voxel_cloud_node.hpp:44
autoware::common::types::bool8_t
bool bool8_t
Definition: types.hpp:39
autoware
This file defines the lanelet2_map_provider_node class.
Definition: quick_sort.hpp:24
voxel_cloud_base.hpp
This file defines the algorithmic interface for applying voxel grid downsampling to a PointCloud2 mes...
autoware::perception::filters::voxel_grid::Config
A configuration class for the VoxelGrid data structure, also includes some helper functionality for c...
Definition: perception/filters/voxel_grid/include/voxel_grid/config.hpp:52
autoware::perception::filters::filter_node_base::PointCloud2
sensor_msgs::msg::PointCloud2 PointCloud2
Definition: filter_node_base.cpp:32
autoware::perception::filters::voxel_grid_nodes::parse_durability_parameter
rmw_qos_durability_policy_t parse_durability_parameter(const std::string &durability)
Definition: voxel_cloud_node.cpp:121