ab_filter_height.h
Go to the documentation of this file.
00001 /*
00002  *  Alpha-Beta Filter
00003  *  Copyright (C) 2011, CCNY Robotics Lab
00004  *  Ivan Dryanovski <ivan.dryanovski@gmail.com>
00005  *
00006  *  http://robotics.ccny.cuny.edu
00007  *
00008  *  This program is free software: you can redistribute it and/or modify
00009  *  it under the terms of the GNU General Public License as published by
00010  *  the Free Software Foundation, either version 3 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  This program is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *  GNU General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU General Public License
00019  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020  */
00021 
00022 #ifndef AB_FILTER_AB_FILTER_HEIGHT_H
00023 #define AB_FILTER_AB_FILTER_HEIGHT_H
00024 
00025 #include <ros/ros.h>
00026 #include <geometry_msgs/Pose2D.h>
00027 #include <geometry_msgs/Pose.h>
00028 
00029 #include <mav_msgs/Height.h>
00030 
00031 namespace mav
00032 {
00033 
00034 class ABFilterHeight
00035 {
00036   typedef mav_msgs::Height HeightMsg;
00037 
00038   private:
00039 
00040     // **** ROS-related
00041     ros::NodeHandle nh_;
00042     ros::NodeHandle nh_private_;
00043 
00044     ros::Subscriber height_subscriber_;
00045 
00046     ros::Publisher publisher_;
00047 
00048     // **** state variables    
00049 
00050     bool initialized_;
00051     ros::Time last_update_time_;
00052 
00053     HeightMsg height_;
00054 
00055     // **** parameters
00056   
00057     double alpha_;
00058     double beta_;
00059 
00060     // **** member functions
00061 
00062     void initializeParams();
00063 
00064     void heightCallback(const HeightMsg::ConstPtr height_msg);
00065     void publishHeight();
00066 
00067 
00068   public:
00069 
00070     ABFilterHeight(ros::NodeHandle nh, ros::NodeHandle nh_private);
00071     virtual ~ABFilterHeight();
00072 };
00073 
00074 } // end namespace mav
00075 
00076 #endif // AB_FILTER_AB_FILTER_HEIGHT_H


ab_filter
Author(s): Ivan Dryanovski
autogenerated on Thu Jan 2 2014 11:28:26