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

A target that is monitored by the CPSs. More...

#include <target.h>

Public Member Functions

geometry_msgs::Pose get_pose ()
 Get the position of the target. More...
 
void lost ()
 Check whether the target tracked by this CPS has been lost. Switch state from TARGET_TRACKED to TARGET_LOST if the tracking timeout has expired and publish event. More...
 
void operator= (const target &t)
 Assignment operator. More...
 
 target ()
 Constructor. More...
 
 target (const target &t)
 Copy constructor. More...
 
 target (unsigned int id, target_state_t state)
 Constructor that initializes some private member variables. More...
 
 target (unsigned int id, target_state_t state, geometry_msgs::Pose pose)
 Constructor that initializes some private member variables. More...
 
 target (unsigned int id, target_state_t state, geometry_msgs::Pose pose, Time stamp)
 Constructor that initializes some private member variables. More...
 
void update (target_state_t state, geometry_msgs::Pose pose, Time stamp)
 Update the information about a target. More...
 
 ~target ()
 Destructor that destroys all objects. More...
 

Private Attributes

int id
 The ID of this target. Negative IDs are invalid. More...
 
geometry_msgs::Pose last_pose
 The position of the target the last time it was published as target position event. More...
 
NodeHandle nh
 A node handle for the main ROS node. More...
 
geometry_msgs::Pose pose
 Position of the target. More...
 
Rate * rate
 The loop rate object for running the behavior control loops at a specific frequency. More...
 
Time stamp
 Time stamp of latest update of the target. More...
 
target_state_t state
 State of the target. More...
 
Publisher target_done_pub
 Publisher for transmitting information about completed targets to other CPSs. More...
 
Publisher target_found_pub
 Publisher for transmitting information about found targets to other CPSs. More...
 
Publisher target_lost_pub
 Publisher for transmitting information about lost targets to other CPSs. More...
 
double target_tolerance
 Minimum distance between two consecutive target positions such that a target update event is published. More...
 
Publisher target_update_pub
 Publisher for transmitting updated information about targets to other CPSs. More...
 
Duration timeout
 The time in seconds after which a target transitions into the state TARGET_LOST when no target update has been received. More...
 

Detailed Description

A target that is monitored by the CPSs.

Definition at line 26 of file target.h.

Constructor & Destructor Documentation

◆ target() [1/5]

target::target ( )

Constructor.

Definition at line 3 of file target.cpp.

◆ target() [2/5]

target::target ( const target t)

Copy constructor.

Definition at line 7 of file target.cpp.

◆ target() [3/5]

target::target ( unsigned int  id,
target_state_t  state 
)

Constructor that initializes some private member variables.

Parameters
idThe target ID.
stateThe target state.

Definition at line 11 of file target.cpp.

◆ target() [4/5]

target::target ( unsigned int  id,
target_state_t  state,
geometry_msgs::Pose  pose 
)

Constructor that initializes some private member variables.

Parameters
idThe target ID.
stateThe target state.
poseThe position of the target.

Definition at line 15 of file target.cpp.

◆ target() [5/5]

target::target ( unsigned int  id,
target_state_t  state,
geometry_msgs::Pose  pose,
Time  stamp 
)

Constructor that initializes some private member variables.

Parameters
idThe target ID.
stateThe target state.
poseThe position of the target.
stampThe time stamp of target.

Definition at line 19 of file target.cpp.

◆ ~target()

target::~target ( )

Destructor that destroys all objects.

Definition at line 61 of file target.cpp.

Member Function Documentation

◆ get_pose()

geometry_msgs::Pose target::get_pose ( )

Get the position of the target.

Returns
A pose containing the target position.

Definition at line 66 of file target.cpp.

◆ lost()

void target::lost ( )

Check whether the target tracked by this CPS has been lost. Switch state from TARGET_TRACKED to TARGET_LOST if the tracking timeout has expired and publish event.

Definition at line 71 of file target.cpp.

◆ operator=()

void target::operator= ( const target t)

Assignment operator.

Parameters
tThe object from where to take the assignment values.

Definition at line 98 of file target.cpp.

◆ update()

void target::update ( target_state_t  state,
geometry_msgs::Pose  pose,
Time  stamp 
)

Update the information about a target.

Parameters
stateThe state of the target.
poseThe position of the target.
stampThe time stamp of the update.

Definition at line 104 of file target.cpp.

Member Data Documentation

◆ id

int target::id
private

The ID of this target. Negative IDs are invalid.

Definition at line 102 of file target.h.

◆ last_pose

geometry_msgs::Pose target::last_pose
private

The position of the target the last time it was published as target position event.

Definition at line 117 of file target.h.

◆ nh

NodeHandle target::nh
private

A node handle for the main ROS node.

Definition at line 97 of file target.h.

◆ pose

geometry_msgs::Pose target::pose
private

Position of the target.

Definition at line 112 of file target.h.

◆ rate

Rate* target::rate
private

The loop rate object for running the behavior control loops at a specific frequency.

Definition at line 132 of file target.h.

◆ stamp

Time target::stamp
private

Time stamp of latest update of the target.

Definition at line 122 of file target.h.

◆ state

target_state_t target::state
private

State of the target.

Definition at line 107 of file target.h.

◆ target_done_pub

Publisher target::target_done_pub
private

Publisher for transmitting information about completed targets to other CPSs.

Definition at line 157 of file target.h.

◆ target_found_pub

Publisher target::target_found_pub
private

Publisher for transmitting information about found targets to other CPSs.

Definition at line 142 of file target.h.

◆ target_lost_pub

Publisher target::target_lost_pub
private

Publisher for transmitting information about lost targets to other CPSs.

Definition at line 152 of file target.h.

◆ target_tolerance

double target::target_tolerance
private

Minimum distance between two consecutive target positions such that a target update event is published.

Definition at line 137 of file target.h.

◆ target_update_pub

Publisher target::target_update_pub
private

Publisher for transmitting updated information about targets to other CPSs.

Definition at line 147 of file target.h.

◆ timeout

Duration target::timeout
private

The time in seconds after which a target transitions into the state TARGET_LOST when no target update has been received.

Definition at line 127 of file target.h.


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


target_monitor
Author(s): Micha Sende
autogenerated on Thu Oct 31 2019 15:47:40