Fawkes API
Fawkes Development Version
|
#include "filters/projection.h"
Public Member Functions | |
LaserProjectionDataFilter (const std::string &filter_name, fawkes::tf::Transformer *tf, std::string target_frame, float not_from_x, float not_to_x, float not_from_y, float not_to_y, float only_from_z, float only_to_z, unsigned int in_data_size, std::vector< LaserDataFilter::Buffer * > &in) | |
Constructor. More... | |
void | filter () |
![]() | |
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 void | set_out_vector (std::vector< Buffer * > &out) |
Set 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 | |
![]() | |
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... | |
![]() | |
std::string | filter_name |
unsigned int | out_data_size |
unsigned int | in_data_size |
std::vector< Buffer * > | in |
std::vector< Buffer * > | out |
Projects one laser into another laser's plane. This first transforms the laser value into the target frame, and then projects it into the X-Y plane (which is assumed to be the laser plane of another (virtual) laser. Additionally some sanity filtering in all three axes is applied after the transformation, but before the projection.
Definition at line 41 of file projection.h.
LaserProjectionDataFilter::LaserProjectionDataFilter | ( | const std::string & | filter_name, |
fawkes::tf::Transformer * | tf, | ||
std::string | target_frame, | ||
float | not_from_x, | ||
float | not_to_x, | ||
float | not_from_y, | ||
float | not_to_y, | ||
float | only_from_z, | ||
float | only_to_z, | ||
unsigned int | in_data_size, | ||
std::vector< LaserDataFilter::Buffer * > & | in | ||
) |
Constructor.
filter_name | name of this filter |
tf | transformer to get transform from |
target_frame | target coordinate fram to project into |
not_from_x | lower X boundary of ignored rectangle |
not_to_x | upper X boundary of ignored rectangle |
not_from_y | lower Y boundary of ignored rectangle |
not_to_y | upper Y boundary of ignored rectangle |
only_from_z | minimum Z value for accepted points |
only_to_z | maximum Z value for accepted points |
in_data_size | number of entries input value arrays |
in | vector of input arrays |
Definition at line 57 of file projection.cpp.
References fawkes::deg2rad(), and LaserDataFilter::out_data_size.
|
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 128 of file projection.cpp.
References fawkes::deg2rad(), LaserDataFilter::in, LaserDataFilter::in_data_size, fawkes::tf::Transformer::lookup_transform(), LaserDataFilter::out, and LaserDataFilter::out_data_size.