Bratmobile
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ClosedLoop_Tracker Class Reference

Tracks task execution by observing changes in tracked disturbance. More...

#include <tracker.h>

Inheritance diagram for ClosedLoop_Tracker:
Inheritance graph
[legend]
Collaboration diagram for ClosedLoop_Tracker:
Collaboration graph
[legend]

Public Member Functions

TrackingResult get_transform (const Task &t, const CoordinateContainer &pts, const std::vector< BodyFeatures > &objects) override
 returns 2d transformation matrix between one scan and the next based on the displacement of disturbance Di for a task + the disturbance as observed (this is to update the noisy measurement) More...
 
TrackingResult track (const Task &t, const CoordinateContainer &pts, const std::vector< BodyFeatures > &objects)
 Tracks task execution. More...
 
cv::Rect2f real_world_focus (const Task *)
 returns an upright rectangle which represents a focus of attention for finding points corresponding to input task's disturbance
 
virtual std::vector< BodyFeatures >::const_iterator find_disturbance (std::vector< BodyFeatures >::const_iterator objects_begin, std::vector< BodyFeatures >::const_iterator objects_end, const BodyFeatures &dist, b2Transform t, float *_least_square=NULL)
 Get disturbance to be tracked among the worldbuilder objects. More...
 
void correctAngle (BodyFeatures &found, const BodyFeatures &dist)
 Sets angle to be smallest possible increment compared to dist. More...
 
void on_new_task (const Task &task, const Task &goal) override
 Uses the goal to reset tracked disturbance at each task. More...
 
virtual void on_new_reading (const Task &goal, const Task &currentTask) override
 Called every time asensor reading is available. More...
 
void set_attention (b2PolygonShape ps)
 
void init (const Task &goal)
 
virtual bool hasTaskEnded (Task &t)
 
void makeAttentionWindow (const Task &goal, const Task &currentTask)
 Updates the attention window at each sensor reading. More...
 
- Public Member Functions inherited from Tracker
Thresholdget_threshold ()
 
void register_learner (ThresholdLearner *l)
 
b2Transform getDeltaTransform ()
 
void make_log ()
 opens file where all the data is dumped
 

Protected Member Functions

float window_area ()
 gets the area of the attention window (for debugging)
 
- Protected Member Functions inherited from Tracker
void log_thresholds ()
 

Protected Attributes

Disturbance tracked_disturbance
 
b2PolygonShape attention_window
 
- Protected Attributes inherited from Tracker
friend Configurator
 
ThresholdLearnerlearner =NULL
 
b2Transform deltaTransform =b2Transform_zero
 

Additional Inherited Members

- Public Attributes inherited from Tracker
Threshold threshold =Threshold()
 

Detailed Description

Tracks task execution by observing changes in tracked disturbance.

Member Function Documentation

◆ correctAngle()

void ClosedLoop_Tracker::correctAngle ( BodyFeatures found,
const BodyFeatures dist 
)

Sets angle to be smallest possible increment compared to dist.

Parameters
foundthe found disturbance
distthe disturbance to be tracked

◆ find_disturbance()

std::vector< BodyFeatures >::const_iterator ClosedLoop_Tracker::find_disturbance ( std::vector< BodyFeatures >::const_iterator  objects_begin,
std::vector< BodyFeatures >::const_iterator  objects_end,
const BodyFeatures dist,
b2Transform  t,
float *  _least_square = NULL 
)
virtual

Get disturbance to be tracked among the worldbuilder objects.

Parameters
objectsworldBuilder objects
distdisturbance to be tracked
tthe estimated instantaneous 2d transform associated to the currently executed task

◆ get_transform()

TrackingResult ClosedLoop_Tracker::get_transform ( const Task t,
const CoordinateContainer pts,
const std::vector< BodyFeatures > &  objects 
)
overridevirtual

returns 2d transformation matrix between one scan and the next based on the displacement of disturbance Di for a task + the disturbance as observed (this is to update the noisy measurement)

Parameters
tthe current task
ptslidar reading
observed_disturbancedisturbance Di for task t
objectsobjects in the world (stored in worldbuilder)

Reimplemented from Tracker.

◆ makeAttentionWindow()

void ClosedLoop_Tracker::makeAttentionWindow ( const Task goal,
const Task currentTask 
)

Updates the attention window at each sensor reading.

Parameters
goalthe goal

◆ on_new_reading()

virtual void ClosedLoop_Tracker::on_new_reading ( const Task goal,
const Task currentTask 
)
inlineoverridevirtual

Called every time asensor reading is available.

Parameters
task

Implements Tracker.

◆ on_new_task()

void ClosedLoop_Tracker::on_new_task ( const Task task,
const Task goal 
)
overridevirtual

Uses the goal to reset tracked disturbance at each task.

Parameters
taskthe new task
goalthe goal

Implements Tracker.

◆ track()

TrackingResult ClosedLoop_Tracker::track ( const Task t,
const CoordinateContainer pts,
const std::vector< BodyFeatures > &  objects 
)
virtual

Tracks task execution.

Parameters
tinput task
ptspoint cloud
observed_disturbancepointer body features of the observed disturbance.
objectsworld objects as extracted in worldbuilder
Returns
b2Transform that the robot has moved by, can use for updating cognitive map and control

Implements Tracker.


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