00001 /* -*- mode: C++ -*- 00002 * 00003 * Copyright (C) 2011 Austin Robot Technology 00004 * License: Modified BSD Software License Agreement 00005 * 00006 * $Id: nearest_forward.h 1866 2011-11-22 03:06:45Z cor0505@aol.com $ 00007 */ 00008 00017 #ifndef _NEAREST_FORWARD_OBSERVER_H_ 00018 #define _NEAREST_FORWARD_OBSERVER_H_ 00019 00020 #include <art_observers/filter.h> 00021 #include <art_observers/observer.h> 00022 00023 namespace observers 00024 { 00025 00027 class NearestForward: public Observer 00028 { 00029 public: 00030 NearestForward(art_observers::ObserversConfig &config); 00031 ~NearestForward(); 00032 00033 virtual art_msgs::Observation 00034 update(const art_msgs::ArtLanes &local_map, 00035 const art_msgs::ArtLanes &obstacles, 00036 const MapPose pose_); 00037 00038 private: 00039 std::vector<float> distance_; 00040 00041 MedianFilter distance_filter_; 00042 MeanFilter velocity_filter_; 00043 00044 ros::Time prev_update_; 00045 }; 00046 00047 }; // namespace observers 00048 00049 #endif // _NEAREST_FORWARD_OBSERVER_H_