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

An implementation of the coverage class that allows to cover a given area with the random walk algorithm. The random walk is a mathematical movement model, where an agent moves straight for a specific distance and then changes its direction randomly. More...

#include <ugv_random_walk.h>

Public Member Functions

behavior_state_t step ()
 Move the swarm member to a new position. More...
 
 ugv_random_walk ()
 Constructor that initializes the private member variables. More...
 
 ~ugv_random_walk ()
 Destructor that deletes the private member objects. More...
 

Private Member Functions

bool new_direction ()
 Compute new direction using rng. More...
 
bool reflect ()
 Compute new direction as reflection from wall. More...
 
geometry_msgs::Pose select_goal ()
 Compute goal position from direction. More...
 

Private Attributes

ServiceClient bound_client
 Service client for determining closest mission area boundary to the current UGV position. More...
 
ServiceClient clear_sector_client
 Service client for determining the sector clear of obstacles. More...
 
double direction
 The direction in which the UGV is traveling. It is measured in radian, clockwise starting from north. 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
 The distance that the UGV travels in one step. More...
 

Detailed Description

An implementation of the coverage class that allows to cover a given area with the random walk algorithm. The random walk is a mathematical movement model, where an agent moves straight for a specific distance and then changes its direction randomly.

Definition at line 24 of file ugv_random_walk.h.

Constructor & Destructor Documentation

◆ ugv_random_walk()

ugv_random_walk::ugv_random_walk ( )

Constructor that initializes the private member variables.

Definition at line 3 of file lib/ugv_random_walk.cpp.

◆ ~ugv_random_walk()

ugv_random_walk::~ugv_random_walk ( )

Destructor that deletes the private member objects.

Definition at line 34 of file lib/ugv_random_walk.cpp.

Member Function Documentation

◆ new_direction()

bool ugv_random_walk::new_direction ( )
private

Compute new direction using rng.

Returns
Whether a a new direction could be set successfully.

Definition at line 66 of file lib/ugv_random_walk.cpp.

◆ reflect()

bool ugv_random_walk::reflect ( )
private

Compute new direction as reflection from wall.

Returns
Whether a a new direction could be set successfully.

Definition at line 90 of file lib/ugv_random_walk.cpp.

◆ select_goal()

geometry_msgs::Pose ugv_random_walk::select_goal ( )
private

Compute goal position from direction.

Returns
The selected goal.

Definition at line 114 of file lib/ugv_random_walk.cpp.

◆ step()

behavior_state_t ugv_random_walk::step ( )

Move the swarm member to a new position.

Returns
Return the state of the coverage algorithm.

Definition at line 39 of file lib/ugv_random_walk.cpp.

Member Data Documentation

◆ bound_client

ServiceClient ugv_random_walk::bound_client
private

Service client for determining closest mission area boundary to the current UGV position.

Definition at line 65 of file ugv_random_walk.h.

◆ clear_sector_client

ServiceClient ugv_random_walk::clear_sector_client
private

Service client for determining the sector clear of obstacles.

Definition at line 70 of file ugv_random_walk.h.

◆ direction

double ugv_random_walk::direction
private

The direction in which the UGV is traveling. It is measured in radian, clockwise starting from north.

Definition at line 85 of file ugv_random_walk.h.

◆ pos

position ugv_random_walk::pos
private

A helper object for position related tasks.

Definition at line 75 of file ugv_random_walk.h.

◆ rng

random_numbers::RandomNumberGenerator* ugv_random_walk::rng
private

The random number generator used for selecting a random direction.

Definition at line 90 of file ugv_random_walk.h.

◆ step_size

double ugv_random_walk::step_size
private

The distance that the UGV travels in one step.

Definition at line 80 of file ugv_random_walk.h.


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


ugv_random_walk
Author(s): Micha Sende
autogenerated on Sun Dec 29 2019 10:26:23