Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef MOVEIT_TRAJECTORY_PROCESSING_ITERATIVE_PARABOLIC_SMOOTHER_
00038 #define MOVEIT_TRAJECTORY_PROCESSING_ITERATIVE_PARABOLIC_SMOOTHER_
00039
00040 #include <trajectory_msgs/JointTrajectory.h>
00041 #include <moveit_msgs/JointLimits.h>
00042 #include <moveit_msgs/RobotState.h>
00043 #include <moveit/robot_trajectory/robot_trajectory.h>
00044
00045 namespace trajectory_processing
00046 {
00049 class IterativeParabolicTimeParameterization
00050 {
00051 public:
00052 IterativeParabolicTimeParameterization(unsigned int max_iterations = 100, double max_time_change_per_it = .01);
00053 ~IterativeParabolicTimeParameterization();
00054
00055 bool computeTimeStamps(robot_trajectory::RobotTrajectory& trajectory, const double max_velocity_scaling_factor = 1.0,
00056 const double max_acceleration_scaling_factor = 1.0) const;
00057
00058 private:
00059 unsigned int max_iterations_;
00060 double max_time_change_per_it_;
00061
00062 void applyVelocityConstraints(robot_trajectory::RobotTrajectory& rob_trajectory, std::vector<double>& time_diff,
00063 const double max_velocity_scaling_factor) const;
00064
00065 void applyAccelerationConstraints(robot_trajectory::RobotTrajectory& rob_trajectory, std::vector<double>& time_diff,
00066 const double max_acceleration_scaling_factor) const;
00067
00068 double findT1(const double d1, const double d2, double t1, const double t2, const double a_max) const;
00069 double findT2(const double d1, const double d2, const double t1, double t2, const double a_max) const;
00070 };
00071 }
00072
00073 #endif