Go to the documentation of this file.00001
00002 #ifndef OPENRAVEROS_MESSAGE_ACTIVEDOFS_H
00003 #define OPENRAVEROS_MESSAGE_ACTIVEDOFS_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
00018 namespace openraveros
00019 {
00020 template <class ContainerAllocator>
00021 struct ActiveDOFs_ {
00022 typedef ActiveDOFs_<ContainerAllocator> Type;
00023
00024 ActiveDOFs_()
00025 : affine(0)
00026 , indices()
00027 , rotationaxis()
00028 {
00029 rotationaxis.assign(0.0);
00030 }
00031
00032 ActiveDOFs_(const ContainerAllocator& _alloc)
00033 : affine(0)
00034 , indices(_alloc)
00035 , rotationaxis()
00036 {
00037 rotationaxis.assign(0.0);
00038 }
00039
00040 typedef uint32_t _affine_type;
00041 uint32_t affine;
00042
00043 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _indices_type;
00044 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > indices;
00045
00046 typedef boost::array<float, 3> _rotationaxis_type;
00047 boost::array<float, 3> rotationaxis;
00048
00049 enum { DOF_X = 1 };
00050 enum { DOF_Y = 2 };
00051 enum { DOF_Z = 4 };
00052 enum { DOF_RotationAxis = 8 };
00053 enum { DOF_Rotation3D = 16 };
00054 enum { DOF_RotationQuat = 32 };
00055
00056 typedef boost::shared_ptr< ::openraveros::ActiveDOFs_<ContainerAllocator> > Ptr;
00057 typedef boost::shared_ptr< ::openraveros::ActiveDOFs_<ContainerAllocator> const> ConstPtr;
00058 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00059 };
00060 typedef ::openraveros::ActiveDOFs_<std::allocator<void> > ActiveDOFs;
00061
00062 typedef boost::shared_ptr< ::openraveros::ActiveDOFs> ActiveDOFsPtr;
00063 typedef boost::shared_ptr< ::openraveros::ActiveDOFs const> ActiveDOFsConstPtr;
00064
00065
00066 template<typename ContainerAllocator>
00067 std::ostream& operator<<(std::ostream& s, const ::openraveros::ActiveDOFs_<ContainerAllocator> & v)
00068 {
00069 ros::message_operations::Printer< ::openraveros::ActiveDOFs_<ContainerAllocator> >::stream(s, "", v);
00070 return s;}
00071
00072 }
00073
00074 namespace ros
00075 {
00076 namespace message_traits
00077 {
00078 template<class ContainerAllocator> struct IsMessage< ::openraveros::ActiveDOFs_<ContainerAllocator> > : public TrueType {};
00079 template<class ContainerAllocator> struct IsMessage< ::openraveros::ActiveDOFs_<ContainerAllocator> const> : public TrueType {};
00080 template<class ContainerAllocator>
00081 struct MD5Sum< ::openraveros::ActiveDOFs_<ContainerAllocator> > {
00082 static const char* value()
00083 {
00084 return "360c4d1931d07ad7864b05990ca89900";
00085 }
00086
00087 static const char* value(const ::openraveros::ActiveDOFs_<ContainerAllocator> &) { return value(); }
00088 static const uint64_t static_value1 = 0x360c4d1931d07ad7ULL;
00089 static const uint64_t static_value2 = 0x864b05990ca89900ULL;
00090 };
00091
00092 template<class ContainerAllocator>
00093 struct DataType< ::openraveros::ActiveDOFs_<ContainerAllocator> > {
00094 static const char* value()
00095 {
00096 return "openraveros/ActiveDOFs";
00097 }
00098
00099 static const char* value(const ::openraveros::ActiveDOFs_<ContainerAllocator> &) { return value(); }
00100 };
00101
00102 template<class ContainerAllocator>
00103 struct Definition< ::openraveros::ActiveDOFs_<ContainerAllocator> > {
00104 static const char* value()
00105 {
00106 return "# specifies the active degrees of freedom of the robot\n\
00107 \n\
00108 # mask of active base degrees of freedom\n\
00109 uint32 affine\n\
00110 \n\
00111 # active joints\n\
00112 int32[] indices\n\
00113 \n\
00114 float32[3] rotationaxis\n\
00115 \n\
00116 # mask for affine dofs\n\
00117 uint8 DOF_X = 1\n\
00118 uint8 DOF_Y = 2\n\
00119 uint8 DOF_Z = 4\n\
00120 uint8 DOF_RotationAxis = 8\n\
00121 uint8 DOF_Rotation3D = 16\n\
00122 uint8 DOF_RotationQuat = 32\n\
00123 \n\
00124 ";
00125 }
00126
00127 static const char* value(const ::openraveros::ActiveDOFs_<ContainerAllocator> &) { return value(); }
00128 };
00129
00130 }
00131 }
00132
00133 namespace ros
00134 {
00135 namespace serialization
00136 {
00137
00138 template<class ContainerAllocator> struct Serializer< ::openraveros::ActiveDOFs_<ContainerAllocator> >
00139 {
00140 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00141 {
00142 stream.next(m.affine);
00143 stream.next(m.indices);
00144 stream.next(m.rotationaxis);
00145 }
00146
00147 ROS_DECLARE_ALLINONE_SERIALIZER;
00148 };
00149 }
00150 }
00151
00152 namespace ros
00153 {
00154 namespace message_operations
00155 {
00156
00157 template<class ContainerAllocator>
00158 struct Printer< ::openraveros::ActiveDOFs_<ContainerAllocator> >
00159 {
00160 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::openraveros::ActiveDOFs_<ContainerAllocator> & v)
00161 {
00162 s << indent << "affine: ";
00163 Printer<uint32_t>::stream(s, indent + " ", v.affine);
00164 s << indent << "indices[]" << std::endl;
00165 for (size_t i = 0; i < v.indices.size(); ++i)
00166 {
00167 s << indent << " indices[" << i << "]: ";
00168 Printer<int32_t>::stream(s, indent + " ", v.indices[i]);
00169 }
00170 s << indent << "rotationaxis[]" << std::endl;
00171 for (size_t i = 0; i < v.rotationaxis.size(); ++i)
00172 {
00173 s << indent << " rotationaxis[" << i << "]: ";
00174 Printer<float>::stream(s, indent + " ", v.rotationaxis[i]);
00175 }
00176 }
00177 };
00178
00179
00180 }
00181 }
00182
00183 #endif // OPENRAVEROS_MESSAGE_ACTIVEDOFS_H
00184