Apollo 11.0
自动驾驶开放平台
velodyne_utility.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2017 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of 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,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
22#pragma once
23
24#include <string>
25#include <vector>
26
27#include "Eigen/Geometry"
29
30namespace apollo {
31namespace localization {
32namespace msf {
33
34namespace velodyne {
35
37 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
39 unsigned int frame_index;
41 double timestamp;
45 std::vector<unsigned char> intensities;
47 std::vector<unsigned char> laser_ids;
49 Eigen::Affine3d pose;
50};
51
52void LoadPcds(const std::string& file_path, const unsigned int frame_index,
53 const Eigen::Affine3d& pose, VelodyneFrame* velodyne_frame,
54 const bool is_global = false);
55
56void LoadPcds(const std::string& file_path, const unsigned int frame_index,
57 const Eigen::Affine3d& pose,
59 std::vector<unsigned char>* intensities, bool is_global = false);
60
62void LoadPcdPoses(const std::string& file_path,
64 std::vector<double>* timestamps);
65
67void LoadPcdPoses(const std::string& file_path,
69 std::vector<double>* timestamps,
70 std::vector<unsigned int>* pcd_indices);
71
73void LoadPosesAndStds(const std::string& file_path,
76 std::vector<double>* timestamps);
77
78// /**@brief Save the PCD poses with their timestamps. */
79// void save_pcd_poses(std::string file_path,
80// const ::apollo::common::EigenAffine3dVec& poses,
81// const std::vector<double>& timestamps);
82
84bool LoadExtrinsic(const std::string& file_path, Eigen::Affine3d* extrinsic);
85
86} // namespace velodyne
87} // namespace msf
88} // namespace localization
89} // namespace apollo
EigenVector< Eigen::Affine3d > EigenAffine3dVec
Definition eigen_defs.h:47
EigenVector< Eigen::Vector3d > EigenVector3dVec
Definition eigen_defs.h:46
void LoadPcds(const std::string &file_path, const unsigned int frame_index, const Eigen::Affine3d &pose, VelodyneFrame *velodyne_frame, bool is_global)
bool LoadExtrinsic(const std::string &file_path, Eigen::Affine3d *extrinsic)
Load the velodyne extrinsic from a YAML file.
void LoadPosesAndStds(const std::string &file_path, ::apollo::common::EigenAffine3dVec *poses, ::apollo::common::EigenVector3dVec *stds, std::vector< double > *timestamps)
Load poses and stds their timestamps.
void LoadPcdPoses(const std::string &file_path, ::apollo::common::EigenAffine3dVec *poses, std::vector< double > *timestamps)
Load the PCD poses with their timestamps.
class register implement
Definition arena_queue.h:37
EIGEN_MAKE_ALIGNED_OPERATOR_NEW unsigned int frame_index
The frame index.
::apollo::common::EigenVector3dVec pt3ds
The 3D point cloud in this frame.
std::vector< unsigned char > intensities
The laser reflection values in this frames.
std::vector< unsigned char > laser_ids
The laser IDs.
Eigen::Affine3d pose
The pose of the frame.