It has only one change from original one. I added robotfeedback message on it.
Dependents: RobotFeedback mobileRobotITU
Fork of ros_lib_indigo by
Diff: gazebo_msgs/LinkState.h
- Revision:
- 0:fd24f7ca9688
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gazebo_msgs/LinkState.h Thu Mar 31 14:22:59 2016 +0000 @@ -0,0 +1,80 @@ +#ifndef _ROS_gazebo_msgs_LinkState_h +#define _ROS_gazebo_msgs_LinkState_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" +#include "geometry_msgs/Twist.h" + +namespace gazebo_msgs +{ + + class LinkState : public ros::Msg + { + public: + const char* link_name; + geometry_msgs::Pose pose; + geometry_msgs::Twist twist; + const char* reference_frame; + + LinkState(): + link_name(""), + pose(), + twist(), + reference_frame("") + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + uint32_t length_link_name = strlen(this->link_name); + memcpy(outbuffer + offset, &length_link_name, sizeof(uint32_t)); + offset += 4; + memcpy(outbuffer + offset, this->link_name, length_link_name); + offset += length_link_name; + offset += this->pose.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + uint32_t length_reference_frame = strlen(this->reference_frame); + memcpy(outbuffer + offset, &length_reference_frame, sizeof(uint32_t)); + offset += 4; + memcpy(outbuffer + offset, this->reference_frame, length_reference_frame); + offset += length_reference_frame; + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t length_link_name; + memcpy(&length_link_name, (inbuffer + offset), sizeof(uint32_t)); + offset += 4; + for(unsigned int k= offset; k< offset+length_link_name; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_link_name-1]=0; + this->link_name = (char *)(inbuffer + offset-1); + offset += length_link_name; + offset += this->pose.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + uint32_t length_reference_frame; + memcpy(&length_reference_frame, (inbuffer + offset), sizeof(uint32_t)); + offset += 4; + for(unsigned int k= offset; k< offset+length_reference_frame; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_reference_frame-1]=0; + this->reference_frame = (char *)(inbuffer + offset-1); + offset += length_reference_frame; + return offset; + } + + const char * getType(){ return "gazebo_msgs/LinkState"; }; + const char * getMD5(){ return "0818ebbf28ce3a08d48ab1eaa7309ebe"; }; + + }; + +} +#endif \ No newline at end of file