aaa
Dependencies: mbed BNO055_fusion Adafruit_GFX ros_lib_kinetic
Diff: odometry/odom.h
- Revision:
- 4:cf1a4e503974
- Parent:
- 3:a45557a0dcb8
- Child:
- 5:e678f1ac6cdc
diff -r a45557a0dcb8 -r cf1a4e503974 odometry/odom.h --- a/odometry/odom.h Tue Dec 11 17:51:47 2018 +0000 +++ b/odometry/odom.h Wed Dec 12 03:35:52 2018 +0000 @@ -17,6 +17,9 @@ #define RAD2DEG(x) (((x) / 3.1416f) * 180.0f) #define ABS(x) (((x) > 0) ? (x) : -(x)) +#define COURT_RED false +#define COURT_BLUE true + class Odom { private: @@ -33,6 +36,7 @@ Vec3f world_velocity_; //For amcl + bool court_color_; Vec3f initialpose_; Vec3f drift_; @@ -53,6 +57,9 @@ void update_angle(); //Getter + bool get_court_color(){ + return court_color_; + } Vec3f get_world(){ return world_; } @@ -64,9 +71,15 @@ } //Setter + void set_court_color(bool court_color){ + court_color_ = court_color; + } void set_initialpose(Vec3f initialpose){ initialpose_ = initialpose; } + void set_world(Vec3f world){ + world_ = world; + } void set_drift(Vec3f drift){ drift_ = drift; } @@ -82,10 +95,6 @@ Odom *odom_; public: - Odom_Abstract(){ - - } - Odom_Abstract(Odom *odom) : odom_(odom){ } @@ -101,21 +110,30 @@ odom_->set_initialpose(initialpose); } + //Getter + bool get_court_color(){ + return odom_->get_court_color(); + } Vec3f get_initial_pose(){ return odom_->get_initialpose(); } - Vec3f get_pose(){ return odom_->get_world(); } - - void set_drift(Vec3f drift){ - odom_->set_drift(drift); - } - Vec3f get_drift(){ return odom_->get_drift(); } + //Setter + void set_court_color(bool court_color){ + odom_->set_court_color(court_color); + } + void set_pose(Vec3f pose){ + odom_->set_world(pose); + } + void set_drift(Vec3f drift){ + odom_->set_drift(drift); + } + }; #endif \ No newline at end of file