00001
00002 #ifndef VELODYNE_COMMON_MESSAGE_RAWSCAN_H
00003 #define VELODYNE_COMMON_MESSAGE_RAWSCAN_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 velodyne_common
00016 {
00017 template <class ContainerAllocator>
00018 struct RawScan_ : public ros::Message
00019 {
00020 typedef RawScan_<ContainerAllocator> Type;
00021
00022 RawScan_()
00023 : header()
00024 , data()
00025 {
00026 }
00027
00028 RawScan_(const ContainerAllocator& _alloc)
00029 : header(_alloc)
00030 , data(_alloc)
00031 {
00032 }
00033
00034 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00035 ::std_msgs::Header_<ContainerAllocator> header;
00036
00037 typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _data_type;
00038 std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > data;
00039
00040 enum { PACKET_SIZE = 1206 };
00041 enum { PACKETS_PER_REVOLUTION = 260 };
00042
00043 ROS_DEPRECATED uint32_t get_data_size() const { return (uint32_t)data.size(); }
00044 ROS_DEPRECATED void set_data_size(uint32_t size) { data.resize((size_t)size); }
00045 ROS_DEPRECATED void get_data_vec(std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) const { vec = this->data; }
00046 ROS_DEPRECATED void set_data_vec(const std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) { this->data = vec; }
00047 private:
00048 static const char* __s_getDataType_() { return "velodyne_common/RawScan"; }
00049 public:
00050 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00051
00052 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00053
00054 private:
00055 static const char* __s_getMD5Sum_() { return "a36da642742ddd79774fbc755f9c5cdd"; }
00056 public:
00057 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00058
00059 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00060
00061 private:
00062 static const char* __s_getMessageDefinition_() { return "# Raw Velodyne LIDAR input.\n\
00063 \n\
00064 uint32 PACKET_SIZE = 1206\n\
00065 uint32 PACKETS_PER_REVOLUTION = 260\n\
00066 \n\
00067 Header header # standard ROS message header\n\
00068 uint8[] data # data array\n\
00069 \n\
00070 \n\
00071 ================================================================================\n\
00072 MSG: std_msgs/Header\n\
00073 # Standard metadata for higher-level stamped data types.\n\
00074 # This is generally used to communicate timestamped data \n\
00075 # in a particular coordinate frame.\n\
00076 # \n\
00077 # sequence ID: consecutively increasing ID \n\
00078 uint32 seq\n\
00079 #Two-integer timestamp that is expressed as:\n\
00080 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00081 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00082 # time-handling sugar is provided by the client library\n\
00083 time stamp\n\
00084 #Frame this data is associated with\n\
00085 # 0: no frame\n\
00086 # 1: global frame\n\
00087 string frame_id\n\
00088 \n\
00089 "; }
00090 public:
00091 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00092
00093 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00094
00095 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00096 {
00097 ros::serialization::OStream stream(write_ptr, 1000000000);
00098 ros::serialization::serialize(stream, header);
00099 ros::serialization::serialize(stream, data);
00100 return stream.getData();
00101 }
00102
00103 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00104 {
00105 ros::serialization::IStream stream(read_ptr, 1000000000);
00106 ros::serialization::deserialize(stream, header);
00107 ros::serialization::deserialize(stream, data);
00108 return stream.getData();
00109 }
00110
00111 ROS_DEPRECATED virtual uint32_t serializationLength() const
00112 {
00113 uint32_t size = 0;
00114 size += ros::serialization::serializationLength(header);
00115 size += ros::serialization::serializationLength(data);
00116 return size;
00117 }
00118
00119 typedef boost::shared_ptr< ::velodyne_common::RawScan_<ContainerAllocator> > Ptr;
00120 typedef boost::shared_ptr< ::velodyne_common::RawScan_<ContainerAllocator> const> ConstPtr;
00121 };
00122 typedef ::velodyne_common::RawScan_<std::allocator<void> > RawScan;
00123
00124 typedef boost::shared_ptr< ::velodyne_common::RawScan> RawScanPtr;
00125 typedef boost::shared_ptr< ::velodyne_common::RawScan const> RawScanConstPtr;
00126
00127
00128 template<typename ContainerAllocator>
00129 std::ostream& operator<<(std::ostream& s, const ::velodyne_common::RawScan_<ContainerAllocator> & v)
00130 {
00131 ros::message_operations::Printer< ::velodyne_common::RawScan_<ContainerAllocator> >::stream(s, "", v);
00132 return s;}
00133
00134 }
00135
00136 namespace ros
00137 {
00138 namespace message_traits
00139 {
00140 template<class ContainerAllocator>
00141 struct MD5Sum< ::velodyne_common::RawScan_<ContainerAllocator> > {
00142 static const char* value()
00143 {
00144 return "a36da642742ddd79774fbc755f9c5cdd";
00145 }
00146
00147 static const char* value(const ::velodyne_common::RawScan_<ContainerAllocator> &) { return value(); }
00148 static const uint64_t static_value1 = 0xa36da642742ddd79ULL;
00149 static const uint64_t static_value2 = 0x774fbc755f9c5cddULL;
00150 };
00151
00152 template<class ContainerAllocator>
00153 struct DataType< ::velodyne_common::RawScan_<ContainerAllocator> > {
00154 static const char* value()
00155 {
00156 return "velodyne_common/RawScan";
00157 }
00158
00159 static const char* value(const ::velodyne_common::RawScan_<ContainerAllocator> &) { return value(); }
00160 };
00161
00162 template<class ContainerAllocator>
00163 struct Definition< ::velodyne_common::RawScan_<ContainerAllocator> > {
00164 static const char* value()
00165 {
00166 return "# Raw Velodyne LIDAR input.\n\
00167 \n\
00168 uint32 PACKET_SIZE = 1206\n\
00169 uint32 PACKETS_PER_REVOLUTION = 260\n\
00170 \n\
00171 Header header # standard ROS message header\n\
00172 uint8[] data # data array\n\
00173 \n\
00174 \n\
00175 ================================================================================\n\
00176 MSG: std_msgs/Header\n\
00177 # Standard metadata for higher-level stamped data types.\n\
00178 # This is generally used to communicate timestamped data \n\
00179 # in a particular coordinate frame.\n\
00180 # \n\
00181 # sequence ID: consecutively increasing ID \n\
00182 uint32 seq\n\
00183 #Two-integer timestamp that is expressed as:\n\
00184 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00185 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00186 # time-handling sugar is provided by the client library\n\
00187 time stamp\n\
00188 #Frame this data is associated with\n\
00189 # 0: no frame\n\
00190 # 1: global frame\n\
00191 string frame_id\n\
00192 \n\
00193 ";
00194 }
00195
00196 static const char* value(const ::velodyne_common::RawScan_<ContainerAllocator> &) { return value(); }
00197 };
00198
00199 template<class ContainerAllocator> struct HasHeader< ::velodyne_common::RawScan_<ContainerAllocator> > : public TrueType {};
00200 template<class ContainerAllocator> struct HasHeader< const ::velodyne_common::RawScan_<ContainerAllocator> > : public TrueType {};
00201 }
00202 }
00203
00204 namespace ros
00205 {
00206 namespace serialization
00207 {
00208
00209 template<class ContainerAllocator> struct Serializer< ::velodyne_common::RawScan_<ContainerAllocator> >
00210 {
00211 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00212 {
00213 stream.next(m.header);
00214 stream.next(m.data);
00215 }
00216
00217 ROS_DECLARE_ALLINONE_SERIALIZER;
00218 };
00219 }
00220 }
00221
00222 namespace ros
00223 {
00224 namespace message_operations
00225 {
00226
00227 template<class ContainerAllocator>
00228 struct Printer< ::velodyne_common::RawScan_<ContainerAllocator> >
00229 {
00230 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::velodyne_common::RawScan_<ContainerAllocator> & v)
00231 {
00232 s << indent << "header: ";
00233 s << std::endl;
00234 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00235 s << indent << "data[]" << std::endl;
00236 for (size_t i = 0; i < v.data.size(); ++i)
00237 {
00238 s << indent << " data[" << i << "]: ";
00239 Printer<uint8_t>::stream(s, indent + " ", v.data[i]);
00240 }
00241 }
00242 };
00243
00244
00245 }
00246 }
00247
00248 #endif // VELODYNE_COMMON_MESSAGE_RAWSCAN_H
00249