29 #include <Eigen/Geometry> 42 namespace update_filters
45 const double JOINT_LIMIT_MARGIN = 0.00001;
47 PolynomialSmoother::PolynomialSmoother():
48 name_(
"ExponentialSmoother")
54 PolynomialSmoother::~PolynomialSmoother()
59 bool PolynomialSmoother::initialize(moveit::core::RobotModelConstPtr robot_model_ptr,
62 group_name_ = group_name;
63 robot_model_ = robot_model_ptr;
65 return configure(config);
75 poly_order_ =
static_cast<int>(params[
"poly_order"]);
86 bool PolynomialSmoother::setMotionPlanRequest(
const planning_scene::PlanningSceneConstPtr&
planning_scene,
87 const moveit_msgs::MotionPlanRequest &req,
89 moveit_msgs::MoveItErrorCodes& error_code)
91 error_code.val = error_code.SUCCESS;
95 bool PolynomialSmoother::filter(std::size_t start_timestep,
96 std::size_t num_timesteps,
98 const Eigen::MatrixXd& parameters,
99 Eigen::MatrixXd& updates,
102 using namespace Eigen;
104 using namespace utils::polynomial;
107 Eigen::MatrixXd parameters_updates = parameters + updates;
108 if(applyPolynomialSmoothing(robot_model_,group_name_,parameters_updates,poly_order_,JOINT_LIMIT_MARGIN))
110 updates = parameters_updates - parameters;
115 ROS_ERROR(
"Unable to polynomial smooth trajectory!");
const std::string & getMessage() const
This is a constrained polynomial trajectory smoother.
std::string getName(void *handle)
Interface class which applies filtering methods to the update parameters before it is added onto the ...
This defines a polynomial smoother update filter.
PLUGINLIB_EXPORT_CLASS(test_moveit_controller_manager::TestMoveItControllerManager, moveit_controller_manager::MoveItControllerManager)