54 #ifndef _GAMS_VARIABLES_SENSOR_H_
55 #define _GAMS_VARIABLES_SENSOR_H_
62 #include "madara/knowledge/containers/Double.h"
63 #include "madara/knowledge/containers/Map.h"
64 #include "madara/knowledge/KnowledgeBase.h"
92 madara::knowledge::KnowledgeBase * knowledge,
93 const double & range = 0.0,
189 const madara::knowledge::KnowledgeUpdateSettings& settings =
190 madara::knowledge::KnowledgeUpdateSettings());
199 madara::knowledge::KnowledgeBase* knowledge,
200 const double & range = 0.0,
219 madara::knowledge::containers::Map
value_;
225 madara::knowledge::containers::Double
range_;
231 madara::knowledge::containers::NativeDoubleArray
origin_;
238 typedef std::map <std::string, Sensor*>
Sensors;
Provides Reference Frame (i.e., coordinate systemm) transforms.
A helper class for region information.
A utility class for search areas.
A container for sensor information.
pose::Position get_origin()
Gets origin.
void operator=(const Sensor &rhs)
Assignment operator.
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.
void set_origin(const pose::Position &origin)
Sets origin.
madara::knowledge::containers::Map value_
the map of locations to sensor value
double get_discretization() const
Get the length of the side of each discretized cell.
std::string index_pos_to_index(const pose::Position &pos) const
Convert index position to string index.
double get_range() const
Gets range in meters.
std::string name_
name of the 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))
Constructor.
double get_value(const pose::Position &pos)
Gets value at location.
std::string get_name() const
Gets name.
madara::knowledge::containers::Double range_
the range of the sensor, determines discretization
set< pose::Position > discretize(const pose::Region ®ion)
Discretize a search area into index positions inside search area.
void set_range(const double &range)
Sets range in meters.
pose::ReferenceFrame local_frame_
local cartesian frame
void regenerate_local_frame(void)
pose::Position get_gps_from_index(const pose::Position &index)
Gets GPS position from index position.
madara::knowledge::containers::NativeDoubleArray origin_
origin for index calculations
void init_vars()
Initialize madara containers.
set< pose::Position > discretize(const pose::SearchArea &area)
Discretize a search area into index positions inside search area.
madara::knowledge::KnowledgeBase * knowledge_
knowledge base
pose::Position get_index_from_gps(const pose::Position &pos)
Gets current location on sensor map.
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.
GAMS_EXPORT const ReferenceFrame & gps_frame(void)
Returns the canonical GPS frame representing Earth.
std::vector< std::string > SensorNames
a list of sensor names
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
Contains all GAMS-related tools, classes and code.
Copyright (c) 2015 Carnegie Mellon University.
Copyright (c) 2015 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.