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 #ifndef TRAJECTORY_TIMING_CONSTRAINT_H
00026 #define TRAJECTORY_TIMING_CONSTRAINT_H
00027
00028 #include <ros/console.h>
00029
00030 namespace descartes_core
00031 {
00042 struct TimingConstraint
00043 {
00047 TimingConstraint() : lower(0.0), upper(0.0)
00048 {
00049 }
00050
00055 explicit TimingConstraint(double nominal) : lower(nominal), upper(nominal)
00056 {
00057 if (nominal < 0.0)
00058 {
00059 ROS_WARN_STREAM("Nominal time value must be greater than or equal to 0.0");
00060 lower = 0.0;
00061 upper = 0.0;
00062 }
00063 }
00064
00070 TimingConstraint(double lower, double upper) : lower(lower), upper(upper)
00071 {
00072 if (lower < 0.0)
00073 {
00074 ROS_WARN_STREAM("Lower time value must be greater than or equal to 0.0");
00075 lower = 0.0;
00076 }
00077
00078 if (upper < 0.0)
00079 {
00080 ROS_WARN_STREAM("Upper time value must be greater than or equal to 0.0");
00081 upper = 0.0;
00082 }
00083 }
00084
00089 bool isSpecified() const
00090 {
00091 return upper > 0.0;
00092 }
00093
00094 double lower, upper;
00095 };
00096
00097 }
00098
00099 #endif