Apollo 9.0
自动驾驶开放平台
print_debug_info.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2022 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
17#pragma once
18
19#include <map>
20#include <string>
21#include <utility>
22#include <vector>
23
24#include "cyber/common/log.h"
26namespace apollo {
27namespace planning {
28
30 public:
32 explicit PrintPoints(std::string id) : id_(id) {}
36 void set_id(std::string id);
40 void AddPoint(double x, double y);
44 void PrintToLog();
45
46 private:
47 std::string id_;
48 std::vector<std::pair<double, double>> points;
49};
50
52 public:
56 void AddPoint(std::string key, double x, double y);
57 void AddPoint(std::string key, const common::math::Vec2d& point);
58 void AddPoint(std::string key,
59 const std::vector<common::math::Vec2d>& points);
60 void PrintToLog();
61
62 private:
63 std::map<std::string, PrintPoints> curve_map_;
64};
65class PrintBox {
66 public:
67 explicit PrintBox(std::string id) : id_(id) {}
68 void AddAdcBox(double x, double y, double heading,
69 bool is_rear_axle_point = true);
70 void PrintToLog();
71
72 private:
73 std::string id_;
74 // x,y, theta, lenth ,width
75 std::vector<std::vector<double>> box_points;
76};
77
78} // namespace planning
79} // namespace apollo
Implements a class of 2-dimensional vectors.
Definition vec2d.h:42
void AddAdcBox(double x, double y, double heading, bool is_rear_axle_point=true)
void AddPoint(std::string key, double x, double y)
add point to curve key
void set_id(std::string id)
set curve id
void PrintToLog()
print curve to log
void AddPoint(double x, double y)
add points to curve
Planning module main class.
class register implement
Defines the Vec2d class.