A container for sensor information.
More...
#include <Sensor.h>
|
| Sensor () |
| Constructor. More...
|
|
| Sensor (const std::string &name, madara::knowledge::KnowledgeBase *knowledge, const double &range=0.0, const pose::Position &origin=pose::Position(pose::gps_frame(), DBL_MAX, DBL_MAX)) |
| Constructor. More...
|
|
| ~Sensor () |
| Destructor. More...
|
|
set< pose::Position > | discretize (const pose::Region ®ion) |
| Discretize a search area into index positions inside search area. More...
|
|
set< pose::Position > | discretize (const pose::SearchArea &area) |
| Discretize a search area into index positions inside search area. More...
|
|
double | get_discretization () const |
| Get the length of the side of each discretized cell. More...
|
|
pose::Position | get_gps_from_index (const pose::Position &index) |
| Gets GPS position from index position. More...
|
|
pose::Position | get_index_from_gps (const pose::Position &pos) |
| Gets current location on sensor map. More...
|
|
std::string | get_name () const |
| Gets name. More...
|
|
pose::Position | get_origin () |
| Gets origin. More...
|
|
double | get_range () const |
| Gets range in meters. More...
|
|
double | get_value (const pose::Position &pos) |
| Gets value at location. More...
|
|
void | init_vars (const std::string &name, madara::knowledge::KnowledgeBase *knowledge, const double &range=0.0, const pose::Position &origin=pose::Position(pose::gps_frame(), DBL_MAX, DBL_MAX)) |
| Initializes the variables. More...
|
|
void | operator= (const Sensor &rhs) |
| Assignment operator. More...
|
|
void | set_origin (const pose::Position &origin) |
| Sets origin. More...
|
|
void | set_range (const double &range) |
| Sets range in meters. More...
|
|
void | set_value (const pose::Position &pos, const double &val, const madara::knowledge::KnowledgeUpdateSettings &settings=madara::knowledge::KnowledgeUpdateSettings()) |
| Sets value at a point with position. More...
|
|
A container for sensor information.
Definition at line 80 of file Sensor.h.
◆ Sensor() [1/2]
gams::variables::Sensor::Sensor |
( |
| ) |
|
◆ Sensor() [2/2]
gams::variables::Sensor::Sensor |
( |
const std::string & |
name, |
|
|
madara::knowledge::KnowledgeBase * |
knowledge, |
|
|
const double & |
range = 0.0 , |
|
|
const pose::Position & |
origin = pose::Position(pose::gps_frame(), DBL_MAX, DBL_MAX) |
|
) |
| |
◆ ~Sensor()
gams::variables::Sensor::~Sensor |
( |
| ) |
|
◆ discretize() [1/2]
Discretize a search area into index positions inside search area.
- Parameters
-
region | region to discretize |
- Returns
- set of index positions considered inside search area
◆ discretize() [2/2]
Discretize a search area into index positions inside search area.
- Parameters
-
- Returns
- set of index positions considered inside search area
◆ get_discretization()
double gams::variables::Sensor::get_discretization |
( |
| ) |
const |
Get the length of the side of each discretized cell.
- Returns
- discretization value
◆ get_gps_from_index()
Gets GPS position from index position.
- Parameters
-
index | index location in cartesian location on sensor map |
- Returns
- GPSPosition of index position
◆ get_index_from_gps()
Gets current location on sensor map.
- Parameters
-
- Returns
- current location in cartesian location on sensor map
◆ get_name()
std::string gams::variables::Sensor::get_name |
( |
| ) |
const |
Gets name.
- Returns
- name of sensor
◆ get_origin()
Gets origin.
- Returns
- GPS origin
◆ get_range()
double gams::variables::Sensor::get_range |
( |
| ) |
const |
Gets range in meters.
- Returns
- sensor range
◆ get_value()
double gams::variables::Sensor::get_value |
( |
const pose::Position & |
pos | ) |
|
Gets value at location.
- Parameters
-
- Returns
- sensor value at pos
◆ index_pos_to_index()
std::string gams::variables::Sensor::index_pos_to_index |
( |
const pose::Position & |
pos | ) |
const |
|
protected |
Convert index position to string index.
- Parameters
-
- Returns
- string index into map
◆ init_vars() [1/2]
void gams::variables::Sensor::init_vars |
( |
| ) |
|
|
protected |
Initialize madara containers.
◆ init_vars() [2/2]
void gams::variables::Sensor::init_vars |
( |
const std::string & |
name, |
|
|
madara::knowledge::KnowledgeBase * |
knowledge, |
|
|
const double & |
range = 0.0 , |
|
|
const pose::Position & |
origin = pose::Position(pose::gps_frame(), DBL_MAX, DBL_MAX) |
|
) |
| |
Initializes the variables.
- Parameters
-
name | name of the sensor |
knowledge | the knowledge base |
range | the range |
origin | the GPS origin |
◆ operator=()
void gams::variables::Sensor::operator= |
( |
const Sensor & |
rhs | ) |
|
Assignment operator.
- Parameters
-
◆ regenerate_local_frame()
void gams::variables::Sensor::regenerate_local_frame |
( |
void |
| ) |
|
|
protected |
◆ set_origin()
void gams::variables::Sensor::set_origin |
( |
const pose::Position & |
origin | ) |
|
◆ set_range()
void gams::variables::Sensor::set_range |
( |
const double & |
range | ) |
|
Sets range in meters.
- Parameters
-
◆ set_value()
void gams::variables::Sensor::set_value |
( |
const pose::Position & |
pos, |
|
|
const double & |
val, |
|
|
const madara::knowledge::KnowledgeUpdateSettings & |
settings = madara::knowledge::KnowledgeUpdateSettings() |
|
) |
| |
Sets value at a point with position.
- Parameters
-
pos | position to set |
val | value to set at position |
settings | settings to use for mutating value |
◆ knowledge_
madara::knowledge::KnowledgeBase* gams::variables::Sensor::knowledge_ |
|
protected |
knowledge base
Definition at line 222 of file Sensor.h.
◆ local_frame_
local cartesian frame
Definition at line 234 of file Sensor.h.
◆ name_
std::string gams::variables::Sensor::name_ |
|
protected |
name of the sensor
Definition at line 228 of file Sensor.h.
◆ origin_
madara::knowledge::containers::NativeDoubleArray gams::variables::Sensor::origin_ |
|
protected |
origin for index calculations
Definition at line 231 of file Sensor.h.
◆ range_
madara::knowledge::containers::Double gams::variables::Sensor::range_ |
|
protected |
the range of the sensor, determines discretization
Definition at line 225 of file Sensor.h.
◆ value_
madara::knowledge::containers::Map gams::variables::Sensor::value_ |
|
protected |
the map of locations to sensor value
Definition at line 219 of file Sensor.h.
The documentation for this class was generated from the following file: