Public Member Functions | Private Member Functions | Private Attributes | List of all members
uav_random_direction Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ uav_random_direction()

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::~uav_random_direction ( )

Destructor that deletes the private member objects.

Definition at line 31 of file lib/uav_random_direction.cpp.

Member Function Documentation

◆ new_direction()

bool uav_random_direction::new_direction ( )
private

Compute new direction using rng.

Returns
Whether a a new direction could be set successfully.

Definition at line 93 of file lib/uav_random_direction.cpp.

◆ select_goal()

geometry_msgs::Pose uav_random_direction::select_goal ( )
private

Compute goal position from direction.

Returns
The selected goal.

Definition at line 87 of file lib/uav_random_direction.cpp.

◆ step()

behavior_state_t uav_random_direction::step ( )

Move the swarm member to a new position.

Returns
Return the state of the coverage algorithm.

Definition at line 36 of file lib/uav_random_direction.cpp.

Member Data Documentation

◆ clear_sector_client

ServiceClient uav_random_direction::clear_sector_client
private

Service client for determining the sector clear of obstacles.

Definition at line 58 of file uav_random_direction.h.

◆ direction

double uav_random_direction::direction
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.

◆ distance

double uav_random_direction::distance
private

The distance which the drone is traveling.

Definition at line 88 of file uav_random_direction.h.

◆ pos

position uav_random_direction::pos
private

A helper object for position related tasks.

Definition at line 63 of file uav_random_direction.h.

◆ rng

random_numbers::RandomNumberGenerator* uav_random_direction::rng
private

The random number generator used for selecting a random direction.

Definition at line 93 of file uav_random_direction.h.

◆ step_size_max

double uav_random_direction::step_size_max
private

The maximum distance that a UAV travels in one step.

Definition at line 68 of file uav_random_direction.h.

◆ step_size_min

double uav_random_direction::step_size_min
private

The minimum distance that a UAV travels in one step.

Definition at line 73 of file uav_random_direction.h.

◆ turn

bool uav_random_direction::turn
private

Whether the drone still needs to turn before moving.

Definition at line 78 of file uav_random_direction.h.


The documentation for this class was generated from the following files:


uav_random_direction
Author(s): Micha Sende
autogenerated on Sun Dec 29 2019 10:25:58