00001
00002 #ifndef OPENRAVEROS_MESSAGE_BODYINFO_H
00003 #define OPENRAVEROS_MESSAGE_BODYINFO_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017 #include "openraveros/AffineTransformMatrix.h"
00018 #include "openraveros/AffineTransformMatrix.h"
00019
00020 namespace openraveros
00021 {
00022 template <class ContainerAllocator>
00023 struct BodyInfo_ {
00024 typedef BodyInfo_<ContainerAllocator> Type;
00025
00026 BodyInfo_()
00027 : bodyid(0)
00028 , transform()
00029 , dof(0)
00030 , enabled(0)
00031 , filename()
00032 , name()
00033 , type()
00034 , jointvalues()
00035 , links()
00036 , linknames()
00037 , jointnames()
00038 , lowerlimit()
00039 , upperlimit()
00040 {
00041 }
00042
00043 BodyInfo_(const ContainerAllocator& _alloc)
00044 : bodyid(0)
00045 , transform(_alloc)
00046 , dof(0)
00047 , enabled(0)
00048 , filename(_alloc)
00049 , name(_alloc)
00050 , type(_alloc)
00051 , jointvalues(_alloc)
00052 , links(_alloc)
00053 , linknames(_alloc)
00054 , jointnames(_alloc)
00055 , lowerlimit(_alloc)
00056 , upperlimit(_alloc)
00057 {
00058 }
00059
00060 typedef int32_t _bodyid_type;
00061 int32_t bodyid;
00062
00063 typedef ::openraveros::AffineTransformMatrix_<ContainerAllocator> _transform_type;
00064 ::openraveros::AffineTransformMatrix_<ContainerAllocator> transform;
00065
00066 typedef uint8_t _dof_type;
00067 uint8_t dof;
00068
00069 typedef uint8_t _enabled_type;
00070 uint8_t enabled;
00071
00072 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _filename_type;
00073 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > filename;
00074
00075 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00076 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00077
00078 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _type_type;
00079 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > type;
00080
00081 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _jointvalues_type;
00082 std::vector<float, typename ContainerAllocator::template rebind<float>::other > jointvalues;
00083
00084 typedef std::vector< ::openraveros::AffineTransformMatrix_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::openraveros::AffineTransformMatrix_<ContainerAllocator> >::other > _links_type;
00085 std::vector< ::openraveros::AffineTransformMatrix_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::openraveros::AffineTransformMatrix_<ContainerAllocator> >::other > links;
00086
00087 typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _linknames_type;
00088 std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > linknames;
00089
00090 typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _jointnames_type;
00091 std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > jointnames;
00092
00093 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _lowerlimit_type;
00094 std::vector<float, typename ContainerAllocator::template rebind<float>::other > lowerlimit;
00095
00096 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _upperlimit_type;
00097 std::vector<float, typename ContainerAllocator::template rebind<float>::other > upperlimit;
00098
00099 enum { Req_JointValues = 1 };
00100 enum { Req_Links = 2 };
00101 enum { Req_LinkNames = 4 };
00102 enum { Req_JointLimits = 8 };
00103 enum { Req_Names = 16 };
00104 enum { Req_JointNames = 32 };
00105
00106 typedef boost::shared_ptr< ::openraveros::BodyInfo_<ContainerAllocator> > Ptr;
00107 typedef boost::shared_ptr< ::openraveros::BodyInfo_<ContainerAllocator> const> ConstPtr;
00108 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00109 };
00110 typedef ::openraveros::BodyInfo_<std::allocator<void> > BodyInfo;
00111
00112 typedef boost::shared_ptr< ::openraveros::BodyInfo> BodyInfoPtr;
00113 typedef boost::shared_ptr< ::openraveros::BodyInfo const> BodyInfoConstPtr;
00114
00115
00116 template<typename ContainerAllocator>
00117 std::ostream& operator<<(std::ostream& s, const ::openraveros::BodyInfo_<ContainerAllocator> & v)
00118 {
00119 ros::message_operations::Printer< ::openraveros::BodyInfo_<ContainerAllocator> >::stream(s, "", v);
00120 return s;}
00121
00122 }
00123
00124 namespace ros
00125 {
00126 namespace message_traits
00127 {
00128 template<class ContainerAllocator> struct IsMessage< ::openraveros::BodyInfo_<ContainerAllocator> > : public TrueType {};
00129 template<class ContainerAllocator> struct IsMessage< ::openraveros::BodyInfo_<ContainerAllocator> const> : public TrueType {};
00130 template<class ContainerAllocator>
00131 struct MD5Sum< ::openraveros::BodyInfo_<ContainerAllocator> > {
00132 static const char* value()
00133 {
00134 return "b652d9c93c7dc0f74ae76568b2ba8a27";
00135 }
00136
00137 static const char* value(const ::openraveros::BodyInfo_<ContainerAllocator> &) { return value(); }
00138 static const uint64_t static_value1 = 0xb652d9c93c7dc0f7ULL;
00139 static const uint64_t static_value2 = 0x4ae76568b2ba8a27ULL;
00140 };
00141
00142 template<class ContainerAllocator>
00143 struct DataType< ::openraveros::BodyInfo_<ContainerAllocator> > {
00144 static const char* value()
00145 {
00146 return "openraveros/BodyInfo";
00147 }
00148
00149 static const char* value(const ::openraveros::BodyInfo_<ContainerAllocator> &) { return value(); }
00150 };
00151
00152 template<class ContainerAllocator>
00153 struct Definition< ::openraveros::BodyInfo_<ContainerAllocator> > {
00154 static const char* value()
00155 {
00156 return "# information about a body\n\
00157 int32 bodyid\n\
00158 \n\
00159 # current transformation\n\
00160 AffineTransformMatrix transform\n\
00161 \n\
00162 # degrees of freedom (number of joints)\n\
00163 uint8 dof\n\
00164 \n\
00165 # enabled status\n\
00166 uint8 enabled\n\
00167 \n\
00168 \n\
00169 # filename used to create body geometry\n\
00170 string filename\n\
00171 \n\
00172 # name of the body\n\
00173 string name\n\
00174 \n\
00175 # type of body\n\
00176 string type\n\
00177 \n\
00178 float32[] jointvalues\n\
00179 AffineTransformMatrix[] links\n\
00180 string[] linknames\n\
00181 string[] jointnames\n\
00182 \n\
00183 # joint limits\n\
00184 float32[] lowerlimit\n\
00185 float32[] upperlimit\n\
00186 \n\
00187 # request information bitmasks, also holds robot specific request information (lower 8 bits)\n\
00188 uint16 Req_JointValues=1\n\
00189 uint16 Req_Links=2\n\
00190 uint16 Req_LinkNames=4 # fills the linknames\n\
00191 uint16 Req_JointLimits=8\n\
00192 uint16 Req_Names=16 # if set, fills filename, name, and type\n\
00193 uint16 Req_JointNames=32 # fills the jointnames\n\
00194 ================================================================================\n\
00195 MSG: openraveros/AffineTransformMatrix\n\
00196 # column ordered 3x4 affine transformation, ie: the arrangement in memory is:\n\
00197 # where the upper 3x3 matrix is orthonormal\n\
00198 # [0] [3] [6] [9]\n\
00199 # [1] [4] [7] [10]\n\
00200 # [2] [5] [8] [11]\n\
00201 float32[12] m\n\
00202 \n\
00203 ";
00204 }
00205
00206 static const char* value(const ::openraveros::BodyInfo_<ContainerAllocator> &) { return value(); }
00207 };
00208
00209 }
00210 }
00211
00212 namespace ros
00213 {
00214 namespace serialization
00215 {
00216
00217 template<class ContainerAllocator> struct Serializer< ::openraveros::BodyInfo_<ContainerAllocator> >
00218 {
00219 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00220 {
00221 stream.next(m.bodyid);
00222 stream.next(m.transform);
00223 stream.next(m.dof);
00224 stream.next(m.enabled);
00225 stream.next(m.filename);
00226 stream.next(m.name);
00227 stream.next(m.type);
00228 stream.next(m.jointvalues);
00229 stream.next(m.links);
00230 stream.next(m.linknames);
00231 stream.next(m.jointnames);
00232 stream.next(m.lowerlimit);
00233 stream.next(m.upperlimit);
00234 }
00235
00236 ROS_DECLARE_ALLINONE_SERIALIZER;
00237 };
00238 }
00239 }
00240
00241 namespace ros
00242 {
00243 namespace message_operations
00244 {
00245
00246 template<class ContainerAllocator>
00247 struct Printer< ::openraveros::BodyInfo_<ContainerAllocator> >
00248 {
00249 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::openraveros::BodyInfo_<ContainerAllocator> & v)
00250 {
00251 s << indent << "bodyid: ";
00252 Printer<int32_t>::stream(s, indent + " ", v.bodyid);
00253 s << indent << "transform: ";
00254 s << std::endl;
00255 Printer< ::openraveros::AffineTransformMatrix_<ContainerAllocator> >::stream(s, indent + " ", v.transform);
00256 s << indent << "dof: ";
00257 Printer<uint8_t>::stream(s, indent + " ", v.dof);
00258 s << indent << "enabled: ";
00259 Printer<uint8_t>::stream(s, indent + " ", v.enabled);
00260 s << indent << "filename: ";
00261 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.filename);
00262 s << indent << "name: ";
00263 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00264 s << indent << "type: ";
00265 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.type);
00266 s << indent << "jointvalues[]" << std::endl;
00267 for (size_t i = 0; i < v.jointvalues.size(); ++i)
00268 {
00269 s << indent << " jointvalues[" << i << "]: ";
00270 Printer<float>::stream(s, indent + " ", v.jointvalues[i]);
00271 }
00272 s << indent << "links[]" << std::endl;
00273 for (size_t i = 0; i < v.links.size(); ++i)
00274 {
00275 s << indent << " links[" << i << "]: ";
00276 s << std::endl;
00277 s << indent;
00278 Printer< ::openraveros::AffineTransformMatrix_<ContainerAllocator> >::stream(s, indent + " ", v.links[i]);
00279 }
00280 s << indent << "linknames[]" << std::endl;
00281 for (size_t i = 0; i < v.linknames.size(); ++i)
00282 {
00283 s << indent << " linknames[" << i << "]: ";
00284 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.linknames[i]);
00285 }
00286 s << indent << "jointnames[]" << std::endl;
00287 for (size_t i = 0; i < v.jointnames.size(); ++i)
00288 {
00289 s << indent << " jointnames[" << i << "]: ";
00290 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.jointnames[i]);
00291 }
00292 s << indent << "lowerlimit[]" << std::endl;
00293 for (size_t i = 0; i < v.lowerlimit.size(); ++i)
00294 {
00295 s << indent << " lowerlimit[" << i << "]: ";
00296 Printer<float>::stream(s, indent + " ", v.lowerlimit[i]);
00297 }
00298 s << indent << "upperlimit[]" << std::endl;
00299 for (size_t i = 0; i < v.upperlimit.size(); ++i)
00300 {
00301 s << indent << " upperlimit[" << i << "]: ";
00302 Printer<float>::stream(s, indent + " ", v.upperlimit[i]);
00303 }
00304 }
00305 };
00306
00307
00308 }
00309 }
00310
00311 #endif // OPENRAVEROS_MESSAGE_BODYINFO_H
00312