00001
00002 #ifndef VISUALIZATION_MSGS_MESSAGE_IMAGEMARKER_H
00003 #define VISUALIZATION_MSGS_MESSAGE_IMAGEMARKER_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 #include "geometry_msgs/Point.h"
00015 #include "std_msgs/ColorRGBA.h"
00016 #include "std_msgs/ColorRGBA.h"
00017 #include "geometry_msgs/Point.h"
00018 #include "std_msgs/ColorRGBA.h"
00019
00020 namespace visualization_msgs
00021 {
00022 template <class ContainerAllocator>
00023 struct ImageMarker_ : public ros::Message
00024 {
00025 typedef ImageMarker_<ContainerAllocator> Type;
00026
00027 ImageMarker_()
00028 : header()
00029 , ns()
00030 , id(0)
00031 , type(0)
00032 , action(0)
00033 , position()
00034 , scale(0.0)
00035 , outline_color()
00036 , filled(0)
00037 , fill_color()
00038 , lifetime()
00039 , points()
00040 , outline_colors()
00041 {
00042 }
00043
00044 ImageMarker_(const ContainerAllocator& _alloc)
00045 : header(_alloc)
00046 , ns(_alloc)
00047 , id(0)
00048 , type(0)
00049 , action(0)
00050 , position(_alloc)
00051 , scale(0.0)
00052 , outline_color(_alloc)
00053 , filled(0)
00054 , fill_color(_alloc)
00055 , lifetime()
00056 , points(_alloc)
00057 , outline_colors(_alloc)
00058 {
00059 }
00060
00061 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00062 ::std_msgs::Header_<ContainerAllocator> header;
00063
00064 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _ns_type;
00065 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > ns;
00066
00067 typedef int32_t _id_type;
00068 int32_t id;
00069
00070 typedef int32_t _type_type;
00071 int32_t type;
00072
00073 typedef int32_t _action_type;
00074 int32_t action;
00075
00076 typedef ::geometry_msgs::Point_<ContainerAllocator> _position_type;
00077 ::geometry_msgs::Point_<ContainerAllocator> position;
00078
00079 typedef float _scale_type;
00080 float scale;
00081
00082 typedef ::std_msgs::ColorRGBA_<ContainerAllocator> _outline_color_type;
00083 ::std_msgs::ColorRGBA_<ContainerAllocator> outline_color;
00084
00085 typedef int8_t _filled_type;
00086 int8_t filled;
00087
00088 typedef ::std_msgs::ColorRGBA_<ContainerAllocator> _fill_color_type;
00089 ::std_msgs::ColorRGBA_<ContainerAllocator> fill_color;
00090
00091 typedef ros::Duration _lifetime_type;
00092 ros::Duration lifetime;
00093
00094 typedef std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > _points_type;
00095 std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > points;
00096
00097 typedef std::vector< ::std_msgs::ColorRGBA_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::std_msgs::ColorRGBA_<ContainerAllocator> >::other > _outline_colors_type;
00098 std::vector< ::std_msgs::ColorRGBA_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::std_msgs::ColorRGBA_<ContainerAllocator> >::other > outline_colors;
00099
00100 enum { CIRCLE = 0 };
00101 enum { LINE_STRIP = 1 };
00102 enum { LINE_LIST = 2 };
00103 enum { POLYGON = 3 };
00104 enum { POINTS = 4 };
00105 enum { ADD = 0 };
00106 enum { REMOVE = 1 };
00107
00108 ROS_DEPRECATED uint32_t get_points_size() const { return (uint32_t)points.size(); }
00109 ROS_DEPRECATED void set_points_size(uint32_t size) { points.resize((size_t)size); }
00110 ROS_DEPRECATED void get_points_vec(std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > & vec) const { vec = this->points; }
00111 ROS_DEPRECATED void set_points_vec(const std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > & vec) { this->points = vec; }
00112 ROS_DEPRECATED uint32_t get_outline_colors_size() const { return (uint32_t)outline_colors.size(); }
00113 ROS_DEPRECATED void set_outline_colors_size(uint32_t size) { outline_colors.resize((size_t)size); }
00114 ROS_DEPRECATED void get_outline_colors_vec(std::vector< ::std_msgs::ColorRGBA_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::std_msgs::ColorRGBA_<ContainerAllocator> >::other > & vec) const { vec = this->outline_colors; }
00115 ROS_DEPRECATED void set_outline_colors_vec(const std::vector< ::std_msgs::ColorRGBA_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::std_msgs::ColorRGBA_<ContainerAllocator> >::other > & vec) { this->outline_colors = vec; }
00116 private:
00117 static const char* __s_getDataType_() { return "visualization_msgs/ImageMarker"; }
00118 public:
00119 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00120
00121 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00122
00123 private:
00124 static const char* __s_getMD5Sum_() { return "e185c670c5f817486e6a216cbee30f1c"; }
00125 public:
00126 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00127
00128 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00129
00130 private:
00131 static const char* __s_getMessageDefinition_() { return "byte CIRCLE=0\n\
00132 byte LINE_STRIP=1\n\
00133 byte LINE_LIST=2\n\
00134 byte POLYGON=3\n\
00135 byte POINTS=4\n\
00136 \n\
00137 byte ADD=0\n\
00138 byte REMOVE=1\n\
00139 \n\
00140 Header header\n\
00141 string ns # namespace, used with id to form a unique id\n\
00142 int32 id # unique id within the namespace\n\
00143 int32 type # CIRCLE/LINE_STRIP/etc.\n\
00144 int32 action # ADD/REMOVE\n\
00145 geometry_msgs/Point position # 2D, in pixel-coords\n\
00146 float32 scale # the diameter for a circle, etc.\n\
00147 std_msgs/ColorRGBA outline_color\n\
00148 byte filled # whether to fill in the shape with color\n\
00149 std_msgs/ColorRGBA fill_color # color [0.0-1.0]\n\
00150 duration lifetime # How long the object should last before being automatically deleted. 0 means forever\n\
00151 \n\
00152 \n\
00153 geometry_msgs/Point[] points # used for LINE_STRIP/LINE_LIST/POINTS/etc., 2D in pixel coords\n\
00154 std_msgs/ColorRGBA[] outline_colors # a color for each line, point, etc.\n\
00155 ================================================================================\n\
00156 MSG: std_msgs/Header\n\
00157 # Standard metadata for higher-level stamped data types.\n\
00158 # This is generally used to communicate timestamped data \n\
00159 # in a particular coordinate frame.\n\
00160 # \n\
00161 # sequence ID: consecutively increasing ID \n\
00162 uint32 seq\n\
00163 #Two-integer timestamp that is expressed as:\n\
00164 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00165 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00166 # time-handling sugar is provided by the client library\n\
00167 time stamp\n\
00168 #Frame this data is associated with\n\
00169 # 0: no frame\n\
00170 # 1: global frame\n\
00171 string frame_id\n\
00172 \n\
00173 ================================================================================\n\
00174 MSG: geometry_msgs/Point\n\
00175 # This contains the position of a point in free space\n\
00176 float64 x\n\
00177 float64 y\n\
00178 float64 z\n\
00179 \n\
00180 ================================================================================\n\
00181 MSG: std_msgs/ColorRGBA\n\
00182 float32 r\n\
00183 float32 g\n\
00184 float32 b\n\
00185 float32 a\n\
00186 \n\
00187 "; }
00188 public:
00189 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00190
00191 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00192
00193 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00194 {
00195 ros::serialization::OStream stream(write_ptr, 1000000000);
00196 ros::serialization::serialize(stream, header);
00197 ros::serialization::serialize(stream, ns);
00198 ros::serialization::serialize(stream, id);
00199 ros::serialization::serialize(stream, type);
00200 ros::serialization::serialize(stream, action);
00201 ros::serialization::serialize(stream, position);
00202 ros::serialization::serialize(stream, scale);
00203 ros::serialization::serialize(stream, outline_color);
00204 ros::serialization::serialize(stream, filled);
00205 ros::serialization::serialize(stream, fill_color);
00206 ros::serialization::serialize(stream, lifetime);
00207 ros::serialization::serialize(stream, points);
00208 ros::serialization::serialize(stream, outline_colors);
00209 return stream.getData();
00210 }
00211
00212 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00213 {
00214 ros::serialization::IStream stream(read_ptr, 1000000000);
00215 ros::serialization::deserialize(stream, header);
00216 ros::serialization::deserialize(stream, ns);
00217 ros::serialization::deserialize(stream, id);
00218 ros::serialization::deserialize(stream, type);
00219 ros::serialization::deserialize(stream, action);
00220 ros::serialization::deserialize(stream, position);
00221 ros::serialization::deserialize(stream, scale);
00222 ros::serialization::deserialize(stream, outline_color);
00223 ros::serialization::deserialize(stream, filled);
00224 ros::serialization::deserialize(stream, fill_color);
00225 ros::serialization::deserialize(stream, lifetime);
00226 ros::serialization::deserialize(stream, points);
00227 ros::serialization::deserialize(stream, outline_colors);
00228 return stream.getData();
00229 }
00230
00231 ROS_DEPRECATED virtual uint32_t serializationLength() const
00232 {
00233 uint32_t size = 0;
00234 size += ros::serialization::serializationLength(header);
00235 size += ros::serialization::serializationLength(ns);
00236 size += ros::serialization::serializationLength(id);
00237 size += ros::serialization::serializationLength(type);
00238 size += ros::serialization::serializationLength(action);
00239 size += ros::serialization::serializationLength(position);
00240 size += ros::serialization::serializationLength(scale);
00241 size += ros::serialization::serializationLength(outline_color);
00242 size += ros::serialization::serializationLength(filled);
00243 size += ros::serialization::serializationLength(fill_color);
00244 size += ros::serialization::serializationLength(lifetime);
00245 size += ros::serialization::serializationLength(points);
00246 size += ros::serialization::serializationLength(outline_colors);
00247 return size;
00248 }
00249
00250 typedef boost::shared_ptr< ::visualization_msgs::ImageMarker_<ContainerAllocator> > Ptr;
00251 typedef boost::shared_ptr< ::visualization_msgs::ImageMarker_<ContainerAllocator> const> ConstPtr;
00252 };
00253 typedef ::visualization_msgs::ImageMarker_<std::allocator<void> > ImageMarker;
00254
00255 typedef boost::shared_ptr< ::visualization_msgs::ImageMarker> ImageMarkerPtr;
00256 typedef boost::shared_ptr< ::visualization_msgs::ImageMarker const> ImageMarkerConstPtr;
00257
00258
00259 template<typename ContainerAllocator>
00260 std::ostream& operator<<(std::ostream& s, const ::visualization_msgs::ImageMarker_<ContainerAllocator> & v)
00261 {
00262 ros::message_operations::Printer< ::visualization_msgs::ImageMarker_<ContainerAllocator> >::stream(s, "", v);
00263 return s;}
00264
00265 }
00266
00267 namespace ros
00268 {
00269 namespace message_traits
00270 {
00271 template<class ContainerAllocator>
00272 struct MD5Sum< ::visualization_msgs::ImageMarker_<ContainerAllocator> > {
00273 static const char* value()
00274 {
00275 return "e185c670c5f817486e6a216cbee30f1c";
00276 }
00277
00278 static const char* value(const ::visualization_msgs::ImageMarker_<ContainerAllocator> &) { return value(); }
00279 static const uint64_t static_value1 = 0xe185c670c5f81748ULL;
00280 static const uint64_t static_value2 = 0x6e6a216cbee30f1cULL;
00281 };
00282
00283 template<class ContainerAllocator>
00284 struct DataType< ::visualization_msgs::ImageMarker_<ContainerAllocator> > {
00285 static const char* value()
00286 {
00287 return "visualization_msgs/ImageMarker";
00288 }
00289
00290 static const char* value(const ::visualization_msgs::ImageMarker_<ContainerAllocator> &) { return value(); }
00291 };
00292
00293 template<class ContainerAllocator>
00294 struct Definition< ::visualization_msgs::ImageMarker_<ContainerAllocator> > {
00295 static const char* value()
00296 {
00297 return "byte CIRCLE=0\n\
00298 byte LINE_STRIP=1\n\
00299 byte LINE_LIST=2\n\
00300 byte POLYGON=3\n\
00301 byte POINTS=4\n\
00302 \n\
00303 byte ADD=0\n\
00304 byte REMOVE=1\n\
00305 \n\
00306 Header header\n\
00307 string ns # namespace, used with id to form a unique id\n\
00308 int32 id # unique id within the namespace\n\
00309 int32 type # CIRCLE/LINE_STRIP/etc.\n\
00310 int32 action # ADD/REMOVE\n\
00311 geometry_msgs/Point position # 2D, in pixel-coords\n\
00312 float32 scale # the diameter for a circle, etc.\n\
00313 std_msgs/ColorRGBA outline_color\n\
00314 byte filled # whether to fill in the shape with color\n\
00315 std_msgs/ColorRGBA fill_color # color [0.0-1.0]\n\
00316 duration lifetime # How long the object should last before being automatically deleted. 0 means forever\n\
00317 \n\
00318 \n\
00319 geometry_msgs/Point[] points # used for LINE_STRIP/LINE_LIST/POINTS/etc., 2D in pixel coords\n\
00320 std_msgs/ColorRGBA[] outline_colors # a color for each line, point, etc.\n\
00321 ================================================================================\n\
00322 MSG: std_msgs/Header\n\
00323 # Standard metadata for higher-level stamped data types.\n\
00324 # This is generally used to communicate timestamped data \n\
00325 # in a particular coordinate frame.\n\
00326 # \n\
00327 # sequence ID: consecutively increasing ID \n\
00328 uint32 seq\n\
00329 #Two-integer timestamp that is expressed as:\n\
00330 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00331 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00332 # time-handling sugar is provided by the client library\n\
00333 time stamp\n\
00334 #Frame this data is associated with\n\
00335 # 0: no frame\n\
00336 # 1: global frame\n\
00337 string frame_id\n\
00338 \n\
00339 ================================================================================\n\
00340 MSG: geometry_msgs/Point\n\
00341 # This contains the position of a point in free space\n\
00342 float64 x\n\
00343 float64 y\n\
00344 float64 z\n\
00345 \n\
00346 ================================================================================\n\
00347 MSG: std_msgs/ColorRGBA\n\
00348 float32 r\n\
00349 float32 g\n\
00350 float32 b\n\
00351 float32 a\n\
00352 \n\
00353 ";
00354 }
00355
00356 static const char* value(const ::visualization_msgs::ImageMarker_<ContainerAllocator> &) { return value(); }
00357 };
00358
00359 template<class ContainerAllocator> struct HasHeader< ::visualization_msgs::ImageMarker_<ContainerAllocator> > : public TrueType {};
00360 template<class ContainerAllocator> struct HasHeader< const ::visualization_msgs::ImageMarker_<ContainerAllocator> > : public TrueType {};
00361 }
00362 }
00363
00364 namespace ros
00365 {
00366 namespace serialization
00367 {
00368
00369 template<class ContainerAllocator> struct Serializer< ::visualization_msgs::ImageMarker_<ContainerAllocator> >
00370 {
00371 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00372 {
00373 stream.next(m.header);
00374 stream.next(m.ns);
00375 stream.next(m.id);
00376 stream.next(m.type);
00377 stream.next(m.action);
00378 stream.next(m.position);
00379 stream.next(m.scale);
00380 stream.next(m.outline_color);
00381 stream.next(m.filled);
00382 stream.next(m.fill_color);
00383 stream.next(m.lifetime);
00384 stream.next(m.points);
00385 stream.next(m.outline_colors);
00386 }
00387
00388 ROS_DECLARE_ALLINONE_SERIALIZER;
00389 };
00390 }
00391 }
00392
00393 namespace ros
00394 {
00395 namespace message_operations
00396 {
00397
00398 template<class ContainerAllocator>
00399 struct Printer< ::visualization_msgs::ImageMarker_<ContainerAllocator> >
00400 {
00401 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::visualization_msgs::ImageMarker_<ContainerAllocator> & v)
00402 {
00403 s << indent << "header: ";
00404 s << std::endl;
00405 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00406 s << indent << "ns: ";
00407 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.ns);
00408 s << indent << "id: ";
00409 Printer<int32_t>::stream(s, indent + " ", v.id);
00410 s << indent << "type: ";
00411 Printer<int32_t>::stream(s, indent + " ", v.type);
00412 s << indent << "action: ";
00413 Printer<int32_t>::stream(s, indent + " ", v.action);
00414 s << indent << "position: ";
00415 s << std::endl;
00416 Printer< ::geometry_msgs::Point_<ContainerAllocator> >::stream(s, indent + " ", v.position);
00417 s << indent << "scale: ";
00418 Printer<float>::stream(s, indent + " ", v.scale);
00419 s << indent << "outline_color: ";
00420 s << std::endl;
00421 Printer< ::std_msgs::ColorRGBA_<ContainerAllocator> >::stream(s, indent + " ", v.outline_color);
00422 s << indent << "filled: ";
00423 Printer<int8_t>::stream(s, indent + " ", v.filled);
00424 s << indent << "fill_color: ";
00425 s << std::endl;
00426 Printer< ::std_msgs::ColorRGBA_<ContainerAllocator> >::stream(s, indent + " ", v.fill_color);
00427 s << indent << "lifetime: ";
00428 Printer<ros::Duration>::stream(s, indent + " ", v.lifetime);
00429 s << indent << "points[]" << std::endl;
00430 for (size_t i = 0; i < v.points.size(); ++i)
00431 {
00432 s << indent << " points[" << i << "]: ";
00433 s << std::endl;
00434 s << indent;
00435 Printer< ::geometry_msgs::Point_<ContainerAllocator> >::stream(s, indent + " ", v.points[i]);
00436 }
00437 s << indent << "outline_colors[]" << std::endl;
00438 for (size_t i = 0; i < v.outline_colors.size(); ++i)
00439 {
00440 s << indent << " outline_colors[" << i << "]: ";
00441 s << std::endl;
00442 s << indent;
00443 Printer< ::std_msgs::ColorRGBA_<ContainerAllocator> >::stream(s, indent + " ", v.outline_colors[i]);
00444 }
00445 }
00446 };
00447
00448
00449 }
00450 }
00451
00452 #endif // VISUALIZATION_MSGS_MESSAGE_IMAGEMARKER_H
00453