00001
00002 #ifndef OPENRAVEROS_MESSAGE_ROBOTINFO_H
00003 #define OPENRAVEROS_MESSAGE_ROBOTINFO_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/BodyInfo.h"
00018 #include "openraveros/Manipulator.h"
00019 #include "openraveros/AttachedSensor.h"
00020 #include "openraveros/ActiveDOFs.h"
00021
00022 namespace openraveros
00023 {
00024 template <class ContainerAllocator>
00025 struct RobotInfo_ {
00026 typedef RobotInfo_<ContainerAllocator> Type;
00027
00028 RobotInfo_()
00029 : bodyinfo()
00030 , manips()
00031 , sensors()
00032 , activedof(0)
00033 , activemanip(0)
00034 , active()
00035 , activelowerlimit()
00036 , activeupperlimit()
00037 {
00038 }
00039
00040 RobotInfo_(const ContainerAllocator& _alloc)
00041 : bodyinfo(_alloc)
00042 , manips(_alloc)
00043 , sensors(_alloc)
00044 , activedof(0)
00045 , activemanip(0)
00046 , active(_alloc)
00047 , activelowerlimit(_alloc)
00048 , activeupperlimit(_alloc)
00049 {
00050 }
00051
00052 typedef ::openraveros::BodyInfo_<ContainerAllocator> _bodyinfo_type;
00053 ::openraveros::BodyInfo_<ContainerAllocator> bodyinfo;
00054
00055 typedef std::vector< ::openraveros::Manipulator_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::openraveros::Manipulator_<ContainerAllocator> >::other > _manips_type;
00056 std::vector< ::openraveros::Manipulator_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::openraveros::Manipulator_<ContainerAllocator> >::other > manips;
00057
00058 typedef std::vector< ::openraveros::AttachedSensor_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::openraveros::AttachedSensor_<ContainerAllocator> >::other > _sensors_type;
00059 std::vector< ::openraveros::AttachedSensor_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::openraveros::AttachedSensor_<ContainerAllocator> >::other > sensors;
00060
00061 typedef uint8_t _activedof_type;
00062 uint8_t activedof;
00063
00064 typedef uint8_t _activemanip_type;
00065 uint8_t activemanip;
00066
00067 typedef ::openraveros::ActiveDOFs_<ContainerAllocator> _active_type;
00068 ::openraveros::ActiveDOFs_<ContainerAllocator> active;
00069
00070 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _activelowerlimit_type;
00071 std::vector<float, typename ContainerAllocator::template rebind<float>::other > activelowerlimit;
00072
00073 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _activeupperlimit_type;
00074 std::vector<float, typename ContainerAllocator::template rebind<float>::other > activeupperlimit;
00075
00076 enum { Req_Manipulators = 256 };
00077 enum { Req_Sensors = 512 };
00078 enum { Req_ActiveDOFs = 1024 };
00079 enum { Req_ActiveLimits = 2048 };
00080
00081 typedef boost::shared_ptr< ::openraveros::RobotInfo_<ContainerAllocator> > Ptr;
00082 typedef boost::shared_ptr< ::openraveros::RobotInfo_<ContainerAllocator> const> ConstPtr;
00083 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00084 };
00085 typedef ::openraveros::RobotInfo_<std::allocator<void> > RobotInfo;
00086
00087 typedef boost::shared_ptr< ::openraveros::RobotInfo> RobotInfoPtr;
00088 typedef boost::shared_ptr< ::openraveros::RobotInfo const> RobotInfoConstPtr;
00089
00090
00091 template<typename ContainerAllocator>
00092 std::ostream& operator<<(std::ostream& s, const ::openraveros::RobotInfo_<ContainerAllocator> & v)
00093 {
00094 ros::message_operations::Printer< ::openraveros::RobotInfo_<ContainerAllocator> >::stream(s, "", v);
00095 return s;}
00096
00097 }
00098
00099 namespace ros
00100 {
00101 namespace message_traits
00102 {
00103 template<class ContainerAllocator> struct IsMessage< ::openraveros::RobotInfo_<ContainerAllocator> > : public TrueType {};
00104 template<class ContainerAllocator> struct IsMessage< ::openraveros::RobotInfo_<ContainerAllocator> const> : public TrueType {};
00105 template<class ContainerAllocator>
00106 struct MD5Sum< ::openraveros::RobotInfo_<ContainerAllocator> > {
00107 static const char* value()
00108 {
00109 return "fd0755be07c8600a7f1a81ef43e04b2c";
00110 }
00111
00112 static const char* value(const ::openraveros::RobotInfo_<ContainerAllocator> &) { return value(); }
00113 static const uint64_t static_value1 = 0xfd0755be07c8600aULL;
00114 static const uint64_t static_value2 = 0x7f1a81ef43e04b2cULL;
00115 };
00116
00117 template<class ContainerAllocator>
00118 struct DataType< ::openraveros::RobotInfo_<ContainerAllocator> > {
00119 static const char* value()
00120 {
00121 return "openraveros/RobotInfo";
00122 }
00123
00124 static const char* value(const ::openraveros::RobotInfo_<ContainerAllocator> &) { return value(); }
00125 };
00126
00127 template<class ContainerAllocator>
00128 struct Definition< ::openraveros::RobotInfo_<ContainerAllocator> > {
00129 static const char* value()
00130 {
00131 return "# robot information\n\
00132 \n\
00133 BodyInfo bodyinfo\n\
00134 Manipulator[] manips\n\
00135 AttachedSensor[] sensors\n\
00136 \n\
00137 # total active dof\n\
00138 uint8 activedof\n\
00139 \n\
00140 # current active manipulator\n\
00141 uint8 activemanip\n\
00142 \n\
00143 # information about the active dofs\n\
00144 ActiveDOFs active\n\
00145 \n\
00146 # joint limits\n\
00147 float32[] activelowerlimit\n\
00148 float32[] activeupperlimit\n\
00149 \n\
00150 # upper 8 bits\n\
00151 uint16 Req_Manipulators=256\n\
00152 uint16 Req_Sensors=512\n\
00153 uint16 Req_ActiveDOFs=1024\n\
00154 uint16 Req_ActiveLimits=2048\n\
00155 \n\
00156 ================================================================================\n\
00157 MSG: openraveros/BodyInfo\n\
00158 # information about a body\n\
00159 int32 bodyid\n\
00160 \n\
00161 # current transformation\n\
00162 AffineTransformMatrix transform\n\
00163 \n\
00164 # degrees of freedom (number of joints)\n\
00165 uint8 dof\n\
00166 \n\
00167 # enabled status\n\
00168 uint8 enabled\n\
00169 \n\
00170 \n\
00171 # filename used to create body geometry\n\
00172 string filename\n\
00173 \n\
00174 # name of the body\n\
00175 string name\n\
00176 \n\
00177 # type of body\n\
00178 string type\n\
00179 \n\
00180 float32[] jointvalues\n\
00181 AffineTransformMatrix[] links\n\
00182 string[] linknames\n\
00183 string[] jointnames\n\
00184 \n\
00185 # joint limits\n\
00186 float32[] lowerlimit\n\
00187 float32[] upperlimit\n\
00188 \n\
00189 # request information bitmasks, also holds robot specific request information (lower 8 bits)\n\
00190 uint16 Req_JointValues=1\n\
00191 uint16 Req_Links=2\n\
00192 uint16 Req_LinkNames=4 # fills the linknames\n\
00193 uint16 Req_JointLimits=8\n\
00194 uint16 Req_Names=16 # if set, fills filename, name, and type\n\
00195 uint16 Req_JointNames=32 # fills the jointnames\n\
00196 ================================================================================\n\
00197 MSG: openraveros/AffineTransformMatrix\n\
00198 # column ordered 3x4 affine transformation, ie: the arrangement in memory is:\n\
00199 # where the upper 3x3 matrix is orthonormal\n\
00200 # [0] [3] [6] [9]\n\
00201 # [1] [4] [7] [10]\n\
00202 # [2] [5] [8] [11]\n\
00203 float32[12] m\n\
00204 \n\
00205 ================================================================================\n\
00206 MSG: openraveros/Manipulator\n\
00207 # information specific to a manipulator for a robot\n\
00208 \n\
00209 # zero-based index of base link that manipulator is attached to\n\
00210 int8 baselink\n\
00211 \n\
00212 # zero-based index of link defining the end-effector\n\
00213 int8 eelink\n\
00214 \n\
00215 # 3x4 matrix of the grasp frame relative to the end-effector link\n\
00216 AffineTransformMatrix tgrasp\n\
00217 \n\
00218 # zero-based hand joint indices\n\
00219 uint8[] handjoints\n\
00220 \n\
00221 # zero-based arm joints indices (from base to end-effector)\n\
00222 uint8[] armjoints\n\
00223 \n\
00224 # name of ik solver using\n\
00225 string iksolvername\n\
00226 \n\
00227 # manipulator name\n\
00228 string name\n\
00229 \n\
00230 ================================================================================\n\
00231 MSG: openraveros/AttachedSensor\n\
00232 # information specific to an attached sensor for a robot\n\
00233 \n\
00234 # name of sensor\n\
00235 string name\n\
00236 \n\
00237 # zero-based index of link sensor is attached to\n\
00238 int8 attachedlink\n\
00239 \n\
00240 # 3x4 matrix of the relative transform of the sensor frame with respect to the link frame\n\
00241 AffineTransformMatrix trelative\n\
00242 \n\
00243 # 3x4 matrix of the global transform of the sensor (ie, with link transform applied)\n\
00244 AffineTransformMatrix tglobal\n\
00245 \n\
00246 # type of sensor\n\
00247 string type\n\
00248 \n\
00249 ================================================================================\n\
00250 MSG: openraveros/ActiveDOFs\n\
00251 # specifies the active degrees of freedom of the robot\n\
00252 \n\
00253 # mask of active base degrees of freedom\n\
00254 uint32 affine\n\
00255 \n\
00256 # active joints\n\
00257 int32[] indices\n\
00258 \n\
00259 float32[3] rotationaxis\n\
00260 \n\
00261 # mask for affine dofs\n\
00262 uint8 DOF_X = 1\n\
00263 uint8 DOF_Y = 2\n\
00264 uint8 DOF_Z = 4\n\
00265 uint8 DOF_RotationAxis = 8\n\
00266 uint8 DOF_Rotation3D = 16\n\
00267 uint8 DOF_RotationQuat = 32\n\
00268 \n\
00269 ";
00270 }
00271
00272 static const char* value(const ::openraveros::RobotInfo_<ContainerAllocator> &) { return value(); }
00273 };
00274
00275 }
00276 }
00277
00278 namespace ros
00279 {
00280 namespace serialization
00281 {
00282
00283 template<class ContainerAllocator> struct Serializer< ::openraveros::RobotInfo_<ContainerAllocator> >
00284 {
00285 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00286 {
00287 stream.next(m.bodyinfo);
00288 stream.next(m.manips);
00289 stream.next(m.sensors);
00290 stream.next(m.activedof);
00291 stream.next(m.activemanip);
00292 stream.next(m.active);
00293 stream.next(m.activelowerlimit);
00294 stream.next(m.activeupperlimit);
00295 }
00296
00297 ROS_DECLARE_ALLINONE_SERIALIZER;
00298 };
00299 }
00300 }
00301
00302 namespace ros
00303 {
00304 namespace message_operations
00305 {
00306
00307 template<class ContainerAllocator>
00308 struct Printer< ::openraveros::RobotInfo_<ContainerAllocator> >
00309 {
00310 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::openraveros::RobotInfo_<ContainerAllocator> & v)
00311 {
00312 s << indent << "bodyinfo: ";
00313 s << std::endl;
00314 Printer< ::openraveros::BodyInfo_<ContainerAllocator> >::stream(s, indent + " ", v.bodyinfo);
00315 s << indent << "manips[]" << std::endl;
00316 for (size_t i = 0; i < v.manips.size(); ++i)
00317 {
00318 s << indent << " manips[" << i << "]: ";
00319 s << std::endl;
00320 s << indent;
00321 Printer< ::openraveros::Manipulator_<ContainerAllocator> >::stream(s, indent + " ", v.manips[i]);
00322 }
00323 s << indent << "sensors[]" << std::endl;
00324 for (size_t i = 0; i < v.sensors.size(); ++i)
00325 {
00326 s << indent << " sensors[" << i << "]: ";
00327 s << std::endl;
00328 s << indent;
00329 Printer< ::openraveros::AttachedSensor_<ContainerAllocator> >::stream(s, indent + " ", v.sensors[i]);
00330 }
00331 s << indent << "activedof: ";
00332 Printer<uint8_t>::stream(s, indent + " ", v.activedof);
00333 s << indent << "activemanip: ";
00334 Printer<uint8_t>::stream(s, indent + " ", v.activemanip);
00335 s << indent << "active: ";
00336 s << std::endl;
00337 Printer< ::openraveros::ActiveDOFs_<ContainerAllocator> >::stream(s, indent + " ", v.active);
00338 s << indent << "activelowerlimit[]" << std::endl;
00339 for (size_t i = 0; i < v.activelowerlimit.size(); ++i)
00340 {
00341 s << indent << " activelowerlimit[" << i << "]: ";
00342 Printer<float>::stream(s, indent + " ", v.activelowerlimit[i]);
00343 }
00344 s << indent << "activeupperlimit[]" << std::endl;
00345 for (size_t i = 0; i < v.activeupperlimit.size(); ++i)
00346 {
00347 s << indent << " activeupperlimit[" << i << "]: ";
00348 Printer<float>::stream(s, indent + " ", v.activeupperlimit[i]);
00349 }
00350 }
00351 };
00352
00353
00354 }
00355 }
00356
00357 #endif // OPENRAVEROS_MESSAGE_ROBOTINFO_H
00358