This program is porting rosserial_arduino for mbed http://www.ros.org/wiki/rosserial_arduino This program supported the revision of 169 of rosserial. This program contains an example.

Dependencies:   rosserial_mbed_lib mbed Servo

Committer:
nucho
Date:
Sat Nov 12 23:53:04 2011 +0000
Revision:
3:dff241b66f84
Parent:
1:098e75fd5ad2
This program supported the revision of 167 of rosserial.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nucho 3:dff241b66f84 1 #ifndef _ROS_geometry_msgs_PoseStamped_h
nucho 3:dff241b66f84 2 #define _ROS_geometry_msgs_PoseStamped_h
nucho 0:06fc856e99ca 3
nucho 0:06fc856e99ca 4 #include <stdint.h>
nucho 0:06fc856e99ca 5 #include <string.h>
nucho 0:06fc856e99ca 6 #include <stdlib.h>
nucho 3:dff241b66f84 7 #include "ros/msg.h"
nucho 0:06fc856e99ca 8 #include "std_msgs/Header.h"
nucho 0:06fc856e99ca 9 #include "geometry_msgs/Pose.h"
nucho 0:06fc856e99ca 10
nucho 0:06fc856e99ca 11 namespace geometry_msgs
nucho 0:06fc856e99ca 12 {
nucho 0:06fc856e99ca 13
nucho 0:06fc856e99ca 14 class PoseStamped : public ros::Msg
nucho 0:06fc856e99ca 15 {
nucho 0:06fc856e99ca 16 public:
nucho 0:06fc856e99ca 17 std_msgs::Header header;
nucho 0:06fc856e99ca 18 geometry_msgs::Pose pose;
nucho 0:06fc856e99ca 19
nucho 3:dff241b66f84 20 virtual int serialize(unsigned char *outbuffer) const
nucho 0:06fc856e99ca 21 {
nucho 0:06fc856e99ca 22 int offset = 0;
nucho 0:06fc856e99ca 23 offset += this->header.serialize(outbuffer + offset);
nucho 0:06fc856e99ca 24 offset += this->pose.serialize(outbuffer + offset);
nucho 0:06fc856e99ca 25 return offset;
nucho 0:06fc856e99ca 26 }
nucho 0:06fc856e99ca 27
nucho 0:06fc856e99ca 28 virtual int deserialize(unsigned char *inbuffer)
nucho 0:06fc856e99ca 29 {
nucho 0:06fc856e99ca 30 int offset = 0;
nucho 0:06fc856e99ca 31 offset += this->header.deserialize(inbuffer + offset);
nucho 0:06fc856e99ca 32 offset += this->pose.deserialize(inbuffer + offset);
nucho 0:06fc856e99ca 33 return offset;
nucho 0:06fc856e99ca 34 }
nucho 0:06fc856e99ca 35
nucho 3:dff241b66f84 36 virtual const char * getType(){ return "geometry_msgs/PoseStamped"; };
nucho 3:dff241b66f84 37 virtual const char * getMD5(){ return "d3812c3cbc69362b77dc0b19b345f8f5"; };
nucho 0:06fc856e99ca 38
nucho 0:06fc856e99ca 39 };
nucho 0:06fc856e99ca 40
nucho 0:06fc856e99ca 41 }
nucho 0:06fc856e99ca 42 #endif