Fawkes API  Fawkes Development Version
LaserDeadSpotsDataFilter Class Reference

#include "filters/deadspots.h"

Inheritance diagram for LaserDeadSpotsDataFilter:

Public Member Functions

 LaserDeadSpotsDataFilter (const std::string &filter_name, fawkes::Configuration *config, fawkes::Logger *logger, const std::string &prefix, unsigned int data_size, std::vector< LaserDataFilter::Buffer * > &in)
 Constructor. More...
 
 LaserDeadSpotsDataFilter (const LaserDeadSpotsDataFilter &other)
 Constructor. More...
 
LaserDeadSpotsDataFilteroperator= (const LaserDeadSpotsDataFilter &other)
 Assignment operator. More...
 
void filter ()
 
- Public Member Functions inherited from LaserDataFilter
 LaserDataFilter (const std::string &filter_name, unsigned int in_data_size, const std::vector< Buffer * > &in, unsigned int out_size)
 Constructor. More...
 
virtual ~LaserDataFilter ()
 Virtual empty destructor. More...
 
virtual std::vector< Buffer * > & get_out_vector ()
 Get filtered data array. More...
 
virtual unsigned int get_out_data_size ()
 Get size of filtered data array. More...
 
void set_array_ownership (bool own_in, bool own_out)
 Set input/output array ownership. More...
 
bool owns_in () const
 Check if input arrays are owned by filter. More...
 
bool owns_out () const
 Check if output arrays are owned by filter. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LaserDataFilter
virtual void set_out_data_size (unsigned int data_size)
 Resize output arrays. More...
 
void reset_outbuf (Buffer *b)
 Resets all readings in outbuf to NaN. More...
 
void copy_to_outbuf (Buffer *outbuf, const Buffer *inbuf)
 Copies the readings from inbuf to outbuf. More...
 
- Protected Attributes inherited from LaserDataFilter
std::string filter_name
 
unsigned int out_data_size
 
unsigned int in_data_size
 
std::vector< Buffer * > in
 
std::vector< Buffer * > out
 

Detailed Description

Erase dead spots (i.e. mounting rods in the laser range) from laser data. This filter reads a number of values stored in /hardware/laser/deadspots, where each dead spot must contain two entries, a start and an end in degrees. Each entry is stored as submembers of the given tree, for example as /hardware/laser/deadspots/0/start and /hardware/laser/deadspots/0/end.

Author
Tim Niemueller

Definition at line 37 of file deadspots.h.

Constructor & Destructor Documentation

◆ LaserDeadSpotsDataFilter() [1/2]

LaserDeadSpotsDataFilter::LaserDeadSpotsDataFilter ( const std::string &  filter_name,
fawkes::Configuration config,
fawkes::Logger logger,
const std::string &  prefix,
unsigned int  in_data_size,
std::vector< LaserDataFilter::Buffer * > &  in 
)

Constructor.

Parameters
filter_namename of this filter instance
configconfiguration instance
loggerlogger for informational output
prefixconfiguration prefix where to log for config information
in_data_sizenumber of entries input value arrays
invector of input arrays

Definition at line 56 of file deadspots.cpp.

References fawkes::Configuration::get_float(), fawkes::Logger::log_debug(), fawkes::Configuration::ValueIterator::next(), fawkes::Configuration::ValueIterator::path(), and fawkes::Configuration::search().

◆ LaserDeadSpotsDataFilter() [2/2]

LaserDeadSpotsDataFilter::LaserDeadSpotsDataFilter ( const LaserDeadSpotsDataFilter other)

Constructor.

Parameters
otherinstance to copy from

Definition at line 122 of file deadspots.cpp.

Member Function Documentation

◆ filter()

void LaserDeadSpotsDataFilter::filter ( )
virtual

Filter the incoming data. Function shall filter the data in the "in" member vector and write output to the "out" member vector.

Implements LaserDataFilter.

Definition at line 193 of file deadspots.cpp.

References LaserDataFilter::in, LaserDataFilter::in_data_size, and LaserDataFilter::out.

◆ operator=()

LaserDeadSpotsDataFilter & LaserDeadSpotsDataFilter::operator= ( const LaserDeadSpotsDataFilter other)

Assignment operator.

Parameters
otherinstance to copy from
Returns
reference to this instance

Definition at line 145 of file deadspots.cpp.

References LaserDataFilter::filter_name, LaserDataFilter::in, and LaserDataFilter::in_data_size.


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