... | ... | @@ -124,27 +124,11 @@ List of relevant classes for executing TST: |
|
|
|
|
|
The ```NodeExecutorRegistry``` and ```TSTNodeModelsRegistry``` are common for all TSTs and should be permanent. While ```TSTNode``` and ```Executor``` are specific to the execution of a given tree.
|
|
|
|
|
|
Implementation
|
|
|
--------------
|
|
|
|
|
|
This lab can be completed using **Python** or **C++**. Follows the instruction corresponding to your choice of programming language.
|
|
|
|
|
|
You will need to create a package for ```air_lab3```, in your ```ros2_ws/src/air_labs``` directory, with dependencies on a few packages. For python:
|
|
|
|
|
|
```bash
|
|
|
ros2 pkg create air_lab3 --build-type ament_python --dependencies rclpy message_generation std_msgs --node-name tst_executor
|
|
|
```
|
|
|
|
|
|
For C++:
|
|
|
|
|
|
```bash
|
|
|
ros2 pkg create air_lab3 --build-type ament_cmake --dependencies rclcpp message_generation std_msgs --node-name tst_executor
|
|
|
```
|
|
|
|
|
|
TST executor service definition
|
|
|
-------------------------------
|
|
|
|
|
|
We will need to create a new service definition. You should check and understand the [official tutorial](https://docs.ros.org/en/galactic/Tutorials/Beginner-Client-Libraries/Custom-ROS2-Interfaces.html) first. We will need to create a package specially for storing our definitions:
|
|
|
We will need to create a new service definition. You should check and understand the [official tutorial](https://docs.ros.org/en/galactic/Tutorials/Beginner-Client-Libraries/Custom-ROS2-Interfaces.html) first. It is good practice to create a standalone package for defining messages, so that it is independent of Python and C++. We will need to create a package specially for storing our definitions:
|
|
|
|
|
|
```bash
|
|
|
ros2 pkg create --build-type ament_cmake air_lab_interfaces --dependencies std_msgs rosidl_default_generators
|
... | ... | @@ -173,6 +157,23 @@ Then you can build with ```tdde05-build```. Then you should reload the environme |
|
|
ros2 interfaces show air_lab_interfaces/srv/ExecuteTst
|
|
|
```
|
|
|
|
|
|
Implementation
|
|
|
--------------
|
|
|
|
|
|
This lab can be completed using **Python** or **C++**. Follows the instruction corresponding to your choice of programming language.
|
|
|
|
|
|
You will need to create a package for ```air_lab3```, in your ```ros2_ws/src/air_labs``` directory, with dependencies on a few packages. For python:
|
|
|
|
|
|
```bash
|
|
|
ros2 pkg create air_lab3 --build-type ament_python --dependencies rclpy air_lab_interfaces --node-name tst_executor
|
|
|
```
|
|
|
|
|
|
For C++:
|
|
|
|
|
|
```bash
|
|
|
ros2 pkg create air_lab3 --build-type ament_cmake --dependencies rclcpp rclcpp_action air_lab_interfaces --node-name tst_executor
|
|
|
```
|
|
|
|
|
|
TST executor service server
|
|
|
---------------------------
|
|
|
|
... | ... | |