... | @@ -71,15 +71,21 @@ If you work with C++, you can check [Nav2](https://docs.nav2.org/) documentation |
... | @@ -71,15 +71,21 @@ If you work with C++, you can check [Nav2](https://docs.nav2.org/) documentation |
|
|
|
|
|
Working with C++ should be no issues. The way to work with Python described below should now be working. If you run into problems please report on teams or email.
|
|
Working with C++ should be no issues. The way to work with Python described below should now be working. If you run into problems please report on teams or email.
|
|
|
|
|
|
If you work with Python, you should also check [Nav2](https://docs.nav2.org/) documentation to learn about the general concepts. However, Nav2 does not support Python directly. We have, however, implemented interfaces for a [Controller](https://docs.nav2.org/plugin_tutorials/docs/writing_new_nav2controller_plugin.html), and for Trajectory Generation and Critic Plugins based on the [dynamic window controller](https://github.com/ros-planning/navigation2/tree/main/nav2_dwb_controller) used by the TurtleBot. The code is available in [air_navigation](https://gitlab.liu.se/tdde05_ros2/air_navigation)
|
|
If you work with Python, you should also check [Nav2](https://docs.nav2.org/) documentation to learn about the general concepts. However, Nav2 does not support Python directly. We have, however, implemented two interfaces:
|
|
|
|
- for a [Controller](https://docs.nav2.org/plugin_tutorials/docs/writing_new_nav2controller_plugin.html)
|
|
|
|
- for Trajectory Generation and Critic Plugins based on the [dynamic window controller](https://github.com/ros-planning/navigation2/tree/main/nav2_dwb_controller) used by the TurtleBot.
|
|
|
|
|
|
|
|
The code is available in [air_navigation] (https://gitlab.liu.se/tdde05_ros2/air_navigation)
|
|
and some examples are included in [air_navigation_examples](https://gitlab.liu.se/tdde05_ros2/air_navigation_examples/-/blob/master/air_navigation_examples/__init__.py).
|
|
and some examples are included in [air_navigation_examples](https://gitlab.liu.se/tdde05_ros2/air_navigation_examples/-/blob/master/air_navigation_examples/__init__.py).
|
|
|
|
|
|
For both C++ and Python, to use a custom controller and critic, you need to change the configuration of nav2. You can see an example in the air_navigation_examples [nav2_test_py_controller.yaml](https://gitlab.liu.se/tdde05_ros2/air_bringup/-/blob/master/config/nav2_test_py_controller.yaml) and [nav2_test_py_dwb.yaml](https://gitlab.liu.se/tdde05_ros2/air_bringup/-/blob/master/config/nav2_test_py_dwb.yaml). To use a different configuration than the default one:
|
|
For both C++ and Python, to use a custom controller and critic, you need to change the configuration of nav2. You can see an example in the air_navigation_examples [nav2_test_py_controller.yaml (controller)](https://gitlab.liu.se/tdde05_ros2/air_bringup/-/blob/master/config/nav2_test_py_controller.yaml) and [nav2_test_py_dwb.yaml (trajectory and critic)](https://gitlab.liu.se/tdde05_ros2/air_bringup/-/blob/master/config/nav2_test_py_dwb.yaml). To use a different configuration than the default one:
|
|
|
|
|
|
```
|
|
```
|
|
ros2 launch air_bringup turtle.launch.py nav2_params_file:=`ros2 pkg prefix air_bringup`/share/air_bringup/config/nav2_test_py_controller.yaml
|
|
env LD_PRELOAD=/lib/x86_64-linux-gnu/libpython3.10.so.1.0 ros2 launch air_bringup turtle.launch.py nav2_params_file:=`ros2 pkg prefix air_bringup`/share/air_bringup/config/nav2_test_py_controller.yaml
|
|
```
|
|
```
|
|
|
|
|
|
|
|
Notice the preload is essential!
|
|
|
|
|
|
*Ask your assistant for help to setup your controller!*
|
|
*Ask your assistant for help to setup your controller!*
|
|
|
|
|
|
## Natural text commands:
|
|
## Natural text commands:
|
... | | ... | |