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, const 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...
 
void not_visible_update ()
 Update this currently not visible line, make the visibility history (more) negative and invalidate the data. More...
 

Public Attributes

int interface_idx
 id of the interface, this line is written to, -1 when not yet assigned More...
 
int visibility_history
 visibility history of this line, negative for "no sighting" More...
 
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::Transformer * transformer
 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< LineInfo > history
 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::Logger * logger
 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 59 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,
const 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 65 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.

◆ not_visible_update()

void TrackedLineInfo::not_visible_update ( )

Update this currently not visible line, make the visibility history (more) negative and invalidate the data.

Definition at line 88 of file line_info.cpp.

References LineInfo::cloud, raw, smooth, and visibility_history.

◆ 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 67 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 77 of file line_info.h.

Referenced by update().

◆ cfg_switch_tolerance

float TrackedLineInfo::cfg_switch_tolerance

Configured line jitter threshold.

Definition at line 73 of file line_info.h.

◆ history

boost::circular_buffer<LineInfo> TrackedLineInfo::history

history of raw line geometries for computing moving average

Definition at line 75 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 70 of file line_info.h.

Referenced by distance(), and update().

◆ interface_idx

int TrackedLineInfo::interface_idx

id of the interface, this line is written to, -1 when not yet assigned

Definition at line 62 of file line_info.h.

◆ logger

fawkes::Logger* TrackedLineInfo::logger

Logger pointer of the calling class.

Definition at line 78 of file line_info.h.

Referenced by update().

◆ plugin_name

std::string TrackedLineInfo::plugin_name

Plugin name of the calling class.

Definition at line 79 of file line_info.h.

Referenced by update().

◆ raw

LineInfo TrackedLineInfo::raw

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

Definition at line 64 of file line_info.h.

Referenced by not_visible_update(), and update().

◆ smooth

LineInfo TrackedLineInfo::smooth

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

Definition at line 65 of file line_info.h.

Referenced by not_visible_update(), 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 72 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 69 of file line_info.h.

Referenced by distance(), and update().

◆ visibility_history

int TrackedLineInfo::visibility_history

visibility history of this line, negative for "no sighting"

Definition at line 63 of file line_info.h.

Referenced by not_visible_update(), and update().


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