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.
| gams::variables::Sensor::Sensor |
( |
| ) |
|
| 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) |
|
) |
| |
| gams::variables::Sensor::~Sensor |
( |
| ) |
|
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 a search area into index positions inside search area.
- Parameters
-
- Returns
- set of index positions considered inside search area
| double gams::variables::Sensor::get_discretization |
( |
| ) |
const |
Get the length of the side of each discretized cell.
- Returns
- discretization value
Gets GPS position from index position.
- Parameters
-
| index | index location in cartesian location on sensor map |
- Returns
- GPSPosition of index position
Gets current location on sensor map.
- Parameters
-
- Returns
- current location in cartesian location on sensor map
| std::string gams::variables::Sensor::get_name |
( |
| ) |
const |
Gets name.
- Returns
- name of sensor
Gets origin.
- Returns
- GPS origin
| double gams::variables::Sensor::get_range |
( |
| ) |
const |
Gets range in meters.
- Returns
- sensor range
| double gams::variables::Sensor::get_value |
( |
const pose::Position & |
pos | ) |
|
Gets value at location.
- Parameters
-
- Returns
- sensor value at pos
| 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
| 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 |
| void gams::variables::Sensor::init_vars |
( |
| ) |
|
|
protected |
Initialize madara containers.
| void gams::variables::Sensor::operator= |
( |
const Sensor & |
rhs | ) |
|
Assignment operator.
- Parameters
-
| void gams::variables::Sensor::regenerate_local_frame |
( |
void |
| ) |
|
|
protected |
| void gams::variables::Sensor::set_origin |
( |
const pose::Position & |
origin | ) |
|
| void gams::variables::Sensor::set_range |
( |
const double & |
range | ) |
|
Sets range in meters.
- Parameters
-
| 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 |
| madara::knowledge::KnowledgeBase* gams::variables::Sensor::knowledge_ |
|
protected |
knowledge base
Definition at line 222 of file Sensor.h.
local cartesian frame
Definition at line 234 of file Sensor.h.
| std::string gams::variables::Sensor::name_ |
|
protected |
name of the sensor
Definition at line 228 of file Sensor.h.
| madara::knowledge::containers::NativeDoubleArray gams::variables::Sensor::origin_ |
|
protected |
origin for index calculations
Definition at line 231 of file Sensor.h.
| madara::knowledge::containers::Double gams::variables::Sensor::range_ |
|
protected |
the range of the sensor, determines discretization
Definition at line 225 of file Sensor.h.
| 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: