A class that allows to cover a given area with the random direction algorithm. The random direction is a mathematical movement model, where an agent moves straight forward until it reaches an obstacle. There, it changes its direction randomly. More...
#include <uav_random_direction.h>
Public Member Functions | |
| behavior_state_t | step () |
| Move the swarm member to a new position. More... | |
| uav_random_direction () | |
| Constructor that initializes the private member variables. More... | |
| ~uav_random_direction () | |
| Destructor that deletes the private member objects. More... | |
Private Member Functions | |
| bool | new_direction () |
| Compute new direction using rng. More... | |
| geometry_msgs::Pose | select_goal () |
| Compute goal position from direction. More... | |
Private Attributes | |
| ServiceClient | clear_sector_client |
| Service client for determining the sector clear of obstacles. More... | |
| double | direction |
| The direction in which the drone is travling. It is measured in radian, clockwise starting from north. More... | |
| double | distance |
| The distance which the drone is traveling. More... | |
| position | pos |
| A helper object for position related tasks. More... | |
| random_numbers::RandomNumberGenerator * | rng |
| The random number generator used for selecting a random direction. More... | |
| double | step_size_max |
| The maximum distance that a UAV travels in one step. More... | |
| double | step_size_min |
| The minimum distance that a UAV travels in one step. More... | |
| bool | turn |
| Whether the drone still needs to turn before moving. More... | |
A class that allows to cover a given area with the random direction algorithm. The random direction is a mathematical movement model, where an agent moves straight forward until it reaches an obstacle. There, it changes its direction randomly.
Definition at line 23 of file uav_random_direction.h.
| uav_random_direction::uav_random_direction | ( | ) |
Constructor that initializes the private member variables.
Definition at line 3 of file lib/uav_random_direction.cpp.
| uav_random_direction::~uav_random_direction | ( | ) |
Destructor that deletes the private member objects.
Definition at line 31 of file lib/uav_random_direction.cpp.
|
private |
Compute new direction using rng.
Definition at line 93 of file lib/uav_random_direction.cpp.
|
private |
Compute goal position from direction.
Definition at line 87 of file lib/uav_random_direction.cpp.
| behavior_state_t uav_random_direction::step | ( | ) |
Move the swarm member to a new position.
Definition at line 36 of file lib/uav_random_direction.cpp.
|
private |
Service client for determining the sector clear of obstacles.
Definition at line 58 of file uav_random_direction.h.
|
private |
The direction in which the drone is travling. It is measured in radian, clockwise starting from north.
Definition at line 83 of file uav_random_direction.h.
|
private |
The distance which the drone is traveling.
Definition at line 88 of file uav_random_direction.h.
|
private |
A helper object for position related tasks.
Definition at line 63 of file uav_random_direction.h.
|
private |
The random number generator used for selecting a random direction.
Definition at line 93 of file uav_random_direction.h.
|
private |
The maximum distance that a UAV travels in one step.
Definition at line 68 of file uav_random_direction.h.
|
private |
The minimum distance that a UAV travels in one step.
Definition at line 73 of file uav_random_direction.h.
|
private |
Whether the drone still needs to turn before moving.
Definition at line 78 of file uav_random_direction.h.