diff --git a/industrial_trajectory_filters/src/uniform_sample_filter.cpp b/industrial_trajectory_filters/src/uniform_sample_filter.cpp index e598f433..2f7a9934 100644 --- a/industrial_trajectory_filters/src/uniform_sample_filter.cpp +++ b/industrial_trajectory_filters/src/uniform_sample_filter.cpp @@ -77,6 +77,12 @@ template trajectory_out = trajectory_in; + if(size_in <= 1) + { + ROS_WARN("A minimal trajectory of 2 points is required to apply a uniform sampling filter"); + return false; + } + // Clear out the trajectory points trajectory_out.request.trajectory.points.clear();