forked from YoungPeter/HAStar_ParkingPlanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic_type.h
78 lines (69 loc) · 1.4 KB
/
basic_type.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef BASIC_TYPE
#define BASIC_TYPE
#include <vector>
struct VehicleParam {
double front_edge_to_center;
double back_edge_to_center;
double length;
double width;
double max_steer_angle;
double steer_ratio;
double wheel_base;
};
struct WarmStartConfig {
// Hybrid a star for warm start
double xy_grid_resolution;
double phi_grid_resolution;
int next_node_num;
double step_size;
double traj_forward_penalty;
double traj_back_penalty;
double traj_gear_switch_penalty;
double traj_steer_penalty;
double traj_steer_change_penalty;
// Grid a star for heuristic
double grid_a_star_xy_resolution;
double node_radius;
double delta_t;
// PiecewiseJerkSpeedOptimizerConfig s_curve_config = 17;
};
struct Vec2d {
double x = 0.0;
double y = 0.0;
};
struct Pos3d {
double x;
double y;
double phi;
};
struct LineSegment2d {
Vec2d start;
Vec2d end;
Vec2d unit_direction;
double heading = 0.0;
double length = 0.0;
};
struct CurvePath {
double x;
double y;
double phi;
double dist;
double radius;
};
struct Box2d {
Vec2d center;
double length = 0.0;
double width = 0.0;
double half_length = 0.0;
double half_width = 0.0;
double heading = 0.0;
double cos_heading = 1.0;
double sin_heading = 0.0;
};
struct ParkingScenario {
Pos3d start_pos;
Pos3d end_pos;
std::vector<double> boundary;
std::vector<std::vector<Vec2d>> obstacles;
};
#endif