|
|
[[_TOC_]]
|
|
|
|
|
|
# Intro
|
|
|
|
|
|
This package is used to control the landing on the (moving) aruco marker.
|
|
|
|
|
|
# Quickstart
|
|
|
|
|
|
## Simulation
|
|
|
|
|
|
To run the landing_controller with the gazebo simulation, open a terminal window. Navigate to the `PX4-Autopilot` directory and start the Autopilot:
|
|
|
|
|
|
```
|
|
|
make px4_sitl_rtps gazebo
|
|
|
```
|
|
|
|
|
|
Then open another terminal and launch the corresponding ROS2 launch file:
|
|
|
```
|
|
|
ros2 launch landing_controller simulation.launch.py
|
|
|
```
|
|
|
For more information about what this launch file does, see [Launch System](Packages/landing_controller/2_Launch System).
|
|
|
|
|
|
Finally, open a third and terminal and type:
|
|
|
```
|
|
|
ros2 run teleop_twist_keyboard teleop_twist_keyboard
|
|
|
```
|
|
|
If an error occurs, this package is probably not installed. To fix this, type:
|
|
|
```
|
|
|
sudo apt-get install ros-$ROS_DISTRO-teleop-twist-keyboard
|
|
|
```
|
|
|
Once the node is started, the avaible keys to control the drone are presented. For the current setup, the Holonomic mode must be used by pressing the shift key. When now applying the shown controls, the drone moves in the gazebo environment according to these commands.
|
|
|
|
|
|
# Launch System
|
|
|
|
|
|
The launch system currently consists of three files in the [corresponding directory](https://git.tu-berlin.de/eriksuer/specialtopics/-/tree/main/src/landing_controller/launch). Their interdependence is shown by the following graph:
|
|
|
|
|
|
```mermaid
|
|
|
graph TD;
|
|
|
simulation.launch.py-->general.launch.py;
|
|
|
realworld.launch.py-->general.launch.py;
|
|
|
```
|
|
|
|
|
|
## Entry Launchfiles
|
|
|
The launch files that are supposed to be called using `ros2 launch` are `simulation.launch.py` and `realworld.launch.py`. Both of them start the `micrortps_agent`, but with different parameters. While the simulation launcher starts it on the UDP port, the realworld launch file accesses the serial port `ttyUSB0`. After setting up the RTPS connection, both launch files call `general.launch.py`.
|
|
|
|
|
|
## General Launchfile
|
|
|
This launch file starts all nodes which are independent of the environment (i.e. simulation or realworld). At first the `velocity_commander` is started. Afterwards the launch file calls the rosbag to record all necessary topics. Therefore, the `VelocityCommander` class is examined and all topics which communicate with it are added to the list with the recorded topics. |
|
|
\ No newline at end of file |