... | ... | @@ -8,7 +8,7 @@ TST |
|
|
|
|
|
A Task-Specification-Tree (TST) is a hierachical tree structure which represents a complex mission. For the purpose of this lab, six types of nodes are used:
|
|
|
|
|
|
You can find the specification of the TST nodes in ```air_tst/configs```, the directory on the lab computers is ```/courses/TDDE05/software/ros2_ws/src/air_tst/configs```, to access to the directory you can do:
|
|
|
You can find the specification of the TST nodes in ```air_tst/configs```, the directory on the lab computers is ```/courses/TDDE05/software/ros2_ws/src/air_tst/configs```, here is some documentation:
|
|
|
|
|
|
|
|
|
* ```seq``` allows to execute a sequence of nodes
|
... | ... | @@ -28,8 +28,71 @@ You can find the specification of the TST nodes in ```air_tst/configs```, the di |
|
|
```
|
|
|
|
|
|
```bash
|
|
|
roscd air_tst/configs
|
|
|
tdde05-cd air_tst/configs
|
|
|
```
|
|
|
|
|
|
TST Editor
|
|
|
----------
|
|
|
|
|
|
An editor is available in the \verb|air_tst| module, and can be started with:
|
|
|
|
|
|
```bash
|
|
|
rosrun air_tst tst_editor
|
|
|
```
|
|
|
|
|
|
You can open a specific file by giving it as an argument, for instance, the following will allow you to open the ```explore_record.json``` tst:
|
|
|
|
|
|
```
|
|
|
tdde05-cd air_tsts/tsts
|
|
|
rosrun air_tst tst_editor explore_record.json
|
|
|
```
|
|
|
|
|
|
![tst_editor](uploads/9b25264312b9d2dc8f983ce717b97895/tst_editor.png)
|
|
|
|
|
|
|
|
|
TST File format
|
|
|
---------------
|
|
|
|
|
|
TST are defined using the JSON file format.
|
|
|
|
|
|
Bellow is an example, for an exploration mission, in which the robot first move to the location $(10,2)$ and then explore in a spiral of radius $10$ while recording some data:
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"children": [
|
|
|
{
|
|
|
"name": "drive-to",
|
|
|
"params": {
|
|
|
"p": {
|
|
|
"rostype": "Point",
|
|
|
"x": 10,
|
|
|
"y": 2,
|
|
|
"z": 0
|
|
|
},
|
|
|
"use-motion-planner": false
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
"children": [
|
|
|
{
|
|
|
"name": "explore",
|
|
|
"params": {
|
|
|
"radius": 0
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
"name": "record",
|
|
|
"params": {
|
|
|
"filename": "explore.bag",
|
|
|
"topics": "/husky0/lidar"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"name": "conc"
|
|
|
}
|
|
|
],
|
|
|
"name": "seq"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
The ```type``` indicates the type of TST node, ```children``` are used by the container nodes and contains other node definition. ```params``` contains the parameters of each nodes. |