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()
00048 : lower(0.0)
00049 , upper(0.0)
00050 {}
00051
00056 explicit TimingConstraint(double nominal)
00057 : lower(nominal)
00058 , upper(nominal)
00059 {
00060 if (nominal < 0.0)
00061 {
00062 ROS_WARN_STREAM("Nominal time value must be greater than or equal to 0.0");
00063 lower = 0.0;
00064 upper = 0.0;
00065 }
00066 }
00067
00073 TimingConstraint(double lower, double upper)
00074 : lower(lower)
00075 , upper(upper)
00076 {
00077 if (lower < 0.0)
00078 {
00079 ROS_WARN_STREAM("Lower time value must be greater than or equal to 0.0");
00080 lower = 0.0;
00081 }
00082
00083 if (upper < 0.0)
00084 {
00085 ROS_WARN_STREAM("Upper time value must be greater than or equal to 0.0");
00086 upper = 0.0;
00087 }
00088 }
00089
00094 bool isSpecified() const { return upper > 0.0; }
00095
00096 double lower, upper;
00097 };
00098
00099 }
00100
00101 #endif