Apollo 11.0
自动驾驶开放平台
open_space_trajectory_optimizer_util.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2023 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
21#pragma once
22
23#include <vector>
24#include <utility>
25#include "cyber/common/log.h"
26
27
32
34
35namespace apollo {
36namespace planning {
37
38// park generic
39
41 public:
45 static bool BoxOverlapObstacles(
46 const common::math::Box2d& bounding_box,
47 const std::vector<std::vector<common::math::LineSegment2d>>
48 obstacles_linesegments_vec);
49
53 static void GeneratePointBox(
54 const std::vector<std::vector<common::math::LineSegment2d>>
55 obstacles_linesegments_vec,
56 const std::vector<std::pair<double, double>>& result,
57 std::vector<std::vector<common::math::Vec2d>>& box_vec);
58
59 static void PathPointNormalizing(
60 double rotate_angle, const common::math::Vec2d& translate_origin,
61 double* x, double* y, double* phi);
62
63 static void PathPointDeNormalizing(
64 double rotate_angle, const common::math::Vec2d& translate_origin,
65 double* x, double* y, double* phi);
66};
67
68} // namespace planning
69} // namespace apollo
The class of Box2d.
Rectangular (undirected) bounding box in 2-D.
Definition box2d.h:52
Implements a class of 2-dimensional vectors.
Definition vec2d.h:42
static void PathPointNormalizing(double rotate_angle, const common::math::Vec2d &translate_origin, double *x, double *y, double *phi)
static bool BoxOverlapObstacles(const common::math::Box2d &bounding_box, const std::vector< std::vector< common::math::LineSegment2d > > obstacles_linesegments_vec)
check if box collision with obstacles
static void PathPointDeNormalizing(double rotate_angle, const common::math::Vec2d &translate_origin, double *x, double *y, double *phi)
static void GeneratePointBox(const std::vector< std::vector< common::math::LineSegment2d > > obstacles_linesegments_vec, const std::vector< std::pair< double, double > > &result, std::vector< std::vector< common::math::Vec2d > > &box_vec)
check if box collision with obstacles
Planning module main class.
Math-related util functions.
Define the LineSegment2d class.
class register implement
Definition arena_queue.h:37
Defines the Vec2d class.