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