Fawkes API  Fawkes Development Version
TrackedLineInfo Class Reference

Container for a line with tracking and smoothing info. More...

#include "line_info.h"

Public Member Functions

 TrackedLineInfo (fawkes::tf::Transformer *tfer, const std::string &input_frame_id, const std::string &tracking_frame_id, float cfg_switch_tolerance, unsigned int cfg_moving_avg_len, fawkes::Logger *logger, std::string plugin_name)
 Constructor. More...
 
btScalar distance (const LineInfo &linfo) const
 Compute this line's distance from line info. More...
 
void update (LineInfo &new_linfo)
 Update this line. More...
 

Public Attributes

LineInfo raw
 the latest geometry of this line, i.e. unfiltered More...
 
LineInfo smooth
 moving-average geometry of this line (cf. length of history buffer) More...
 
fawkes::tf::Stamped< fawkes::tf::Point > base_point_odom
 last reference point (in odom frame) for line tracking More...
 
fawkes::tf::Transformertransformer
 Transformer used to transform from input_frame_id_to odom. More...
 
std::string input_frame_id
 Input frame ID of raw line infos (base_laser usually) More...
 
std::string tracking_frame_id
 Track lines relative to this frame (e.g. odom helps compensate movement) More...
 
float cfg_switch_tolerance
 Configured line jitter threshold. More...
 
boost::circular_buffer< LineInfohistory
 history of raw line geometries for computing moving average More...
 
float bearing_center
 Bearing towards line center, used to select lines "in front of us" when there. More...
 
fawkes::Loggerlogger
 Logger pointer of the calling class. More...
 
std::string plugin_name
 Plugin name of the calling class. More...
 

Detailed Description

Container for a line with tracking and smoothing info.

Definition at line 58 of file line_info.h.

Constructor & Destructor Documentation

◆ TrackedLineInfo()

TrackedLineInfo::TrackedLineInfo ( fawkes::tf::Transformer tfer,
const std::string &  input_frame_id,
const std::string &  tracking_frame_id,
float  cfg_switch_tolerance,
unsigned int  cfg_moving_avg_len,
fawkes::Logger logger,
std::string  plugin_name 
)

Constructor.

Parameters
tfertf transformer
input_frame_idframe id of incoming data
tracking_frame_idfixed frame in which to perform tracking
cfg_switch_tolerancetolerance in m for when to assume a line ID switch
cfg_moving_avg_lenlength of buffer for moving average
loggerlogger for informational messages
plugin_namecomponent for informational messages

Definition at line 40 of file line_info.cpp.

Member Function Documentation

◆ distance()

btScalar TrackedLineInfo::distance ( const LineInfo linfo) const

Compute this line's distance from line info.

Parameters
linfoline info
Returns
the scalar distance between the two base points in meters.

Definition at line 63 of file line_info.cpp.

References LineInfo::base_point, base_point_odom, input_frame_id, tracking_frame_id, fawkes::tf::Transformer::transform_point(), and transformer.

◆ update()

Member Data Documentation

◆ base_point_odom

fawkes::tf::Stamped<fawkes::tf::Point> TrackedLineInfo::base_point_odom

last reference point (in odom frame) for line tracking

Definition at line 62 of file line_info.h.

Referenced by distance(), and update().

◆ bearing_center

float TrackedLineInfo::bearing_center

Bearing towards line center, used to select lines "in front of us" when there.

Definition at line 68 of file line_info.h.

Referenced by LaserLinesThread::loop(), and update().

◆ cfg_switch_tolerance

float TrackedLineInfo::cfg_switch_tolerance

Configured line jitter threshold.

Definition at line 66 of file line_info.h.

◆ history

boost::circular_buffer<LineInfo> TrackedLineInfo::history

history of raw line geometries for computing moving average

Definition at line 67 of file line_info.h.

Referenced by update().

◆ input_frame_id

std::string TrackedLineInfo::input_frame_id

Input frame ID of raw line infos (base_laser usually)

Definition at line 64 of file line_info.h.

Referenced by distance(), and update().

◆ logger

fawkes::Logger* TrackedLineInfo::logger

Logger pointer of the calling class.

Definition at line 69 of file line_info.h.

Referenced by update().

◆ plugin_name

std::string TrackedLineInfo::plugin_name

Plugin name of the calling class.

Definition at line 70 of file line_info.h.

Referenced by update().

◆ raw

LineInfo TrackedLineInfo::raw

the latest geometry of this line, i.e. unfiltered

Definition at line 60 of file line_info.h.

Referenced by LaserLinesThread::loop(), and update().

◆ smooth

LineInfo TrackedLineInfo::smooth

moving-average geometry of this line (cf. length of history buffer)

Definition at line 61 of file line_info.h.

Referenced by LaserLinesThread::loop(), and update().

◆ tracking_frame_id

std::string TrackedLineInfo::tracking_frame_id

Track lines relative to this frame (e.g. odom helps compensate movement)

Definition at line 65 of file line_info.h.

Referenced by distance(), and update().

◆ transformer

fawkes::tf::Transformer* TrackedLineInfo::transformer

Transformer used to transform from input_frame_id_to odom.

Definition at line 63 of file line_info.h.

Referenced by distance(), and update().


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