00001 /* 00002 * UOS-ROS packages - Robot Operating System code by the University of Osnabrück 00003 * Copyright (C) 2010 University of Osnabrück 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 * 00019 * katana_trajectory_filter.h 00020 * 00021 * Created on: 04.02.2011 00022 * Author: Martin Günther <mguenthe@uos.de> 00023 */ 00024 00025 #ifndef KATANA_TRAJECTORY_FILTER_H_ 00026 #define KATANA_TRAJECTORY_FILTER_H_ 00027 00028 #include <ros/ros.h> 00029 00030 #include <trajectory_msgs/JointTrajectory.h> 00031 #include <arm_navigation_msgs/JointTrajectoryWithLimits.h> 00032 #include <arm_navigation_msgs/JointLimits.h> 00033 #include <arm_navigation_msgs/FilterJointTrajectory.h> 00034 #include <arm_navigation_msgs/FilterJointTrajectoryWithConstraints.h> 00035 00036 #include <spline_smoother/spline_smoother.h> 00037 #include <pluginlib/class_list_macros.h> 00038 00039 #include <spline_smoother/spline_smoother_utils.h> 00040 00041 #include <vector> 00042 #include <set> 00043 00044 namespace katana_trajectory_filter 00045 { 00046 00050 template<typename T> 00051 class KatanaTrajectoryFilter : public spline_smoother::SplineSmoother<T> 00052 { 00053 public: 00054 KatanaTrajectoryFilter(); 00055 virtual ~KatanaTrajectoryFilter(); 00056 00057 virtual bool smooth(const T& trajectory_in, T& trajectory_out) const; 00058 00059 private: 00060 void remove_smallest_segments(const T& trajectory_in, T& trajectory_out, const size_t num_points_delete) const; 00061 00062 }; 00063 00064 } 00065 00066 #endif /* KATANA_TRAJECTORY_FILTER_H_ */