54 #ifndef _GAMS_PLATFORM_BASE_H_ 55 #define _GAMS_PLATFORM_BASE_H_ 66 #include "madara/knowledge/KnowledgeBase.h" 73 class Multicontroller;
113 virtual bool check_position(
125 virtual bool check_orientation(
144 double dist_ = 0.1, radians_ = M_PI/16;
160 : dist_(dist), radians_(radians) {}
170 template<
typename AngleUnits>
171 Epsilon(
double dist,
double angle, AngleUnits u)
172 : dist_(dist), radians_(u.to_radians(angle)) {}
183 return fabs(current.angle_to(target)) <= radians_;
204 madara::knowledge::KnowledgeBase * knowledge = 0,
223 virtual int analyze (
void) = 0;
229 virtual double get_accuracy (
void)
const;
258 virtual std::string get_name ()
const = 0;
265 virtual std::string get_id ()
const = 0;
271 virtual double get_min_sensor_range ()
const;
276 virtual double get_move_speed ()
const;
295 virtual int home (
void);
301 virtual int land (
void);
309 return move (target,
Epsilon());
328 return move (target,
Epsilon(epsilon));
337 return orient (target,
Epsilon());
356 return orient(target,
Epsilon (epsilon));
375 return pose (target,
Epsilon());
394 virtual int pose (
const pose::Pose & target,
const PoseBounds &bounds);
414 double loc_epsilon,
double rot_epsilon = M_PI/16) {
415 return pose(target,
Epsilon(loc_epsilon, rot_epsilon));
421 virtual void pause_move (
void);
427 virtual int sense (
void) = 0;
433 void set_knowledge (madara::knowledge::KnowledgeBase * rhs);
439 virtual void set_move_speed (
const double& speed);
450 virtual void stop_move (
void);
455 virtual void resume_move (
void);
460 virtual void resume_orientation (
void);
465 virtual void stop_orientation (
void);
471 virtual int takeoff (
void);
477 madara::knowledge::KnowledgeBase * get_knowledge_base (
void)
const;
537 #include "BasePlatform.inl" 539 #endif // _GAMS_PLATFORM_BASE_H_
static const detail::radians_t radians
Radians unit flag; see Euler constructor.
A container for sensor information.
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
Copyright (c) 2014 Carnegie Mellon University.
Copyright (c) 2014 Carnegie Mellon University.
double distance_to(const derived_type &target) const
Calculate distance from this Coordinate to a target.
Contains all GAMS-related tools, classes and code.
A container for self referencing information.
std::vector< std::string > SensorNames
a list of sensor names
The basic controller that can be used to perform actions on platforms and algorithms.
A controller that has the capability of starting many different threads.
Provides Reference Frame (i.e., coordinate systemm) transforms.
A position in an x, y, z coordinate system.
Copyright (c) 2014 Carnegie Mellon University.