... | @@ -22,7 +22,7 @@ graph LR |
... | @@ -22,7 +22,7 @@ graph LR |
|
|
|
|
|
A-->|pos. of aruco marker|velocity_controller
|
|
A-->|pos. of aruco marker|velocity_controller
|
|
B-->|attitude of pixhawk|velocity_controller
|
|
B-->|attitude of pixhawk|velocity_controller
|
|
C-->|proportional gain|velocity_controller
|
|
C-->|controller gains|velocity_controller
|
|
velocity_controller-->|velocity command|velocity_commander
|
|
velocity_controller-->|velocity command|velocity_commander
|
|
E-->|PX4 time synchronisation|velocity_commander
|
|
E-->|PX4 time synchronisation|velocity_commander
|
|
velocity_commander-->|command to pixhawk|D
|
|
velocity_commander-->|command to pixhawk|D
|
... | @@ -31,7 +31,7 @@ graph LR |
... | @@ -31,7 +31,7 @@ graph LR |
|
class A,B,C,D,E empty
|
|
class A,B,C,D,E empty
|
|
```
|
|
```
|
|
|
|
|
|
The `velocity_controller` uses the position of the aruco marker relative to the camera and the current position of the pixhawk to build up an internal transformation tree (see tbd). This tree is used to estimate the position of the drone, relative to the aruco marker. This leads to the control deviation which is the input to the controller. The controller itself is designed as a proportional controller which the gain `1.0`. The gain can be adjusted by publish a float value to the given topic. The controller output is then send to the `velocity_commander`. This node fits the commanded velocity into the PX4 internal datastructure for instrumenting its base controllers. \
|
|
The `velocity_controller` uses the position of the aruco marker relative to the camera and the current position of the pixhawk to build up an internal transformation tree (see tbd). This tree is used to estimate the position of the drone, relative to the aruco marker. This leads to the control deviation which is the input to the controller. The controller itself is designed as a PI (proportional-integral) controller. The gains can be adjusted by publishing a float value to the given topic. The controller output is then send to the `velocity_commander`. This node fits the commanded velocity into the PX4 internal datastructure for instrumenting its base controllers. \
|
|
**Note:** The existence of two nodes for this packages has evolved during their development. To keep a better overview and to avoid delays due to interprocess communication, the two nodes could be merged into a single one.
|
|
**Note:** The existence of two nodes for this packages has evolved during their development. To keep a better overview and to avoid delays due to interprocess communication, the two nodes could be merged into a single one.
|
|
|
|
|
|
## Input
|
|
## Input
|
... | @@ -41,6 +41,7 @@ The `velocity_controller` uses the position of the aruco marker relative to the |
... | @@ -41,6 +41,7 @@ The `velocity_controller` uses the position of the aruco marker relative to the |
|
* Transformations: `/tf` (for details, see below)
|
|
* Transformations: `/tf` (for details, see below)
|
|
* Estimated Attitude of Pixhawk: `/VehicleAttitude_PubSubTopic` (therefore, micrortps must be running)
|
|
* Estimated Attitude of Pixhawk: `/VehicleAttitude_PubSubTopic` (therefore, micrortps must be running)
|
|
* Proportional Controller gain: `/landing_controller/p_gain`
|
|
* Proportional Controller gain: `/landing_controller/p_gain`
|
|
|
|
* Integral Controller gain: `/landing_controller/i_gain`
|
|
* PX4 Time synchronisation: `/Timesync_PubSubTopic`
|
|
* PX4 Time synchronisation: `/Timesync_PubSubTopic`
|
|
|
|
|
|
**Transformations**
|
|
**Transformations**
|
... | @@ -53,7 +54,7 @@ Currently, all parameters are set as constants within the python source code and |
... | @@ -53,7 +54,7 @@ Currently, all parameters are set as constants within the python source code and |
|
`velocity_controller`:
|
|
`velocity_controller`:
|
|
|
|
|
|
* Transform from pixhawk to camera (`TF_PIX_TO_CAMERA`)
|
|
* Transform from pixhawk to camera (`TF_PIX_TO_CAMERA`)
|
|
* Controller gain (`gains`)
|
|
* Controller gains (`gains`)
|
|
|
|
|
|
`velocity_commander`:
|
|
`velocity_commander`:
|
|
|
|
|
... | @@ -78,7 +79,7 @@ These transformations should not be used for further processing. Their purpose i |
... | @@ -78,7 +79,7 @@ These transformations should not be used for further processing. Their purpose i |
|
As explained in the [introduction](#intro), this package consists of two nodes. In the following, quickstart guides for only using the `velocity_commander` and for using the full setup are given. These can be executed in a simulation with gazebo or on the target hardware. In case the procedure differs, this is explained. \
|
|
As explained in the [introduction](#intro), this package consists of two nodes. In the following, quickstart guides for only using the `velocity_commander` and for using the full setup are given. These can be executed in a simulation with gazebo or on the target hardware. In case the procedure differs, this is explained. \
|
|
To follow this quickstart manual, [QGroundControl](https://docs.qgroundcontrol.com/master/en/getting_started/quick_start.html) must be installed. Also for execution on the target hardware, make sure that the [RTPS Connection](hardware/rtps-connection) is set up properly.
|
|
To follow this quickstart manual, [QGroundControl](https://docs.qgroundcontrol.com/master/en/getting_started/quick_start.html) must be installed. Also for execution on the target hardware, make sure that the [RTPS Connection](hardware/rtps-connection) is set up properly.
|
|
|
|
|
|
## Velocity Commmander
|
|
## Velocity Commmander only
|
|
The setup for simulation and the target hardware is very different. So these are explained independently:
|
|
The setup for simulation and the target hardware is very different. So these are explained independently:
|
|
|
|
|
|
**Simulation**\
|
|
**Simulation**\
|
... | @@ -98,7 +99,7 @@ micrortps_agent start -t UDP & |
... | @@ -98,7 +99,7 @@ micrortps_agent start -t UDP & |
|
Then connect to PX4 using QGroundControl. Then next steps are explained below the Target section.
|
|
Then connect to PX4 using QGroundControl. Then next steps are explained below the Target section.
|
|
|
|
|
|
**Target**\
|
|
**Target**\
|
|
To apply this quickstart to the software running on the target hardware (i.e. Pixhawk and Raspberry Pi), start the Pixhawk and connect to it using QGroundControl. Then open the [Mavlink Console](https://docs.qgroundcontrol.com/master/en/analyze_view/mavlink_console.html). There, start the micrortps handler on the PX4 side by typing:
|
|
To apply this quickstart to the software running on the target hardware (i.e. Pixhawk and Raspberry Pi), start the Pixhawk and connect to it using QGroundControl (The Pixhawk must be started at ground level, because the hover height is relative to this initial value). Then open the [Mavlink Console](https://docs.qgroundcontrol.com/master/en/analyze_view/mavlink_console.html). There, start the micrortps handler on the PX4 side by typing:
|
|
```
|
|
```
|
|
micrortps_client start -t UART -d /dev/ttyS3
|
|
micrortps_client start -t UART -d /dev/ttyS3
|
|
```
|
|
```
|
... | @@ -129,6 +130,9 @@ sudo apt-get install ros-$ROS_DISTRO-teleop-twist-keyboard |
... | @@ -129,6 +130,9 @@ 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. \
|
|
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. \
|
|
To start the drone, go to QGroundControl, press the `Takeoff` button on the left and confirm by moving the slider on the bottom of the window. Once the drone has reached its hold altitude, click on the flight mode in the top left corner (on the right of the 'Flying' tag) and choose `Offboard`. Now switch back to the terminal with the teleoperation node. When applying the shown controls, the drone moves according to these commands.
|
|
To start the drone, go to QGroundControl, press the `Takeoff` button on the left and confirm by moving the slider on the bottom of the window. Once the drone has reached its hold altitude, click on the flight mode in the top left corner (on the right of the 'Flying' tag) and choose `Offboard`. Now switch back to the terminal with the teleoperation node. When applying the shown controls, the drone moves according to these commands.
|
|
|
|
|
|
|
|
## Landing Controller package
|
|
|
|
This section describes how to start the whole `landing_controller` architecture. At first, set up the pixhawk or the simulation as described in the [Quickstart manual for the velocity_commander](#velocity-commander-only)
|
|
|
|
|
|
## Full Setup
|
|
## Full Setup
|
|
TODO
|
|
TODO
|
|
|
|
|
... | | ... | |