Apollo 10.0
自动驾驶开放平台
point_cloud_msg.h
浏览该文件的文档.
1/*********************************************************************************************************************
2Copyright (c) 2020 RoboSense
3All rights reserved
4
5By downloading, copying, installing or using the software you agree to this license. If you do not agree to this
6license, do not download, install, copy or use the software.
7
8License Agreement
9For RoboSense LiDAR SDK Library
10(3-clause BSD License)
11
12Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
13following conditions are met:
14
151. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
16disclaimer.
17
182. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
19disclaimer in the documentation and/or other materials provided with the distribution.
20
213. Neither the names of the RoboSense, nor Suteng Innovation Technology, nor the names of other contributors may be used
22to endorse or promote products derived from this software without specific prior written permission.
23
24THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
25INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31*********************************************************************************************************************/
32
33#pragma once
34#include "modules/drivers/lidar/rslidar/common/common_header.h"
35
36namespace apollo {
37namespace drivers {
38namespace robosense {
39
40template <typename PointT>
41#ifdef _MSC_VER
42struct __declspec(align(16)) PointCloudMsg
43#elif __GNUC__
44struct __attribute__((aligned(16))) PointCloudMsg
45#endif
46{
47 typedef std::vector<PointT> PointCloud;
48 typedef std::shared_ptr<PointCloud> PointCloudPtr;
49 typedef std::shared_ptr<const PointCloud> PointCloudConstPtr;
50 double timestamp = 0.0;
51 std::string frame_id = "";
52 uint32_t seq = 0;
53 uint32_t height = 0;
54 uint32_t width = 0;
55 bool is_dense = false;
57 PointCloudMsg() = default;
58 explicit PointCloudMsg(const PointCloudPtr& ptr) : point_cloud_ptr(ptr)
59 {
60 }
61 typedef std::shared_ptr<PointCloudMsg> Ptr;
62 typedef std::shared_ptr<const PointCloudMsg> ConstPtr;
63};
64
65} // namespace robosense
66} // namespace drivers
67} // namespace apollo
std::shared_ptr< const PointCloud > PointCloudConstPtr
bool is_dense
If is_dense=true, the point cloud does not contain NAN points
std::shared_ptr< const PointCloudMsg > ConstPtr
std::shared_ptr< PointCloud > PointCloudPtr
uint32_t seq
Sequence number of message
std::shared_ptr< PointCloudMsg > Ptr
std::string frame_id
Point cloud frame id
uint32_t height
Height of point cloud
uint32_t width
Width of point cloud
PointCloudPtr point_cloud_ptr
Point cloud pointer
__attribute__((constructor)) void PoolInitialize()
class register implement
Definition arena_queue.h:37