00001
00002 #ifndef PR2_MSGS_MESSAGE_LASERTRAJCMD_H
00003 #define PR2_MSGS_MESSAGE_LASERTRAJCMD_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "std_msgs/Header.h"
00014
00015 namespace pr2_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct LaserTrajCmd_ : public ros::Message
00019 {
00020 typedef LaserTrajCmd_<ContainerAllocator> Type;
00021
00022 LaserTrajCmd_()
00023 : header()
00024 , profile()
00025 , position()
00026 , time_from_start()
00027 , max_velocity(0.0)
00028 , max_acceleration(0.0)
00029 {
00030 }
00031
00032 LaserTrajCmd_(const ContainerAllocator& _alloc)
00033 : header(_alloc)
00034 , profile(_alloc)
00035 , position(_alloc)
00036 , time_from_start(_alloc)
00037 , max_velocity(0.0)
00038 , max_acceleration(0.0)
00039 {
00040 }
00041
00042 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00043 ::std_msgs::Header_<ContainerAllocator> header;
00044
00045 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _profile_type;
00046 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > profile;
00047
00048 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _position_type;
00049 std::vector<double, typename ContainerAllocator::template rebind<double>::other > position;
00050
00051 typedef std::vector<ros::Duration, typename ContainerAllocator::template rebind<ros::Duration>::other > _time_from_start_type;
00052 std::vector<ros::Duration, typename ContainerAllocator::template rebind<ros::Duration>::other > time_from_start;
00053
00054 typedef double _max_velocity_type;
00055 double max_velocity;
00056
00057 typedef double _max_acceleration_type;
00058 double max_acceleration;
00059
00060
00061 ROS_DEPRECATED uint32_t get_position_size() const { return (uint32_t)position.size(); }
00062 ROS_DEPRECATED void set_position_size(uint32_t size) { position.resize((size_t)size); }
00063 ROS_DEPRECATED void get_position_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->position; }
00064 ROS_DEPRECATED void set_position_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->position = vec; }
00065 ROS_DEPRECATED uint32_t get_time_from_start_size() const { return (uint32_t)time_from_start.size(); }
00066 ROS_DEPRECATED void set_time_from_start_size(uint32_t size) { time_from_start.resize((size_t)size); }
00067 ROS_DEPRECATED void get_time_from_start_vec(std::vector<ros::Duration, typename ContainerAllocator::template rebind<ros::Duration>::other > & vec) const { vec = this->time_from_start; }
00068 ROS_DEPRECATED void set_time_from_start_vec(const std::vector<ros::Duration, typename ContainerAllocator::template rebind<ros::Duration>::other > & vec) { this->time_from_start = vec; }
00069 private:
00070 static const char* __s_getDataType_() { return "pr2_msgs/LaserTrajCmd"; }
00071 public:
00072 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00073
00074 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00075
00076 private:
00077 static const char* __s_getMD5Sum_() { return "68a1665e9079049dce55a0384cb2e9b5"; }
00078 public:
00079 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00080
00081 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00082
00083 private:
00084 static const char* __s_getMessageDefinition_() { return "# This message is used to set the profile that the tilt laser controller\n\
00085 # executes.\n\
00086 Header header\n\
00087 string profile # options are currently \"linear\" or \"linear_blended\"\n\
00088 float64[] position # Laser positions\n\
00089 duration[] time_from_start # Times to reach laser positions in seconds\n\
00090 float64 max_velocity # Set <= 0 to use default\n\
00091 float64 max_acceleration # Set <= 0 to use default\n\
00092 \n\
00093 ================================================================================\n\
00094 MSG: std_msgs/Header\n\
00095 # Standard metadata for higher-level stamped data types.\n\
00096 # This is generally used to communicate timestamped data \n\
00097 # in a particular coordinate frame.\n\
00098 # \n\
00099 # sequence ID: consecutively increasing ID \n\
00100 uint32 seq\n\
00101 #Two-integer timestamp that is expressed as:\n\
00102 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00103 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00104 # time-handling sugar is provided by the client library\n\
00105 time stamp\n\
00106 #Frame this data is associated with\n\
00107 # 0: no frame\n\
00108 # 1: global frame\n\
00109 string frame_id\n\
00110 \n\
00111 "; }
00112 public:
00113 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00114
00115 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00116
00117 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00118 {
00119 ros::serialization::OStream stream(write_ptr, 1000000000);
00120 ros::serialization::serialize(stream, header);
00121 ros::serialization::serialize(stream, profile);
00122 ros::serialization::serialize(stream, position);
00123 ros::serialization::serialize(stream, time_from_start);
00124 ros::serialization::serialize(stream, max_velocity);
00125 ros::serialization::serialize(stream, max_acceleration);
00126 return stream.getData();
00127 }
00128
00129 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00130 {
00131 ros::serialization::IStream stream(read_ptr, 1000000000);
00132 ros::serialization::deserialize(stream, header);
00133 ros::serialization::deserialize(stream, profile);
00134 ros::serialization::deserialize(stream, position);
00135 ros::serialization::deserialize(stream, time_from_start);
00136 ros::serialization::deserialize(stream, max_velocity);
00137 ros::serialization::deserialize(stream, max_acceleration);
00138 return stream.getData();
00139 }
00140
00141 ROS_DEPRECATED virtual uint32_t serializationLength() const
00142 {
00143 uint32_t size = 0;
00144 size += ros::serialization::serializationLength(header);
00145 size += ros::serialization::serializationLength(profile);
00146 size += ros::serialization::serializationLength(position);
00147 size += ros::serialization::serializationLength(time_from_start);
00148 size += ros::serialization::serializationLength(max_velocity);
00149 size += ros::serialization::serializationLength(max_acceleration);
00150 return size;
00151 }
00152
00153 typedef boost::shared_ptr< ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> > Ptr;
00154 typedef boost::shared_ptr< ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> const> ConstPtr;
00155 };
00156 typedef ::pr2_msgs::LaserTrajCmd_<std::allocator<void> > LaserTrajCmd;
00157
00158 typedef boost::shared_ptr< ::pr2_msgs::LaserTrajCmd> LaserTrajCmdPtr;
00159 typedef boost::shared_ptr< ::pr2_msgs::LaserTrajCmd const> LaserTrajCmdConstPtr;
00160
00161
00162 template<typename ContainerAllocator>
00163 std::ostream& operator<<(std::ostream& s, const ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> & v)
00164 {
00165 ros::message_operations::Printer< ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> >::stream(s, "", v);
00166 return s;}
00167
00168 }
00169
00170 namespace ros
00171 {
00172 namespace message_traits
00173 {
00174 template<class ContainerAllocator>
00175 struct MD5Sum< ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> > {
00176 static const char* value()
00177 {
00178 return "68a1665e9079049dce55a0384cb2e9b5";
00179 }
00180
00181 static const char* value(const ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> &) { return value(); }
00182 static const uint64_t static_value1 = 0x68a1665e9079049dULL;
00183 static const uint64_t static_value2 = 0xce55a0384cb2e9b5ULL;
00184 };
00185
00186 template<class ContainerAllocator>
00187 struct DataType< ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> > {
00188 static const char* value()
00189 {
00190 return "pr2_msgs/LaserTrajCmd";
00191 }
00192
00193 static const char* value(const ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> &) { return value(); }
00194 };
00195
00196 template<class ContainerAllocator>
00197 struct Definition< ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> > {
00198 static const char* value()
00199 {
00200 return "# This message is used to set the profile that the tilt laser controller\n\
00201 # executes.\n\
00202 Header header\n\
00203 string profile # options are currently \"linear\" or \"linear_blended\"\n\
00204 float64[] position # Laser positions\n\
00205 duration[] time_from_start # Times to reach laser positions in seconds\n\
00206 float64 max_velocity # Set <= 0 to use default\n\
00207 float64 max_acceleration # Set <= 0 to use default\n\
00208 \n\
00209 ================================================================================\n\
00210 MSG: std_msgs/Header\n\
00211 # Standard metadata for higher-level stamped data types.\n\
00212 # This is generally used to communicate timestamped data \n\
00213 # in a particular coordinate frame.\n\
00214 # \n\
00215 # sequence ID: consecutively increasing ID \n\
00216 uint32 seq\n\
00217 #Two-integer timestamp that is expressed as:\n\
00218 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00219 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00220 # time-handling sugar is provided by the client library\n\
00221 time stamp\n\
00222 #Frame this data is associated with\n\
00223 # 0: no frame\n\
00224 # 1: global frame\n\
00225 string frame_id\n\
00226 \n\
00227 ";
00228 }
00229
00230 static const char* value(const ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> &) { return value(); }
00231 };
00232
00233 template<class ContainerAllocator> struct HasHeader< ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> > : public TrueType {};
00234 template<class ContainerAllocator> struct HasHeader< const ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> > : public TrueType {};
00235 }
00236 }
00237
00238 namespace ros
00239 {
00240 namespace serialization
00241 {
00242
00243 template<class ContainerAllocator> struct Serializer< ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> >
00244 {
00245 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00246 {
00247 stream.next(m.header);
00248 stream.next(m.profile);
00249 stream.next(m.position);
00250 stream.next(m.time_from_start);
00251 stream.next(m.max_velocity);
00252 stream.next(m.max_acceleration);
00253 }
00254
00255 ROS_DECLARE_ALLINONE_SERIALIZER;
00256 };
00257 }
00258 }
00259
00260 namespace ros
00261 {
00262 namespace message_operations
00263 {
00264
00265 template<class ContainerAllocator>
00266 struct Printer< ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> >
00267 {
00268 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_msgs::LaserTrajCmd_<ContainerAllocator> & v)
00269 {
00270 s << indent << "header: ";
00271 s << std::endl;
00272 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00273 s << indent << "profile: ";
00274 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.profile);
00275 s << indent << "position[]" << std::endl;
00276 for (size_t i = 0; i < v.position.size(); ++i)
00277 {
00278 s << indent << " position[" << i << "]: ";
00279 Printer<double>::stream(s, indent + " ", v.position[i]);
00280 }
00281 s << indent << "time_from_start[]" << std::endl;
00282 for (size_t i = 0; i < v.time_from_start.size(); ++i)
00283 {
00284 s << indent << " time_from_start[" << i << "]: ";
00285 Printer<ros::Duration>::stream(s, indent + " ", v.time_from_start[i]);
00286 }
00287 s << indent << "max_velocity: ";
00288 Printer<double>::stream(s, indent + " ", v.max_velocity);
00289 s << indent << "max_acceleration: ";
00290 Printer<double>::stream(s, indent + " ", v.max_acceleration);
00291 }
00292 };
00293
00294
00295 }
00296 }
00297
00298 #endif // PR2_MSGS_MESSAGE_LASERTRAJCMD_H
00299