Commit 3a20e7e
feat: [codecov/refactoring] [simple_pure_pursuit] isolation of core logics, and full revamp of unit tests (#1182)
* init simpupu core logics module with Apache license
* init simpupu core logics module with Apache license
* init simpupu core logics header with Apache license
* defined simpupu params struct
* define public funcs
* defined private funcs and entities for core logics
* implement simple pure pursuit constructor and param setter
* isolate create_control_command's core logics from the mess of ROS2+core logics in original node module
* isolatecalc_longitudinal_control the same way
* isolate calc_lateral_coltrol the same way
* modified calc_lateral_control as for now completely immitates the original func (after discussing with the team)
* refactored the simpupu main header - removing all core logics, leaving only ROS-related
* refactored the simpupu main module - same way as headers - only ROS2 related + core logics inference
* quick fixes based for clang compiler suggests
* adapt cmakelists, package xml and header of core logics, thus wrapping up step 2
* test_simple_pure_pursuit.cpp - first make it work on build
* removed the old test cases in unit test module because the old ones are bundled and obsoleted with new architecture
* added test 1 of perfectly normal case ahppy tracking
* added test 2 of strong terminal brake at trajectory goal
* added test 3 of strong terminal brake when trajectory is wayyyyyyyy too short
* added test 4 of overriding with external target velocity
* adeed test 5 of lateral offset correcting
* added test 6 of lookahead distance clamping (the current calc logic is weird so I had to resort to infinity check)
* added final branch coverage case of lookahead point search exceeding trajectory length case
* some final touchups, all good I guess
* style(pre-commit): autofix
* deal with spell-check-differential
* fixed that cpplink precommit test of you dont need a ; after a } thingy
* style(pre-commit): autofix
* fixed that cpplint precommit of Add #include <memory> for make_unique<> [build/include_what_you_use]
* change all to (yeah lol right, tbf I've used English for too long to the point of not thinking twice about plural single forms of these words
* style(pre-commit): autofix
* refactoring the file/class names as Ishikawa-san suggested
* style(pre-commit): autofix
* bring trajectory fallback to core logics
* prevent node to return early upon false validation
* dropping set_params() for ummitability
* successful build
* rebased, gonna add the precommit lint locally later
* style(pre-commit): autofix
* rebase
* style(pre-commit): autofix
* fixed spellcheck differentials
* unified namespaces
* Update control/autoware_simple_pure_pursuit/src/simple_pure_pursuit.hpp
Co-authored-by: Takayuki AKAMINE <38586589+takam5f2@users.noreply.github.com>
* [akamine] redundant function set_params() at header
* [akamine] remove branch redundancy in clongitudinal control command core logic
* [akamine] name the magic number -10.0 as terminal_brake_accel at simple_pure_pursuit logic header and apply it to whole node
* [akamine] fix typo EXCEPT=>EXPECT
* [akamine] fix class name in docstring
* [akamine] node name inconsistency fix
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Takayuki AKAMINE <38586589+takam5f2@users.noreply.github.com>1 parent 883f77c commit 3a20e7e
9 files changed
Lines changed: 417 additions & 213 deletions
File tree
- control/autoware_simple_pure_pursuit
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
Lines changed: 41 additions & 70 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 25 | + | |
42 | 26 | | |
43 | | - | |
| 27 | + | |
| 28 | + | |
44 | 29 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 30 | | |
62 | 31 | | |
63 | | - | |
64 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
65 | 35 | | |
66 | | - | |
| 36 | + | |
67 | 37 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 38 | | |
72 | 39 | | |
73 | 40 | | |
| |||
77 | 44 | | |
78 | 45 | | |
79 | 46 | | |
80 | | - | |
81 | | - | |
| 47 | + | |
| 48 | + | |
82 | 49 | | |
83 | 50 | | |
84 | 51 | | |
85 | | - | |
| 52 | + | |
86 | 53 | | |
87 | | - | |
| 54 | + | |
88 | 55 | | |
89 | 56 | | |
90 | 57 | | |
91 | | - | |
| 58 | + | |
92 | 59 | | |
93 | | - | |
94 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
95 | 63 | | |
96 | | - | |
| 64 | + | |
97 | 65 | | |
98 | 66 | | |
99 | 67 | | |
100 | 68 | | |
101 | 69 | | |
102 | 70 | | |
103 | 71 | | |
104 | | - | |
| 72 | + | |
105 | 73 | | |
106 | | - | |
107 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
108 | 77 | | |
109 | | - | |
110 | | - | |
111 | 78 | | |
| 79 | + | |
| 80 | + | |
112 | 81 | | |
113 | 82 | | |
114 | | - | |
| 83 | + | |
115 | 84 | | |
116 | 85 | | |
117 | | - | |
| 86 | + | |
118 | 87 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
122 | 92 | | |
123 | | - | |
| 93 | + | |
124 | 94 | | |
125 | | - | |
| 95 | + | |
126 | 96 | | |
127 | | - | |
| 97 | + | |
128 | 98 | | |
129 | 99 | | |
130 | | - | |
| 100 | + | |
131 | 101 | | |
132 | | - | |
| 102 | + | |
133 | 103 | | |
134 | | - | |
| 104 | + | |
135 | 105 | | |
136 | 106 | | |
137 | | - | |
| 107 | + | |
138 | 108 | | |
139 | 109 | | |
140 | 110 | | |
| 111 | + | |
141 | 112 | | |
142 | 113 | | |
143 | 114 | | |
| 115 | + | |
144 | 116 | | |
145 | 117 | | |
146 | 118 | | |
147 | | - | |
| 119 | + | |
148 | 120 | | |
149 | 121 | | |
150 | 122 | | |
| 123 | + | |
151 | 124 | | |
152 | | - | |
| 125 | + | |
153 | 126 | | |
154 | 127 | | |
155 | 128 | | |
156 | | - | |
157 | 129 | | |
158 | | - | |
159 | | - | |
| 130 | + | |
Lines changed: 62 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 18 | | |
23 | 19 | | |
24 | | - | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
28 | 23 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 24 | | |
33 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | | - | |
49 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
50 | 62 | | |
51 | | - | |
52 | | - | |
| 63 | + | |
| 64 | + | |
53 | 65 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 66 | + | |
| 67 | + | |
60 | 68 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
70 | 79 | | |
71 | | - | |
72 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
73 | 93 | | |
74 | 94 | | |
75 | | - | |
| 95 | + | |
76 | 96 | | |
77 | 97 | | |
0 commit comments