catchrobo2022 / Mbed 2 deprecated catchrobo2022_mbed

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SnapFootPrint.h Source File

SnapFootPrint.h

00001 #ifndef _ROS_SERVICE_SnapFootPrint_h
00002 #define _ROS_SERVICE_SnapFootPrint_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 #include "geometry_msgs/Pose.h"
00008 #include "geometry_msgs/PoseStamped.h"
00009 
00010 namespace jsk_interactive_marker
00011 {
00012 
00013 static const char SNAPFOOTPRINT[] = "jsk_interactive_marker/SnapFootPrint";
00014 
00015   class SnapFootPrintRequest : public ros::Msg
00016   {
00017     public:
00018       typedef geometry_msgs::PoseStamped _input_pose_type;
00019       _input_pose_type input_pose;
00020       typedef geometry_msgs::Pose _lleg_pose_type;
00021       _lleg_pose_type lleg_pose;
00022       typedef geometry_msgs::Pose _rleg_pose_type;
00023       _rleg_pose_type rleg_pose;
00024 
00025     SnapFootPrintRequest():
00026       input_pose(),
00027       lleg_pose(),
00028       rleg_pose()
00029     {
00030     }
00031 
00032     virtual int serialize(unsigned char *outbuffer) const
00033     {
00034       int offset = 0;
00035       offset += this->input_pose.serialize(outbuffer + offset);
00036       offset += this->lleg_pose.serialize(outbuffer + offset);
00037       offset += this->rleg_pose.serialize(outbuffer + offset);
00038       return offset;
00039     }
00040 
00041     virtual int deserialize(unsigned char *inbuffer)
00042     {
00043       int offset = 0;
00044       offset += this->input_pose.deserialize(inbuffer + offset);
00045       offset += this->lleg_pose.deserialize(inbuffer + offset);
00046       offset += this->rleg_pose.deserialize(inbuffer + offset);
00047      return offset;
00048     }
00049 
00050     virtual const char * getType(){ return SNAPFOOTPRINT; };
00051     virtual const char * getMD5(){ return "07fc9b79352f12bc13742f589662de86"; };
00052 
00053   };
00054 
00055   class SnapFootPrintResponse : public ros::Msg
00056   {
00057     public:
00058       typedef bool _success_type;
00059       _success_type success;
00060       typedef geometry_msgs::PoseStamped _snapped_pose_type;
00061       _snapped_pose_type snapped_pose;
00062 
00063     SnapFootPrintResponse():
00064       success(0),
00065       snapped_pose()
00066     {
00067     }
00068 
00069     virtual int serialize(unsigned char *outbuffer) const
00070     {
00071       int offset = 0;
00072       union {
00073         bool real;
00074         uint8_t base;
00075       } u_success;
00076       u_success.real = this->success;
00077       *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
00078       offset += sizeof(this->success);
00079       offset += this->snapped_pose.serialize(outbuffer + offset);
00080       return offset;
00081     }
00082 
00083     virtual int deserialize(unsigned char *inbuffer)
00084     {
00085       int offset = 0;
00086       union {
00087         bool real;
00088         uint8_t base;
00089       } u_success;
00090       u_success.base = 0;
00091       u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00092       this->success = u_success.real;
00093       offset += sizeof(this->success);
00094       offset += this->snapped_pose.deserialize(inbuffer + offset);
00095      return offset;
00096     }
00097 
00098     virtual const char * getType(){ return SNAPFOOTPRINT; };
00099     virtual const char * getMD5(){ return "a900428084c91b5e6bdb3a3c62cb401d"; };
00100 
00101   };
00102 
00103   class SnapFootPrint {
00104     public:
00105     typedef SnapFootPrintRequest Request;
00106     typedef SnapFootPrintResponse Response;
00107   };
00108 
00109 }
00110 #endif