00001
00002 #ifndef PR2_MECHANISM_CONTROLLERS_MESSAGE_BASECONTROLLERSTATE2_H
00003 #define PR2_MECHANISM_CONTROLLERS_MESSAGE_BASECONTROLLERSTATE2_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 "geometry_msgs/Twist.h"
00014
00015 namespace pr2_mechanism_controllers
00016 {
00017 template <class ContainerAllocator>
00018 struct BaseControllerState2_ : public ros::Message
00019 {
00020 typedef BaseControllerState2_<ContainerAllocator> Type;
00021
00022 BaseControllerState2_()
00023 : command()
00024 , joint_command()
00025 , joint_error()
00026 , joint_velocity_commanded()
00027 , joint_velocity_measured()
00028 , joint_effort_measured()
00029 , joint_effort_commanded()
00030 , joint_effort_error()
00031 , joint_names()
00032 {
00033 }
00034
00035 BaseControllerState2_(const ContainerAllocator& _alloc)
00036 : command(_alloc)
00037 , joint_command(_alloc)
00038 , joint_error(_alloc)
00039 , joint_velocity_commanded(_alloc)
00040 , joint_velocity_measured(_alloc)
00041 , joint_effort_measured(_alloc)
00042 , joint_effort_commanded(_alloc)
00043 , joint_effort_error(_alloc)
00044 , joint_names(_alloc)
00045 {
00046 }
00047
00048 typedef ::geometry_msgs::Twist_<ContainerAllocator> _command_type;
00049 ::geometry_msgs::Twist_<ContainerAllocator> command;
00050
00051 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _joint_command_type;
00052 std::vector<double, typename ContainerAllocator::template rebind<double>::other > joint_command;
00053
00054 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _joint_error_type;
00055 std::vector<double, typename ContainerAllocator::template rebind<double>::other > joint_error;
00056
00057 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _joint_velocity_commanded_type;
00058 std::vector<double, typename ContainerAllocator::template rebind<double>::other > joint_velocity_commanded;
00059
00060 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _joint_velocity_measured_type;
00061 std::vector<double, typename ContainerAllocator::template rebind<double>::other > joint_velocity_measured;
00062
00063 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _joint_effort_measured_type;
00064 std::vector<double, typename ContainerAllocator::template rebind<double>::other > joint_effort_measured;
00065
00066 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _joint_effort_commanded_type;
00067 std::vector<double, typename ContainerAllocator::template rebind<double>::other > joint_effort_commanded;
00068
00069 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _joint_effort_error_type;
00070 std::vector<double, typename ContainerAllocator::template rebind<double>::other > joint_effort_error;
00071
00072 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 > _joint_names_type;
00073 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 > joint_names;
00074
00075
00076 ROS_DEPRECATED uint32_t get_joint_command_size() const { return (uint32_t)joint_command.size(); }
00077 ROS_DEPRECATED void set_joint_command_size(uint32_t size) { joint_command.resize((size_t)size); }
00078 ROS_DEPRECATED void get_joint_command_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->joint_command; }
00079 ROS_DEPRECATED void set_joint_command_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->joint_command = vec; }
00080 ROS_DEPRECATED uint32_t get_joint_error_size() const { return (uint32_t)joint_error.size(); }
00081 ROS_DEPRECATED void set_joint_error_size(uint32_t size) { joint_error.resize((size_t)size); }
00082 ROS_DEPRECATED void get_joint_error_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->joint_error; }
00083 ROS_DEPRECATED void set_joint_error_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->joint_error = vec; }
00084 ROS_DEPRECATED uint32_t get_joint_velocity_commanded_size() const { return (uint32_t)joint_velocity_commanded.size(); }
00085 ROS_DEPRECATED void set_joint_velocity_commanded_size(uint32_t size) { joint_velocity_commanded.resize((size_t)size); }
00086 ROS_DEPRECATED void get_joint_velocity_commanded_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->joint_velocity_commanded; }
00087 ROS_DEPRECATED void set_joint_velocity_commanded_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->joint_velocity_commanded = vec; }
00088 ROS_DEPRECATED uint32_t get_joint_velocity_measured_size() const { return (uint32_t)joint_velocity_measured.size(); }
00089 ROS_DEPRECATED void set_joint_velocity_measured_size(uint32_t size) { joint_velocity_measured.resize((size_t)size); }
00090 ROS_DEPRECATED void get_joint_velocity_measured_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->joint_velocity_measured; }
00091 ROS_DEPRECATED void set_joint_velocity_measured_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->joint_velocity_measured = vec; }
00092 ROS_DEPRECATED uint32_t get_joint_effort_measured_size() const { return (uint32_t)joint_effort_measured.size(); }
00093 ROS_DEPRECATED void set_joint_effort_measured_size(uint32_t size) { joint_effort_measured.resize((size_t)size); }
00094 ROS_DEPRECATED void get_joint_effort_measured_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->joint_effort_measured; }
00095 ROS_DEPRECATED void set_joint_effort_measured_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->joint_effort_measured = vec; }
00096 ROS_DEPRECATED uint32_t get_joint_effort_commanded_size() const { return (uint32_t)joint_effort_commanded.size(); }
00097 ROS_DEPRECATED void set_joint_effort_commanded_size(uint32_t size) { joint_effort_commanded.resize((size_t)size); }
00098 ROS_DEPRECATED void get_joint_effort_commanded_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->joint_effort_commanded; }
00099 ROS_DEPRECATED void set_joint_effort_commanded_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->joint_effort_commanded = vec; }
00100 ROS_DEPRECATED uint32_t get_joint_effort_error_size() const { return (uint32_t)joint_effort_error.size(); }
00101 ROS_DEPRECATED void set_joint_effort_error_size(uint32_t size) { joint_effort_error.resize((size_t)size); }
00102 ROS_DEPRECATED void get_joint_effort_error_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->joint_effort_error; }
00103 ROS_DEPRECATED void set_joint_effort_error_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->joint_effort_error = vec; }
00104 ROS_DEPRECATED uint32_t get_joint_names_size() const { return (uint32_t)joint_names.size(); }
00105 ROS_DEPRECATED void set_joint_names_size(uint32_t size) { joint_names.resize((size_t)size); }
00106 ROS_DEPRECATED void get_joint_names_vec(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 > & vec) const { vec = this->joint_names; }
00107 ROS_DEPRECATED void set_joint_names_vec(const 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 > & vec) { this->joint_names = vec; }
00108 private:
00109 static const char* __s_getDataType_() { return "pr2_mechanism_controllers/BaseControllerState2"; }
00110 public:
00111 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00112
00113 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00114
00115 private:
00116 static const char* __s_getMD5Sum_() { return "d4b64baf09d8cb133f3f2bc279de1137"; }
00117 public:
00118 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00119
00120 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00121
00122 private:
00123 static const char* __s_getMessageDefinition_() { return "geometry_msgs/Twist command\n\
00124 float64[] joint_command\n\
00125 float64[] joint_error\n\
00126 float64[] joint_velocity_commanded\n\
00127 float64[] joint_velocity_measured\n\
00128 float64[] joint_effort_measured\n\
00129 float64[] joint_effort_commanded\n\
00130 float64[] joint_effort_error\n\
00131 string[] joint_names\n\
00132 \n\
00133 \n\
00134 ================================================================================\n\
00135 MSG: geometry_msgs/Twist\n\
00136 # This expresses velocity in free space broken into it's linear and angular parts. \n\
00137 Vector3 linear\n\
00138 Vector3 angular\n\
00139 \n\
00140 ================================================================================\n\
00141 MSG: geometry_msgs/Vector3\n\
00142 # This represents a vector in free space. \n\
00143 \n\
00144 float64 x\n\
00145 float64 y\n\
00146 float64 z\n\
00147 "; }
00148 public:
00149 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00150
00151 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00152
00153 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00154 {
00155 ros::serialization::OStream stream(write_ptr, 1000000000);
00156 ros::serialization::serialize(stream, command);
00157 ros::serialization::serialize(stream, joint_command);
00158 ros::serialization::serialize(stream, joint_error);
00159 ros::serialization::serialize(stream, joint_velocity_commanded);
00160 ros::serialization::serialize(stream, joint_velocity_measured);
00161 ros::serialization::serialize(stream, joint_effort_measured);
00162 ros::serialization::serialize(stream, joint_effort_commanded);
00163 ros::serialization::serialize(stream, joint_effort_error);
00164 ros::serialization::serialize(stream, joint_names);
00165 return stream.getData();
00166 }
00167
00168 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00169 {
00170 ros::serialization::IStream stream(read_ptr, 1000000000);
00171 ros::serialization::deserialize(stream, command);
00172 ros::serialization::deserialize(stream, joint_command);
00173 ros::serialization::deserialize(stream, joint_error);
00174 ros::serialization::deserialize(stream, joint_velocity_commanded);
00175 ros::serialization::deserialize(stream, joint_velocity_measured);
00176 ros::serialization::deserialize(stream, joint_effort_measured);
00177 ros::serialization::deserialize(stream, joint_effort_commanded);
00178 ros::serialization::deserialize(stream, joint_effort_error);
00179 ros::serialization::deserialize(stream, joint_names);
00180 return stream.getData();
00181 }
00182
00183 ROS_DEPRECATED virtual uint32_t serializationLength() const
00184 {
00185 uint32_t size = 0;
00186 size += ros::serialization::serializationLength(command);
00187 size += ros::serialization::serializationLength(joint_command);
00188 size += ros::serialization::serializationLength(joint_error);
00189 size += ros::serialization::serializationLength(joint_velocity_commanded);
00190 size += ros::serialization::serializationLength(joint_velocity_measured);
00191 size += ros::serialization::serializationLength(joint_effort_measured);
00192 size += ros::serialization::serializationLength(joint_effort_commanded);
00193 size += ros::serialization::serializationLength(joint_effort_error);
00194 size += ros::serialization::serializationLength(joint_names);
00195 return size;
00196 }
00197
00198 typedef boost::shared_ptr< ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> > Ptr;
00199 typedef boost::shared_ptr< ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> const> ConstPtr;
00200 };
00201 typedef ::pr2_mechanism_controllers::BaseControllerState2_<std::allocator<void> > BaseControllerState2;
00202
00203 typedef boost::shared_ptr< ::pr2_mechanism_controllers::BaseControllerState2> BaseControllerState2Ptr;
00204 typedef boost::shared_ptr< ::pr2_mechanism_controllers::BaseControllerState2 const> BaseControllerState2ConstPtr;
00205
00206
00207 template<typename ContainerAllocator>
00208 std::ostream& operator<<(std::ostream& s, const ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> & v)
00209 {
00210 ros::message_operations::Printer< ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> >::stream(s, "", v);
00211 return s;}
00212
00213 }
00214
00215 namespace ros
00216 {
00217 namespace message_traits
00218 {
00219 template<class ContainerAllocator>
00220 struct MD5Sum< ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> > {
00221 static const char* value()
00222 {
00223 return "d4b64baf09d8cb133f3f2bc279de1137";
00224 }
00225
00226 static const char* value(const ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> &) { return value(); }
00227 static const uint64_t static_value1 = 0xd4b64baf09d8cb13ULL;
00228 static const uint64_t static_value2 = 0x3f3f2bc279de1137ULL;
00229 };
00230
00231 template<class ContainerAllocator>
00232 struct DataType< ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> > {
00233 static const char* value()
00234 {
00235 return "pr2_mechanism_controllers/BaseControllerState2";
00236 }
00237
00238 static const char* value(const ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> &) { return value(); }
00239 };
00240
00241 template<class ContainerAllocator>
00242 struct Definition< ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> > {
00243 static const char* value()
00244 {
00245 return "geometry_msgs/Twist command\n\
00246 float64[] joint_command\n\
00247 float64[] joint_error\n\
00248 float64[] joint_velocity_commanded\n\
00249 float64[] joint_velocity_measured\n\
00250 float64[] joint_effort_measured\n\
00251 float64[] joint_effort_commanded\n\
00252 float64[] joint_effort_error\n\
00253 string[] joint_names\n\
00254 \n\
00255 \n\
00256 ================================================================================\n\
00257 MSG: geometry_msgs/Twist\n\
00258 # This expresses velocity in free space broken into it's linear and angular parts. \n\
00259 Vector3 linear\n\
00260 Vector3 angular\n\
00261 \n\
00262 ================================================================================\n\
00263 MSG: geometry_msgs/Vector3\n\
00264 # This represents a vector in free space. \n\
00265 \n\
00266 float64 x\n\
00267 float64 y\n\
00268 float64 z\n\
00269 ";
00270 }
00271
00272 static const char* value(const ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> &) { return value(); }
00273 };
00274
00275 }
00276 }
00277
00278 namespace ros
00279 {
00280 namespace serialization
00281 {
00282
00283 template<class ContainerAllocator> struct Serializer< ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> >
00284 {
00285 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00286 {
00287 stream.next(m.command);
00288 stream.next(m.joint_command);
00289 stream.next(m.joint_error);
00290 stream.next(m.joint_velocity_commanded);
00291 stream.next(m.joint_velocity_measured);
00292 stream.next(m.joint_effort_measured);
00293 stream.next(m.joint_effort_commanded);
00294 stream.next(m.joint_effort_error);
00295 stream.next(m.joint_names);
00296 }
00297
00298 ROS_DECLARE_ALLINONE_SERIALIZER;
00299 };
00300 }
00301 }
00302
00303 namespace ros
00304 {
00305 namespace message_operations
00306 {
00307
00308 template<class ContainerAllocator>
00309 struct Printer< ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> >
00310 {
00311 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_mechanism_controllers::BaseControllerState2_<ContainerAllocator> & v)
00312 {
00313 s << indent << "command: ";
00314 s << std::endl;
00315 Printer< ::geometry_msgs::Twist_<ContainerAllocator> >::stream(s, indent + " ", v.command);
00316 s << indent << "joint_command[]" << std::endl;
00317 for (size_t i = 0; i < v.joint_command.size(); ++i)
00318 {
00319 s << indent << " joint_command[" << i << "]: ";
00320 Printer<double>::stream(s, indent + " ", v.joint_command[i]);
00321 }
00322 s << indent << "joint_error[]" << std::endl;
00323 for (size_t i = 0; i < v.joint_error.size(); ++i)
00324 {
00325 s << indent << " joint_error[" << i << "]: ";
00326 Printer<double>::stream(s, indent + " ", v.joint_error[i]);
00327 }
00328 s << indent << "joint_velocity_commanded[]" << std::endl;
00329 for (size_t i = 0; i < v.joint_velocity_commanded.size(); ++i)
00330 {
00331 s << indent << " joint_velocity_commanded[" << i << "]: ";
00332 Printer<double>::stream(s, indent + " ", v.joint_velocity_commanded[i]);
00333 }
00334 s << indent << "joint_velocity_measured[]" << std::endl;
00335 for (size_t i = 0; i < v.joint_velocity_measured.size(); ++i)
00336 {
00337 s << indent << " joint_velocity_measured[" << i << "]: ";
00338 Printer<double>::stream(s, indent + " ", v.joint_velocity_measured[i]);
00339 }
00340 s << indent << "joint_effort_measured[]" << std::endl;
00341 for (size_t i = 0; i < v.joint_effort_measured.size(); ++i)
00342 {
00343 s << indent << " joint_effort_measured[" << i << "]: ";
00344 Printer<double>::stream(s, indent + " ", v.joint_effort_measured[i]);
00345 }
00346 s << indent << "joint_effort_commanded[]" << std::endl;
00347 for (size_t i = 0; i < v.joint_effort_commanded.size(); ++i)
00348 {
00349 s << indent << " joint_effort_commanded[" << i << "]: ";
00350 Printer<double>::stream(s, indent + " ", v.joint_effort_commanded[i]);
00351 }
00352 s << indent << "joint_effort_error[]" << std::endl;
00353 for (size_t i = 0; i < v.joint_effort_error.size(); ++i)
00354 {
00355 s << indent << " joint_effort_error[" << i << "]: ";
00356 Printer<double>::stream(s, indent + " ", v.joint_effort_error[i]);
00357 }
00358 s << indent << "joint_names[]" << std::endl;
00359 for (size_t i = 0; i < v.joint_names.size(); ++i)
00360 {
00361 s << indent << " joint_names[" << i << "]: ";
00362 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.joint_names[i]);
00363 }
00364 }
00365 };
00366
00367
00368 }
00369 }
00370
00371 #endif // PR2_MECHANISM_CONTROLLERS_MESSAGE_BASECONTROLLERSTATE2_H
00372