Using position control - clems4ever/ardrone_loclib GitHub Wiki

The package ardrone_moves implements a solution for controlling the drone position. It needs a position estimation of the drone and a near target (reachable with a straight trajectory).

we developed simple GUI to help you use this tool. See Using the position control GUI

Important: the controller needs to know the drone orientation to North. The ardrone_autonomy driver does not handles magnetometer yet, so it is important to have an estimation of it. We use the orientation from drone IMU, but it only depends on the drone initial position. So you have to start the drone facing the North. It's an important inconvenient but we have to do things that way for now.

Node position_controller

This is the core of ardrone_moves, it calculates a command for the drone from the drone position and the target. The trajectory of the drone is linear (almost) between this 2 points.

Position Reference

As the controller works only on differences between target and estimated position, the reference of this positions are not used, until this two poses have the same reference. (this is NOT checked)

Yaw (orientation) control

The orientation of the drone is given by an angle. The desired orientation can be given in an absolute value (i.e. angle to north, or from initial orientation...) or it can be relative to the direction. i.e. if we want the drone to fly forward, we enable this feature and set the desired yaw to 0, to fly backward, we set it to pi...
This feature can be enabled thanks to a ROS service (see bellow).

Subscribed topics

Published topics

Parameters

  • distance_threshold (double, default=1) the minimal distance between target and position to consider the target is reached (used when a trajectory is given and when get_state service is called)

Services

###Use When receiving a target on /position_target, any previously given trajectory on /trajectory_plan is forgotten.

Node position_controller_tf

As the position_controller but listen a tf intsead of a pose message

Results and performances

TODO