Go to the documentation of this file.
38 #include <moveit/version.h>
61 #if MOVEIT_VERSION_MAJOR < 1 || (MOVEIT_VERSION_MAJOR == 1 && MOVEIT_VERSION_MINOR < 1)
69 #if MOVEIT_VERSION_MAJOR >= 1 && MOVEIT_VERSION_MINOR >= 1
91 std::vector<double> temp_coef;
93 if(temp_coef.size()%2 == 1 && temp_coef.size()>2){
95 for(
int i=0; i< (int) temp_coef.size(); i++){
100 ROS_INFO_STREAM(
"Could not read filter, using default filter coefficients");
104 ROS_ERROR(
"Initialization error on smoothing filter. Requires an odd number of coeficients");
112 virtual std::string
getDescription()
const {
return "Add Smoothing Trajectory Filter"; }
125 std::vector<std::size_t> &added_path_index)
const
139 ROS_ERROR(
"Smoothing filter of the solution path failed. Filter Not Initialized ");
bool getParam(const std::string &key, bool &b) const
virtual bool adaptAndPlan(const PlannerFn &planner, const planning_scene::PlanningSceneConstPtr &planning_scene, const planning_interface::MotionPlanRequest &req, planning_interface::MotionPlanResponse &res, std::vector< std::size_t > &added_path_index) const
The work hourse of planning request adapters.
virtual std::string getDescription() const
Returns a short description of this plugin.
robot_trajectory::RobotTrajectoryPtr trajectory_
bool init(std::vector< double > &coef)
Constructor.
virtual void initialize(const ros::NodeHandle &node_handle)
load parameters from a certain namespace
#define ROS_INFO_STREAM(args)
moveit_msgs::MotionPlanRequest MotionPlanRequest
~AddSmoothingFilter()
Destructor.
industrial_trajectory_filters::SmoothingTrajectoryFilter smoothing_filter_
boost::function< bool(const planning_scene::PlanningSceneConstPtr &, const planning_interface::MotionPlanRequest &, planning_interface::MotionPlanResponse &)> PlannerFn
CLASS_LOADER_REGISTER_CLASS(industrial_trajectory_filters::AddSmoothingFilter, planning_request_adapter::PlanningRequestAdapter)
std::vector< double > filter_coef_
static const std::string FILTER_PARAMETER_NAME_
bool applyFilter(robot_trajectory::RobotTrajectory &rob_trajectory) const
AddSmoothingFilter()
Constructor AddSmoothingFilter is a planning request adapter plugin which post-processes The robot's ...
This class filters the trajectory using a Finite Impluse Response filter.