00001
00002 #ifndef GAZEBO_PLUGINS_MESSAGE_MODELJOINTSSTATE_H
00003 #define GAZEBO_PLUGINS_MESSAGE_MODELJOINTSSTATE_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/Pose.h"
00014
00015 namespace gazebo_plugins
00016 {
00017 template <class ContainerAllocator>
00018 struct ModelJointsState_ : public ros::Message
00019 {
00020 typedef ModelJointsState_<ContainerAllocator> Type;
00021
00022 ModelJointsState_()
00023 : model_pose()
00024 , joint_names()
00025 , joint_positions()
00026 {
00027 }
00028
00029 ModelJointsState_(const ContainerAllocator& _alloc)
00030 : model_pose(_alloc)
00031 , joint_names(_alloc)
00032 , joint_positions(_alloc)
00033 {
00034 }
00035
00036 typedef std::vector< ::geometry_msgs::Pose_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Pose_<ContainerAllocator> >::other > _model_pose_type;
00037 std::vector< ::geometry_msgs::Pose_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Pose_<ContainerAllocator> >::other > model_pose;
00038
00039 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;
00040 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;
00041
00042 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _joint_positions_type;
00043 std::vector<double, typename ContainerAllocator::template rebind<double>::other > joint_positions;
00044
00045
00046 ROS_DEPRECATED uint32_t get_model_pose_size() const { return (uint32_t)model_pose.size(); }
00047 ROS_DEPRECATED void set_model_pose_size(uint32_t size) { model_pose.resize((size_t)size); }
00048 ROS_DEPRECATED void get_model_pose_vec(std::vector< ::geometry_msgs::Pose_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Pose_<ContainerAllocator> >::other > & vec) const { vec = this->model_pose; }
00049 ROS_DEPRECATED void set_model_pose_vec(const std::vector< ::geometry_msgs::Pose_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Pose_<ContainerAllocator> >::other > & vec) { this->model_pose = vec; }
00050 ROS_DEPRECATED uint32_t get_joint_names_size() const { return (uint32_t)joint_names.size(); }
00051 ROS_DEPRECATED void set_joint_names_size(uint32_t size) { joint_names.resize((size_t)size); }
00052 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; }
00053 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; }
00054 ROS_DEPRECATED uint32_t get_joint_positions_size() const { return (uint32_t)joint_positions.size(); }
00055 ROS_DEPRECATED void set_joint_positions_size(uint32_t size) { joint_positions.resize((size_t)size); }
00056 ROS_DEPRECATED void get_joint_positions_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->joint_positions; }
00057 ROS_DEPRECATED void set_joint_positions_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->joint_positions = vec; }
00058 private:
00059 static const char* __s_getDataType_() { return "gazebo_plugins/ModelJointsState"; }
00060 public:
00061 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00062
00063 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00064
00065 private:
00066 static const char* __s_getMD5Sum_() { return "f700a74958b6566fae4cd77fbb80ffd4"; }
00067 public:
00068 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00069
00070 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00071
00072 private:
00073 static const char* __s_getMessageDefinition_() { return "geometry_msgs/Pose[] model_pose # set as single element array if user wishes to specify model pose, otherwise, leave empty\n\
00074 string[] joint_names # list of joint names\n\
00075 float64[] joint_positions # list of desired joint positions, should match joint_names\n\
00076 \n\
00077 ================================================================================\n\
00078 MSG: geometry_msgs/Pose\n\
00079 # A representation of pose in free space, composed of postion and orientation. \n\
00080 Point position\n\
00081 Quaternion orientation\n\
00082 \n\
00083 ================================================================================\n\
00084 MSG: geometry_msgs/Point\n\
00085 # This contains the position of a point in free space\n\
00086 float64 x\n\
00087 float64 y\n\
00088 float64 z\n\
00089 \n\
00090 ================================================================================\n\
00091 MSG: geometry_msgs/Quaternion\n\
00092 # This represents an orientation in free space in quaternion form.\n\
00093 \n\
00094 float64 x\n\
00095 float64 y\n\
00096 float64 z\n\
00097 float64 w\n\
00098 \n\
00099 "; }
00100 public:
00101 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00102
00103 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00104
00105 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00106 {
00107 ros::serialization::OStream stream(write_ptr, 1000000000);
00108 ros::serialization::serialize(stream, model_pose);
00109 ros::serialization::serialize(stream, joint_names);
00110 ros::serialization::serialize(stream, joint_positions);
00111 return stream.getData();
00112 }
00113
00114 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00115 {
00116 ros::serialization::IStream stream(read_ptr, 1000000000);
00117 ros::serialization::deserialize(stream, model_pose);
00118 ros::serialization::deserialize(stream, joint_names);
00119 ros::serialization::deserialize(stream, joint_positions);
00120 return stream.getData();
00121 }
00122
00123 ROS_DEPRECATED virtual uint32_t serializationLength() const
00124 {
00125 uint32_t size = 0;
00126 size += ros::serialization::serializationLength(model_pose);
00127 size += ros::serialization::serializationLength(joint_names);
00128 size += ros::serialization::serializationLength(joint_positions);
00129 return size;
00130 }
00131
00132 typedef boost::shared_ptr< ::gazebo_plugins::ModelJointsState_<ContainerAllocator> > Ptr;
00133 typedef boost::shared_ptr< ::gazebo_plugins::ModelJointsState_<ContainerAllocator> const> ConstPtr;
00134 };
00135 typedef ::gazebo_plugins::ModelJointsState_<std::allocator<void> > ModelJointsState;
00136
00137 typedef boost::shared_ptr< ::gazebo_plugins::ModelJointsState> ModelJointsStatePtr;
00138 typedef boost::shared_ptr< ::gazebo_plugins::ModelJointsState const> ModelJointsStateConstPtr;
00139
00140
00141 template<typename ContainerAllocator>
00142 std::ostream& operator<<(std::ostream& s, const ::gazebo_plugins::ModelJointsState_<ContainerAllocator> & v)
00143 {
00144 ros::message_operations::Printer< ::gazebo_plugins::ModelJointsState_<ContainerAllocator> >::stream(s, "", v);
00145 return s;}
00146
00147 }
00148
00149 namespace ros
00150 {
00151 namespace message_traits
00152 {
00153 template<class ContainerAllocator>
00154 struct MD5Sum< ::gazebo_plugins::ModelJointsState_<ContainerAllocator> > {
00155 static const char* value()
00156 {
00157 return "f700a74958b6566fae4cd77fbb80ffd4";
00158 }
00159
00160 static const char* value(const ::gazebo_plugins::ModelJointsState_<ContainerAllocator> &) { return value(); }
00161 static const uint64_t static_value1 = 0xf700a74958b6566fULL;
00162 static const uint64_t static_value2 = 0xae4cd77fbb80ffd4ULL;
00163 };
00164
00165 template<class ContainerAllocator>
00166 struct DataType< ::gazebo_plugins::ModelJointsState_<ContainerAllocator> > {
00167 static const char* value()
00168 {
00169 return "gazebo_plugins/ModelJointsState";
00170 }
00171
00172 static const char* value(const ::gazebo_plugins::ModelJointsState_<ContainerAllocator> &) { return value(); }
00173 };
00174
00175 template<class ContainerAllocator>
00176 struct Definition< ::gazebo_plugins::ModelJointsState_<ContainerAllocator> > {
00177 static const char* value()
00178 {
00179 return "geometry_msgs/Pose[] model_pose # set as single element array if user wishes to specify model pose, otherwise, leave empty\n\
00180 string[] joint_names # list of joint names\n\
00181 float64[] joint_positions # list of desired joint positions, should match joint_names\n\
00182 \n\
00183 ================================================================================\n\
00184 MSG: geometry_msgs/Pose\n\
00185 # A representation of pose in free space, composed of postion and orientation. \n\
00186 Point position\n\
00187 Quaternion orientation\n\
00188 \n\
00189 ================================================================================\n\
00190 MSG: geometry_msgs/Point\n\
00191 # This contains the position of a point in free space\n\
00192 float64 x\n\
00193 float64 y\n\
00194 float64 z\n\
00195 \n\
00196 ================================================================================\n\
00197 MSG: geometry_msgs/Quaternion\n\
00198 # This represents an orientation in free space in quaternion form.\n\
00199 \n\
00200 float64 x\n\
00201 float64 y\n\
00202 float64 z\n\
00203 float64 w\n\
00204 \n\
00205 ";
00206 }
00207
00208 static const char* value(const ::gazebo_plugins::ModelJointsState_<ContainerAllocator> &) { return value(); }
00209 };
00210
00211 }
00212 }
00213
00214 namespace ros
00215 {
00216 namespace serialization
00217 {
00218
00219 template<class ContainerAllocator> struct Serializer< ::gazebo_plugins::ModelJointsState_<ContainerAllocator> >
00220 {
00221 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00222 {
00223 stream.next(m.model_pose);
00224 stream.next(m.joint_names);
00225 stream.next(m.joint_positions);
00226 }
00227
00228 ROS_DECLARE_ALLINONE_SERIALIZER;
00229 };
00230 }
00231 }
00232
00233 namespace ros
00234 {
00235 namespace message_operations
00236 {
00237
00238 template<class ContainerAllocator>
00239 struct Printer< ::gazebo_plugins::ModelJointsState_<ContainerAllocator> >
00240 {
00241 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::gazebo_plugins::ModelJointsState_<ContainerAllocator> & v)
00242 {
00243 s << indent << "model_pose[]" << std::endl;
00244 for (size_t i = 0; i < v.model_pose.size(); ++i)
00245 {
00246 s << indent << " model_pose[" << i << "]: ";
00247 s << std::endl;
00248 s << indent;
00249 Printer< ::geometry_msgs::Pose_<ContainerAllocator> >::stream(s, indent + " ", v.model_pose[i]);
00250 }
00251 s << indent << "joint_names[]" << std::endl;
00252 for (size_t i = 0; i < v.joint_names.size(); ++i)
00253 {
00254 s << indent << " joint_names[" << i << "]: ";
00255 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.joint_names[i]);
00256 }
00257 s << indent << "joint_positions[]" << std::endl;
00258 for (size_t i = 0; i < v.joint_positions.size(); ++i)
00259 {
00260 s << indent << " joint_positions[" << i << "]: ";
00261 Printer<double>::stream(s, indent + " ", v.joint_positions[i]);
00262 }
00263 }
00264 };
00265
00266
00267 }
00268 }
00269
00270 #endif // GAZEBO_PLUGINS_MESSAGE_MODELJOINTSSTATE_H
00271