Commit d2ea45d
committed
Add action server with logic for accepting and canceling goals (osrf#53)
* Add interfaces for action goal, result, and feedback
Implementing these interfaces in the code generation template makes it easier to pass around these types in a generic way.
Note, the 'final' modifier had to be removed from generated message types in order to extend goal, result, and feedback types in action definitions.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add new definitions for action goal response and request
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add getter for UUID to SendGoalRequest
Also make inner classes static.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add getStamp method to GoalResponseDefinition
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Partially revert "Add interfaces for action goal, result, and feedback"
Partially revert commit dd04614.
I don't think we need to aliases for the message types, but I'll add them back if they turn out to be useful.
* Parameterize goal request and response interfaces on action type
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Fix getGoalUuid implementation
It should return a List, since it is hashable.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* List<Byte> -> byte[]
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add ActionServer skeleton
* Add new action module with classes/interfaces related to the ActionServer
* Add methods for creating and removing ActionServers from a Node
* Implement dispose method for ActionServer.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add ActionServer creation logic and unit tests
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add action server logic for accepting and canceling goals
This changeset includes the following:
* an implementation of the goal handle for action servers
* action server integration with the base executor
* action server integration with ROS nodes
* unit tests for the action server, receiving goal and cancel requests
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* cleanup
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* more cleanup
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Minor refactor: move response enums into callback interfaces
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Remove TODO
The goal request already contains a getter for the goal ID.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Fix accident
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Alphabetize
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Refactor: replace 'getNumberOf*()' JNI functions with single 'getNumberOfEntites()' function
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Avoid string copy
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Remove extern C
Replace with 'namespace rcljava'
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Remove unnecessary synchronization
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Refactor access to goalCallback
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* typesafe request and response definitions
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Be more specific about template type for GoalCallback
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Minor refactor
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Make GoalHandleImpl inner class instead of static
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Remove synchronized from getHandle
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add TODO for Waitable interface
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Fix style
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Minor refactor
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add docs for createActionServer
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Switch from List to array
Signed-off-by: Jacob Perron <jacob@openrobotics.org>1 parent 15a1567 commit d2ea45d
File tree
21 files changed
+2196
-66
lines changed- rcljava
- include
- src
- main
- cpp
- java/org/ros2/rcljava
- action
- executors
- node
- test/java/org/ros2/rcljava/action
21 files changed
+2196
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| 63 | + | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| |||
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
108 | | - | |
109 | | - | |
| 113 | + | |
110 | 114 | | |
| 115 | + | |
| 116 | + | |
111 | 117 | | |
| 118 | + | |
112 | 119 | | |
| 120 | + | |
113 | 121 | | |
114 | 122 | | |
115 | 123 | | |
| |||
129 | 137 | | |
130 | 138 | | |
131 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
132 | 146 | | |
133 | 147 | | |
134 | 148 | | |
| |||
205 | 219 | | |
206 | 220 | | |
207 | 221 | | |
208 | | - | |
| 222 | + | |
209 | 223 | | |
210 | 224 | | |
| 225 | + | |
211 | 226 | | |
| 227 | + | |
212 | 228 | | |
213 | 229 | | |
214 | 230 | | |
| |||
218 | 234 | | |
219 | 235 | | |
220 | 236 | | |
| 237 | + | |
221 | 238 | | |
222 | 239 | | |
223 | 240 | | |
| |||
245 | 262 | | |
246 | 263 | | |
247 | 264 | | |
| 265 | + | |
248 | 266 | | |
249 | 267 | | |
250 | 268 | | |
| 269 | + | |
251 | 270 | | |
252 | 271 | | |
253 | 272 | | |
| |||
264 | 283 | | |
265 | 284 | | |
266 | 285 | | |
| 286 | + | |
| 287 | + | |
267 | 288 | | |
268 | 289 | | |
269 | 290 | | |
| |||
283 | 304 | | |
284 | 305 | | |
285 | 306 | | |
| 307 | + | |
286 | 308 | | |
287 | 309 | | |
288 | 310 | | |
| |||
344 | 366 | | |
345 | 367 | | |
346 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
347 | 396 | | |
348 | 397 | | |
349 | 398 | | |
| |||
359 | 408 | | |
360 | 409 | | |
361 | 410 | | |
| 411 | + | |
362 | 412 | | |
363 | 413 | | |
364 | 414 | | |
365 | 415 | | |
366 | 416 | | |
367 | 417 | | |
| 418 | + | |
368 | 419 | | |
| 420 | + | |
369 | 421 | | |
370 | 422 | | |
371 | 423 | | |
| |||
Lines changed: 138 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
Lines changed: 99 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
0 commit comments