00001
00002 #ifndef ASCTEC_MSGS_MESSAGE_CTRLINPUT_H
00003 #define ASCTEC_MSGS_MESSAGE_CTRLINPUT_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 asctec_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct CtrlInput_ : public ros::Message
00019 {
00020 typedef CtrlInput_<ContainerAllocator> Type;
00021
00022 CtrlInput_()
00023 : header()
00024 , pitch(0)
00025 , roll(0)
00026 , yaw(0)
00027 , thrust(0)
00028 , ctrl(0)
00029 , chksum(0)
00030 {
00031 }
00032
00033 CtrlInput_(const ContainerAllocator& _alloc)
00034 : header(_alloc)
00035 , pitch(0)
00036 , roll(0)
00037 , yaw(0)
00038 , thrust(0)
00039 , ctrl(0)
00040 , chksum(0)
00041 {
00042 }
00043
00044 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00045 ::std_msgs::Header_<ContainerAllocator> header;
00046
00047 typedef int16_t _pitch_type;
00048 int16_t pitch;
00049
00050 typedef int16_t _roll_type;
00051 int16_t roll;
00052
00053 typedef int16_t _yaw_type;
00054 int16_t yaw;
00055
00056 typedef int16_t _thrust_type;
00057 int16_t thrust;
00058
00059 typedef int16_t _ctrl_type;
00060 int16_t ctrl;
00061
00062 typedef int16_t _chksum_type;
00063 int16_t chksum;
00064
00065
00066 private:
00067 static const char* __s_getDataType_() { return "asctec_msgs/CtrlInput"; }
00068 public:
00069 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00070
00071 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00072
00073 private:
00074 static const char* __s_getMD5Sum_() { return "6a2f3591afa7529005dcc3a5acd6e490"; }
00075 public:
00076 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00077
00078 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00079
00080 private:
00081 static const char* __s_getMessageDefinition_() { return "# Software License Agreement (BSD License)\n\
00082 #\n\
00083 # Copyright (c) 2010\n\
00084 # William Morris <morris@ee.ccny.cuny.edu>\n\
00085 # Ivan Dryanovski <ivan.dryanovski@gmail.com>\n\
00086 # All rights reserved.\n\
00087 #\n\
00088 # Redistribution and use in source and binary forms, with or without\n\
00089 # modification, are permitted provided that the following conditions\n\
00090 # are met:\n\
00091 #\n\
00092 # * Redistributions of source code must retain the above copyright\n\
00093 # notice, this list of conditions and the following disclaimer.\n\
00094 # * Redistributions in binary form must reproduce the above\n\
00095 # copyright notice, this list of conditions and the following\n\
00096 # disclaimer in the documentation and/or other materials provided\n\
00097 # with the distribution.\n\
00098 # * Neither the name of CCNY Robotics Lab nor the names of its\n\
00099 # contributors may be used to endorse or promote products derived\n\
00100 # from this software without specific prior written permission.\n\
00101 #\n\
00102 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\
00103 # \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\
00104 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n\
00105 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\
00106 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n\
00107 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\
00108 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\
00109 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\
00110 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n\
00111 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n\
00112 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\
00113 # POSSIBILITY OF SUCH DAMAGE.\n\
00114 \n\
00115 Header header\n\
00116 # serial command (=Scientific Interface)\n\
00117 # Pitch input: -2047 .. 2047 (0 = neutral)\n\
00118 int16 pitch\n\
00119 # Roll input: -2047 .. 2047 (0 = neutral)\n\
00120 int16 roll\n\
00121 # R/C Stick input: -2047 .. 2047 (0 = neutral)\n\
00122 int16 yaw\n\
00123 # Collective: 0 .. 4095 (= 0 .. 100%)\n\
00124 int16 thrust\n\
00125 # control byte:\n\
00126 # bit 0: pitch control enabled\n\
00127 # bit 1: roll control enabled\n\
00128 # bit 2: yaw control enabled\n\
00129 # bit 3: thrust control enabled\n\
00130 # These bits can be used to only enable one axis at a time and thus to control\n\
00131 # the other axes manually. This usually helps a lot to set up and finetune\n\
00132 # controllers for each axis seperately.\n\
00133 int16 ctrl\n\
00134 int16 chksum\n\
00135 \n\
00136 ================================================================================\n\
00137 MSG: std_msgs/Header\n\
00138 # Standard metadata for higher-level stamped data types.\n\
00139 # This is generally used to communicate timestamped data \n\
00140 # in a particular coordinate frame.\n\
00141 # \n\
00142 # sequence ID: consecutively increasing ID \n\
00143 uint32 seq\n\
00144 #Two-integer timestamp that is expressed as:\n\
00145 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00146 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00147 # time-handling sugar is provided by the client library\n\
00148 time stamp\n\
00149 #Frame this data is associated with\n\
00150 # 0: no frame\n\
00151 # 1: global frame\n\
00152 string frame_id\n\
00153 \n\
00154 "; }
00155 public:
00156 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00157
00158 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00159
00160 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00161 {
00162 ros::serialization::OStream stream(write_ptr, 1000000000);
00163 ros::serialization::serialize(stream, header);
00164 ros::serialization::serialize(stream, pitch);
00165 ros::serialization::serialize(stream, roll);
00166 ros::serialization::serialize(stream, yaw);
00167 ros::serialization::serialize(stream, thrust);
00168 ros::serialization::serialize(stream, ctrl);
00169 ros::serialization::serialize(stream, chksum);
00170 return stream.getData();
00171 }
00172
00173 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00174 {
00175 ros::serialization::IStream stream(read_ptr, 1000000000);
00176 ros::serialization::deserialize(stream, header);
00177 ros::serialization::deserialize(stream, pitch);
00178 ros::serialization::deserialize(stream, roll);
00179 ros::serialization::deserialize(stream, yaw);
00180 ros::serialization::deserialize(stream, thrust);
00181 ros::serialization::deserialize(stream, ctrl);
00182 ros::serialization::deserialize(stream, chksum);
00183 return stream.getData();
00184 }
00185
00186 ROS_DEPRECATED virtual uint32_t serializationLength() const
00187 {
00188 uint32_t size = 0;
00189 size += ros::serialization::serializationLength(header);
00190 size += ros::serialization::serializationLength(pitch);
00191 size += ros::serialization::serializationLength(roll);
00192 size += ros::serialization::serializationLength(yaw);
00193 size += ros::serialization::serializationLength(thrust);
00194 size += ros::serialization::serializationLength(ctrl);
00195 size += ros::serialization::serializationLength(chksum);
00196 return size;
00197 }
00198
00199 typedef boost::shared_ptr< ::asctec_msgs::CtrlInput_<ContainerAllocator> > Ptr;
00200 typedef boost::shared_ptr< ::asctec_msgs::CtrlInput_<ContainerAllocator> const> ConstPtr;
00201 };
00202 typedef ::asctec_msgs::CtrlInput_<std::allocator<void> > CtrlInput;
00203
00204 typedef boost::shared_ptr< ::asctec_msgs::CtrlInput> CtrlInputPtr;
00205 typedef boost::shared_ptr< ::asctec_msgs::CtrlInput const> CtrlInputConstPtr;
00206
00207
00208 template<typename ContainerAllocator>
00209 std::ostream& operator<<(std::ostream& s, const ::asctec_msgs::CtrlInput_<ContainerAllocator> & v)
00210 {
00211 ros::message_operations::Printer< ::asctec_msgs::CtrlInput_<ContainerAllocator> >::stream(s, "", v);
00212 return s;}
00213
00214 }
00215
00216 namespace ros
00217 {
00218 namespace message_traits
00219 {
00220 template<class ContainerAllocator>
00221 struct MD5Sum< ::asctec_msgs::CtrlInput_<ContainerAllocator> > {
00222 static const char* value()
00223 {
00224 return "6a2f3591afa7529005dcc3a5acd6e490";
00225 }
00226
00227 static const char* value(const ::asctec_msgs::CtrlInput_<ContainerAllocator> &) { return value(); }
00228 static const uint64_t static_value1 = 0x6a2f3591afa75290ULL;
00229 static const uint64_t static_value2 = 0x05dcc3a5acd6e490ULL;
00230 };
00231
00232 template<class ContainerAllocator>
00233 struct DataType< ::asctec_msgs::CtrlInput_<ContainerAllocator> > {
00234 static const char* value()
00235 {
00236 return "asctec_msgs/CtrlInput";
00237 }
00238
00239 static const char* value(const ::asctec_msgs::CtrlInput_<ContainerAllocator> &) { return value(); }
00240 };
00241
00242 template<class ContainerAllocator>
00243 struct Definition< ::asctec_msgs::CtrlInput_<ContainerAllocator> > {
00244 static const char* value()
00245 {
00246 return "# Software License Agreement (BSD License)\n\
00247 #\n\
00248 # Copyright (c) 2010\n\
00249 # William Morris <morris@ee.ccny.cuny.edu>\n\
00250 # Ivan Dryanovski <ivan.dryanovski@gmail.com>\n\
00251 # All rights reserved.\n\
00252 #\n\
00253 # Redistribution and use in source and binary forms, with or without\n\
00254 # modification, are permitted provided that the following conditions\n\
00255 # are met:\n\
00256 #\n\
00257 # * Redistributions of source code must retain the above copyright\n\
00258 # notice, this list of conditions and the following disclaimer.\n\
00259 # * Redistributions in binary form must reproduce the above\n\
00260 # copyright notice, this list of conditions and the following\n\
00261 # disclaimer in the documentation and/or other materials provided\n\
00262 # with the distribution.\n\
00263 # * Neither the name of CCNY Robotics Lab nor the names of its\n\
00264 # contributors may be used to endorse or promote products derived\n\
00265 # from this software without specific prior written permission.\n\
00266 #\n\
00267 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\
00268 # \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\
00269 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n\
00270 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\
00271 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n\
00272 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\
00273 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\
00274 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\
00275 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n\
00276 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n\
00277 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\
00278 # POSSIBILITY OF SUCH DAMAGE.\n\
00279 \n\
00280 Header header\n\
00281 # serial command (=Scientific Interface)\n\
00282 # Pitch input: -2047 .. 2047 (0 = neutral)\n\
00283 int16 pitch\n\
00284 # Roll input: -2047 .. 2047 (0 = neutral)\n\
00285 int16 roll\n\
00286 # R/C Stick input: -2047 .. 2047 (0 = neutral)\n\
00287 int16 yaw\n\
00288 # Collective: 0 .. 4095 (= 0 .. 100%)\n\
00289 int16 thrust\n\
00290 # control byte:\n\
00291 # bit 0: pitch control enabled\n\
00292 # bit 1: roll control enabled\n\
00293 # bit 2: yaw control enabled\n\
00294 # bit 3: thrust control enabled\n\
00295 # These bits can be used to only enable one axis at a time and thus to control\n\
00296 # the other axes manually. This usually helps a lot to set up and finetune\n\
00297 # controllers for each axis seperately.\n\
00298 int16 ctrl\n\
00299 int16 chksum\n\
00300 \n\
00301 ================================================================================\n\
00302 MSG: std_msgs/Header\n\
00303 # Standard metadata for higher-level stamped data types.\n\
00304 # This is generally used to communicate timestamped data \n\
00305 # in a particular coordinate frame.\n\
00306 # \n\
00307 # sequence ID: consecutively increasing ID \n\
00308 uint32 seq\n\
00309 #Two-integer timestamp that is expressed as:\n\
00310 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00311 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00312 # time-handling sugar is provided by the client library\n\
00313 time stamp\n\
00314 #Frame this data is associated with\n\
00315 # 0: no frame\n\
00316 # 1: global frame\n\
00317 string frame_id\n\
00318 \n\
00319 ";
00320 }
00321
00322 static const char* value(const ::asctec_msgs::CtrlInput_<ContainerAllocator> &) { return value(); }
00323 };
00324
00325 template<class ContainerAllocator> struct HasHeader< ::asctec_msgs::CtrlInput_<ContainerAllocator> > : public TrueType {};
00326 template<class ContainerAllocator> struct HasHeader< const ::asctec_msgs::CtrlInput_<ContainerAllocator> > : public TrueType {};
00327 }
00328 }
00329
00330 namespace ros
00331 {
00332 namespace serialization
00333 {
00334
00335 template<class ContainerAllocator> struct Serializer< ::asctec_msgs::CtrlInput_<ContainerAllocator> >
00336 {
00337 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00338 {
00339 stream.next(m.header);
00340 stream.next(m.pitch);
00341 stream.next(m.roll);
00342 stream.next(m.yaw);
00343 stream.next(m.thrust);
00344 stream.next(m.ctrl);
00345 stream.next(m.chksum);
00346 }
00347
00348 ROS_DECLARE_ALLINONE_SERIALIZER;
00349 };
00350 }
00351 }
00352
00353 namespace ros
00354 {
00355 namespace message_operations
00356 {
00357
00358 template<class ContainerAllocator>
00359 struct Printer< ::asctec_msgs::CtrlInput_<ContainerAllocator> >
00360 {
00361 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::asctec_msgs::CtrlInput_<ContainerAllocator> & v)
00362 {
00363 s << indent << "header: ";
00364 s << std::endl;
00365 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00366 s << indent << "pitch: ";
00367 Printer<int16_t>::stream(s, indent + " ", v.pitch);
00368 s << indent << "roll: ";
00369 Printer<int16_t>::stream(s, indent + " ", v.roll);
00370 s << indent << "yaw: ";
00371 Printer<int16_t>::stream(s, indent + " ", v.yaw);
00372 s << indent << "thrust: ";
00373 Printer<int16_t>::stream(s, indent + " ", v.thrust);
00374 s << indent << "ctrl: ";
00375 Printer<int16_t>::stream(s, indent + " ", v.ctrl);
00376 s << indent << "chksum: ";
00377 Printer<int16_t>::stream(s, indent + " ", v.chksum);
00378 }
00379 };
00380
00381
00382 }
00383 }
00384
00385 #endif // ASCTEC_MSGS_MESSAGE_CTRLINPUT_H
00386