
complete motor
Dependencies: BufferedSerial motor_sn7544
Revision 11:2228e8931266, committed 2019-07-11
- Comitter:
- Jeonghoon
- Date:
- Thu Jul 11 13:30:27 2019 +0000
- Parent:
- 10:92cbf4eb17bf
- Child:
- 12:da4fb0d541ca
- Commit message:
- 190711; ;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Accel.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,49 @@ +#ifndef _ROS_geometry_msgs_Accel_h +#define _ROS_geometry_msgs_Accel_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Accel : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _linear_type; + _linear_type linear; + typedef geometry_msgs::Vector3 _angular_type; + _angular_type angular; + + Accel(): + linear(), + angular() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->linear.serialize(outbuffer + offset); + offset += this->angular.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->linear.deserialize(inbuffer + offset); + offset += this->angular.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Accel"; }; + const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/AccelStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_AccelStamped_h +#define _ROS_geometry_msgs_AccelStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Accel.h" + +namespace geometry_msgs +{ + + class AccelStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Accel _accel_type; + _accel_type accel; + + AccelStamped(): + header(), + accel() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->accel.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->accel.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelStamped"; }; + const char * getMD5(){ return "d8a98a5d81351b6eb0578c78557e7659"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/AccelWithCovariance.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_AccelWithCovariance_h +#define _ROS_geometry_msgs_AccelWithCovariance_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Accel.h" + +namespace geometry_msgs +{ + + class AccelWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Accel _accel_type; + _accel_type accel; + double covariance[36]; + + AccelWithCovariance(): + accel(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->accel.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->accel.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelWithCovariance"; }; + const char * getMD5(){ return "ad5a718d699c6be72a02b8d6a139f334"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/AccelWithCovarianceStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_AccelWithCovarianceStamped_h +#define _ROS_geometry_msgs_AccelWithCovarianceStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/AccelWithCovariance.h" + +namespace geometry_msgs +{ + + class AccelWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::AccelWithCovariance _accel_type; + _accel_type accel; + + AccelWithCovarianceStamped(): + header(), + accel() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->accel.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->accel.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/AccelWithCovarianceStamped"; }; + const char * getMD5(){ return "96adb295225031ec8d57fb4251b0a886"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Inertia.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,268 @@ +#ifndef _ROS_geometry_msgs_Inertia_h +#define _ROS_geometry_msgs_Inertia_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Inertia : public ros::Msg + { + public: + typedef double _m_type; + _m_type m; + typedef geometry_msgs::Vector3 _com_type; + _com_type com; + typedef double _ixx_type; + _ixx_type ixx; + typedef double _ixy_type; + _ixy_type ixy; + typedef double _ixz_type; + _ixz_type ixz; + typedef double _iyy_type; + _iyy_type iyy; + typedef double _iyz_type; + _iyz_type iyz; + typedef double _izz_type; + _izz_type izz; + + Inertia(): + m(0), + com(), + ixx(0), + ixy(0), + ixz(0), + iyy(0), + iyz(0), + izz(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_m; + u_m.real = this->m; + *(outbuffer + offset + 0) = (u_m.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_m.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_m.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_m.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_m.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_m.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_m.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_m.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->m); + offset += this->com.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.real = this->ixx; + *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.real = this->ixy; + *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.real = this->ixz; + *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.real = this->iyy; + *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.real = this->iyz; + *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.real = this->izz; + *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->izz); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_m; + u_m.base = 0; + u_m.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_m.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->m = u_m.real; + offset += sizeof(this->m); + offset += this->com.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_ixx; + u_ixx.base = 0; + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixx = u_ixx.real; + offset += sizeof(this->ixx); + union { + double real; + uint64_t base; + } u_ixy; + u_ixy.base = 0; + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixy = u_ixy.real; + offset += sizeof(this->ixy); + union { + double real; + uint64_t base; + } u_ixz; + u_ixz.base = 0; + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->ixz = u_ixz.real; + offset += sizeof(this->ixz); + union { + double real; + uint64_t base; + } u_iyy; + u_iyy.base = 0; + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyy = u_iyy.real; + offset += sizeof(this->iyy); + union { + double real; + uint64_t base; + } u_iyz; + u_iyz.base = 0; + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->iyz = u_iyz.real; + offset += sizeof(this->iyz); + union { + double real; + uint64_t base; + } u_izz; + u_izz.base = 0; + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->izz = u_izz.real; + offset += sizeof(this->izz); + return offset; + } + + const char * getType(){ return "geometry_msgs/Inertia"; }; + const char * getMD5(){ return "1d26e4bb6c83ff141c5cf0d883c2b0fe"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/InertiaStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_InertiaStamped_h +#define _ROS_geometry_msgs_InertiaStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Inertia.h" + +namespace geometry_msgs +{ + + class InertiaStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Inertia _inertia_type; + _inertia_type inertia; + + InertiaStamped(): + header(), + inertia() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->inertia.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->inertia.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/InertiaStamped"; }; + const char * getMD5(){ return "ddee48caeab5a966c5e8d166654a9ac7"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Point.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Point_h +#define _ROS_geometry_msgs_Point_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Point : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + + Point(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Point"; }; + const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Point32.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,110 @@ +#ifndef _ROS_geometry_msgs_Point32_h +#define _ROS_geometry_msgs_Point32_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Point32 : public ros::Msg + { + public: + typedef float _x_type; + _x_type x; + typedef float _y_type; + _y_type y; + typedef float _z_type; + _z_type z; + + Point32(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + float real; + uint32_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->x = u_x.real; + offset += sizeof(this->x); + union { + float real; + uint32_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->y = u_y.real; + offset += sizeof(this->y); + union { + float real; + uint32_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Point32"; }; + const char * getMD5(){ return "cc153912f1453b708d221682bc23d9ac"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/PointStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PointStamped_h +#define _ROS_geometry_msgs_PointStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Point.h" + +namespace geometry_msgs +{ + + class PointStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Point _point_type; + _point_type point; + + PointStamped(): + header(), + point() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->point.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->point.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PointStamped"; }; + const char * getMD5(){ return "c63aecb41bfdfd6b7e1fac37c7cbe7bf"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Polygon.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,64 @@ +#ifndef _ROS_geometry_msgs_Polygon_h +#define _ROS_geometry_msgs_Polygon_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Point32.h" + +namespace geometry_msgs +{ + + class Polygon : public ros::Msg + { + public: + uint32_t points_length; + typedef geometry_msgs::Point32 _points_type; + _points_type st_points; + _points_type * points; + + Polygon(): + points_length(0), points(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->points_length); + for( uint32_t i = 0; i < points_length; i++){ + offset += this->points[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset))); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->points_length); + if(points_lengthT > points_length) + this->points = (geometry_msgs::Point32*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point32)); + points_length = points_lengthT; + for( uint32_t i = 0; i < points_length; i++){ + offset += this->st_points.deserialize(inbuffer + offset); + memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point32)); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/Polygon"; }; + const char * getMD5(){ return "cd60a26494a087f577976f0329fa120e"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/PolygonStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PolygonStamped_h +#define _ROS_geometry_msgs_PolygonStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Polygon.h" + +namespace geometry_msgs +{ + + class PolygonStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Polygon _polygon_type; + _polygon_type polygon; + + PolygonStamped(): + header(), + polygon() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->polygon.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->polygon.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PolygonStamped"; }; + const char * getMD5(){ return "c6be8f7dc3bee7fe9e8d296070f53340"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Pose.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Pose_h +#define _ROS_geometry_msgs_Pose_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Point.h" +#include "geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class Pose : public ros::Msg + { + public: + typedef geometry_msgs::Point _position_type; + _position_type position; + typedef geometry_msgs::Quaternion _orientation_type; + _orientation_type orientation; + + Pose(): + position(), + orientation() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->position.serialize(outbuffer + offset); + offset += this->orientation.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->position.deserialize(inbuffer + offset); + offset += this->orientation.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Pose"; }; + const char * getMD5(){ return "e45d45a5a1ce597b249e23fb30fc871f"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Pose2D.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Pose2D_h +#define _ROS_geometry_msgs_Pose2D_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Pose2D : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _theta_type; + _theta_type theta; + + Pose2D(): + x(0), + y(0), + theta(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_theta; + u_theta.real = this->theta; + *(outbuffer + offset + 0) = (u_theta.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_theta.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_theta.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_theta.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_theta.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_theta.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_theta.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_theta.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->theta); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_theta; + u_theta.base = 0; + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_theta.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->theta = u_theta.real; + offset += sizeof(this->theta); + return offset; + } + + const char * getType(){ return "geometry_msgs/Pose2D"; }; + const char * getMD5(){ return "938fa65709584ad8e77d238529be13b8"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/PoseArray.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,70 @@ +#ifndef _ROS_geometry_msgs_PoseArray_h +#define _ROS_geometry_msgs_PoseArray_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseArray : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + uint32_t poses_length; + typedef geometry_msgs::Pose _poses_type; + _poses_type st_poses; + _poses_type * poses; + + PoseArray(): + header(), + poses_length(0), poses(NULL) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->poses_length >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (this->poses_length >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (this->poses_length >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (this->poses_length >> (8 * 3)) & 0xFF; + offset += sizeof(this->poses_length); + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->poses[i].serialize(outbuffer + offset); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t poses_lengthT = ((uint32_t) (*(inbuffer + offset))); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); + poses_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); + offset += sizeof(this->poses_length); + if(poses_lengthT > poses_length) + this->poses = (geometry_msgs::Pose*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::Pose)); + poses_length = poses_lengthT; + for( uint32_t i = 0; i < poses_length; i++){ + offset += this->st_poses.deserialize(inbuffer + offset); + memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::Pose)); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseArray"; }; + const char * getMD5(){ return "916c28c5764443f268b296bb671b9d97"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/PoseStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PoseStamped_h +#define _ROS_geometry_msgs_PoseStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + + PoseStamped(): + header(), + pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseStamped"; }; + const char * getMD5(){ return "d3812c3cbc69362b77dc0b19b345f8f5"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/PoseWithCovariance.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_PoseWithCovariance_h +#define _ROS_geometry_msgs_PoseWithCovariance_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Pose.h" + +namespace geometry_msgs +{ + + class PoseWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Pose _pose_type; + _pose_type pose; + double covariance[36]; + + PoseWithCovariance(): + pose(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->pose.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->pose.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseWithCovariance"; }; + const char * getMD5(){ return "c23e848cf1b7533a8d7c259073a97e6f"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/PoseWithCovarianceStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_PoseWithCovarianceStamped_h +#define _ROS_geometry_msgs_PoseWithCovarianceStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/PoseWithCovariance.h" + +namespace geometry_msgs +{ + + class PoseWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::PoseWithCovariance _pose_type; + _pose_type pose; + + PoseWithCovarianceStamped(): + header(), + pose() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->pose.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->pose.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/PoseWithCovarianceStamped"; }; + const char * getMD5(){ return "953b798c0f514ff060a53a3498ce6246"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Quaternion.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,166 @@ +#ifndef _ROS_geometry_msgs_Quaternion_h +#define _ROS_geometry_msgs_Quaternion_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Quaternion : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + typedef double _w_type; + _w_type w; + + Quaternion(): + x(0), + y(0), + z(0), + w(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_w; + u_w.real = this->w; + *(outbuffer + offset + 0) = (u_w.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_w.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_w.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_w.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_w.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_w.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_w.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_w.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->w); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + union { + double real; + uint64_t base; + } u_w; + u_w.base = 0; + u_w.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_w.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->w = u_w.real; + offset += sizeof(this->w); + return offset; + } + + const char * getType(){ return "geometry_msgs/Quaternion"; }; + const char * getMD5(){ return "a779879fadf0160734f906b8c19c7004"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/QuaternionStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_QuaternionStamped_h +#define _ROS_geometry_msgs_QuaternionStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class QuaternionStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Quaternion _quaternion_type; + _quaternion_type quaternion; + + QuaternionStamped(): + header(), + quaternion() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->quaternion.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->quaternion.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/QuaternionStamped"; }; + const char * getMD5(){ return "e57f1e547e0e1fd13504588ffc8334e2"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Transform.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Transform_h +#define _ROS_geometry_msgs_Transform_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" +#include "geometry_msgs/Quaternion.h" + +namespace geometry_msgs +{ + + class Transform : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _translation_type; + _translation_type translation; + typedef geometry_msgs::Quaternion _rotation_type; + _rotation_type rotation; + + Transform(): + translation(), + rotation() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->translation.serialize(outbuffer + offset); + offset += this->rotation.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->translation.deserialize(inbuffer + offset); + offset += this->rotation.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Transform"; }; + const char * getMD5(){ return "ac9eff44abf714214112b05d54a3cf9b"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/TransformStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,67 @@ +#ifndef _ROS_geometry_msgs_TransformStamped_h +#define _ROS_geometry_msgs_TransformStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Transform.h" + +namespace geometry_msgs +{ + + class TransformStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef const char* _child_frame_id_type; + _child_frame_id_type child_frame_id; + typedef geometry_msgs::Transform _transform_type; + _transform_type transform; + + TransformStamped(): + header(), + child_frame_id(""), + transform() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + uint32_t length_child_frame_id = strlen(this->child_frame_id); + varToArr(outbuffer + offset, length_child_frame_id); + offset += 4; + memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id); + offset += length_child_frame_id; + offset += this->transform.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + uint32_t length_child_frame_id; + arrToVar(length_child_frame_id, (inbuffer + offset)); + offset += 4; + for(unsigned int k= offset; k< offset+length_child_frame_id; ++k){ + inbuffer[k-1]=inbuffer[k]; + } + inbuffer[offset+length_child_frame_id-1]=0; + this->child_frame_id = (char *)(inbuffer + offset-1); + offset += length_child_frame_id; + offset += this->transform.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TransformStamped"; }; + const char * getMD5(){ return "b5764a33bfeb3588febc2682852579b0"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Twist.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,49 @@ +#ifndef _ROS_geometry_msgs_Twist_h +#define _ROS_geometry_msgs_Twist_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Twist : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _linear_type; + _linear_type linear; + typedef geometry_msgs::Vector3 _angular_type; + _angular_type angular; + + Twist(): + linear(), + angular() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->linear.serialize(outbuffer + offset); + offset += this->angular.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->linear.deserialize(inbuffer + offset); + offset += this->angular.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Twist"; }; + const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/TwistStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_TwistStamped_h +#define _ROS_geometry_msgs_TwistStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Twist.h" + +namespace geometry_msgs +{ + + class TwistStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + + TwistStamped(): + header(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistStamped"; }; + const char * getMD5(){ return "98d34b0043a2093cf9d9345ab6eef12e"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/TwistWithCovariance.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,79 @@ +#ifndef _ROS_geometry_msgs_TwistWithCovariance_h +#define _ROS_geometry_msgs_TwistWithCovariance_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Twist.h" + +namespace geometry_msgs +{ + + class TwistWithCovariance : public ros::Msg + { + public: + typedef geometry_msgs::Twist _twist_type; + _twist_type twist; + double covariance[36]; + + TwistWithCovariance(): + twist(), + covariance() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->twist.serialize(outbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.real = this->covariance[i]; + *(outbuffer + offset + 0) = (u_covariancei.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_covariancei.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_covariancei.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_covariancei.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_covariancei.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_covariancei.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_covariancei.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_covariancei.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->twist.deserialize(inbuffer + offset); + for( uint32_t i = 0; i < 36; i++){ + union { + double real; + uint64_t base; + } u_covariancei; + u_covariancei.base = 0; + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_covariancei.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->covariance[i] = u_covariancei.real; + offset += sizeof(this->covariance[i]); + } + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistWithCovariance"; }; + const char * getMD5(){ return "1fe8a28e6890a4cc3ae4c3ca5c7d82e6"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/TwistWithCovarianceStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_TwistWithCovarianceStamped_h +#define _ROS_geometry_msgs_TwistWithCovarianceStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/TwistWithCovariance.h" + +namespace geometry_msgs +{ + + class TwistWithCovarianceStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::TwistWithCovariance _twist_type; + _twist_type twist; + + TwistWithCovarianceStamped(): + header(), + twist() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->twist.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->twist.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/TwistWithCovarianceStamped"; }; + const char * getMD5(){ return "8927a1a12fb2607ceea095b2dc440a96"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Vector3.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,134 @@ +#ifndef _ROS_geometry_msgs_Vector3_h +#define _ROS_geometry_msgs_Vector3_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" + +namespace geometry_msgs +{ + + class Vector3 : public ros::Msg + { + public: + typedef double _x_type; + _x_type x; + typedef double _y_type; + _y_type y; + typedef double _z_type; + _z_type z; + + Vector3(): + x(0), + y(0), + z(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.real = this->x; + *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.real = this->y; + *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.real = this->z; + *(outbuffer + offset + 0) = (u_z.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_z.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_z.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_z.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_z.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_z.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_z.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_z.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->z); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + double real; + uint64_t base; + } u_x; + u_x.base = 0; + u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->x = u_x.real; + offset += sizeof(this->x); + union { + double real; + uint64_t base; + } u_y; + u_y.base = 0; + u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->y = u_y.real; + offset += sizeof(this->y); + union { + double real; + uint64_t base; + } u_z; + u_z.base = 0; + u_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->z = u_z.real; + offset += sizeof(this->z); + return offset; + } + + const char * getType(){ return "geometry_msgs/Vector3"; }; + const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Vector3Stamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_Vector3Stamped_h +#define _ROS_geometry_msgs_Vector3Stamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Vector3Stamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Vector3 _vector_type; + _vector_type vector; + + Vector3Stamped(): + header(), + vector() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->vector.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->vector.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Vector3Stamped"; }; + const char * getMD5(){ return "7b324c7325e683bf02a9b14b01090ec7"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/Wrench.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,49 @@ +#ifndef _ROS_geometry_msgs_Wrench_h +#define _ROS_geometry_msgs_Wrench_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "geometry_msgs/Vector3.h" + +namespace geometry_msgs +{ + + class Wrench : public ros::Msg + { + public: + typedef geometry_msgs::Vector3 _force_type; + _force_type force; + typedef geometry_msgs::Vector3 _torque_type; + _torque_type torque; + + Wrench(): + force(), + torque() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->force.serialize(outbuffer + offset); + offset += this->torque.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->force.deserialize(inbuffer + offset); + offset += this->torque.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/Wrench"; }; + const char * getMD5(){ return "4f539cf138b23283b520fd271b567936"; }; + + }; + +} +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geometry_msgs/WrenchStamped.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,50 @@ +#ifndef _ROS_geometry_msgs_WrenchStamped_h +#define _ROS_geometry_msgs_WrenchStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "geometry_msgs/Wrench.h" + +namespace geometry_msgs +{ + + class WrenchStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef geometry_msgs::Wrench _wrench_type; + _wrench_type wrench; + + WrenchStamped(): + header(), + wrench() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + offset += this->wrench.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + offset += this->wrench.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "geometry_msgs/WrenchStamped"; }; + const char * getMD5(){ return "d78d3cb249ce23087ade7e7d0c40cfa7"; }; + + }; + +} +#endif \ No newline at end of file
--- a/main.cpp Wed Jul 10 04:31:08 2019 +0000 +++ b/main.cpp Thu Jul 11 13:30:27 2019 +0000 @@ -4,20 +4,26 @@ #include <std_msgs/Float64.h> #include <std_msgs/Int32.h> #include <std_msgs/String.h> +#include <geometry_msgs/Point.h> std_msgs::Float64 cum_dist; std_msgs::Float64 rela_dist; std_msgs::Float64 flaw_loca; +std_msgs::Float64 ultra_reflection; +std_msgs::Float64 curr_vel; std_msgs::Int32 curr_rpm; -//std_msgs::String flaw_state; + + +geometry_msgs::Point flaw_info; -ros::NodeHandle nh ; -ros::Publisher cum_dist_pub("cum_dist", &cum_dist); +ros::NodeHandle nh; + ros::Publisher rela_dist_pub("rela_dist", &rela_dist); ros::Publisher rpm_pub("rpm", &curr_rpm); -ros::Publisher flaw_loca_pub("flaw_loca", &flaw_loca); -//ros::Publisher flaw_state_pub("flaw_state", &flaw_state); +ros::Publisher ultra_reflection_pub("ultra_reflection", &ultra_reflection); +ros::Publisher flaw_info_pub("flaw_info", &flaw_info); +ros::Publisher curr_vel_pub("curr_vel", &curr_vel); MotorCtl motor1(D3,D12,D4,D5); InterruptIn tachoINT1(D4); @@ -65,11 +71,12 @@ int main() { nh.initNode(); - nh.advertise(cum_dist_pub); + nh.advertise(rela_dist_pub); nh.advertise(rpm_pub); - nh.advertise(flaw_loca_pub); -// nh.advertise(flaw_state_pub); + nh.advertise(ultra_reflection_pub); + nh.advertise(flaw_info_pub); + nh.advertise(curr_vel_pub); tachoINT1.fall(&update_current); tachoINT1.rise(&update_current); @@ -77,8 +84,10 @@ tachoINT2.rise(&update_current); // pc.attach(callback(rx_cb)); int rpm; + float velocity; float reladistance; //m단위 float cumdistance; + float ultra_reflect = 0; float flaw_location = 0; // char flaw_curr_state[10] = "stable"; @@ -88,26 +97,40 @@ // pc.printf("Enter the value for speed [-78,78]\r\n"); while(flag!=1) { + rpm = motor1.getRPM(); cumdistance = motor1.CalculateCumDis(); // 누적거리 reladistance = motor1.CalculateRelaDis(); // 상대거리 - - cum_dist.data = cumdistance; - cum_dist_pub.publish(&cum_dist); + velocity = motor1.CalculateVelocity(); + +// cum_dist.data = cumdistance; +// cum_dist_pub.publish(&cum_dist); rela_dist.data = reladistance; rela_dist_pub.publish(&rela_dist); curr_rpm.data = rpm; - rpm_pub.publish(&curr_rpm); + rpm_pub.publish(&curr_rpm); + + curr_vel.data = velocity; + curr_vel_pub.publish(&curr_vel); - flaw_loca.data = flaw_location; - flaw_loca_pub.publish(&flaw_loca); + ultra_reflection.data = ultra_reflect; + ultra_reflection_pub.publish(&ultra_reflection); + + flaw_info.x = cumdistance; + flaw_info.y = flaw_location; + flaw_info_pub.publish(&flaw_info); - flaw_location+= 0.05; + flaw_location += 0.05; if(flaw_location > 1){ flaw_location = 0; } + + ultra_reflect += 0.1; + if(ultra_reflect > 0.5){ + ultra_reflect = 0; + } // flaw_state.data = flaw_curr_state; // flaw_state_pub.publish(&flaw_state);
--- a/motor.lib Wed Jul 10 04:31:08 2019 +0000 +++ b/motor.lib Thu Jul 11 13:30:27 2019 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/kangmingyo/code/motor/#42c478f9a1fe +https://os.mbed.com/users/Jeonghoon/code/motor/#4fa7fadc583d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/builtin_message_traits.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2009, Willow Garage, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the names of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ROSLIB_BUILTIN_MESSAGE_TRAITS_H +#define ROSLIB_BUILTIN_MESSAGE_TRAITS_H + +#include "message_traits.h" +#include "ros/time.h" + +namespace ros +{ +namespace message_traits +{ + +#define ROSLIB_CREATE_SIMPLE_TRAITS(Type) \ + template<> struct IsSimple<Type> : public TrueType {}; \ + template<> struct IsFixedSize<Type> : public TrueType {}; + +ROSLIB_CREATE_SIMPLE_TRAITS(uint8_t) +ROSLIB_CREATE_SIMPLE_TRAITS(int8_t) +ROSLIB_CREATE_SIMPLE_TRAITS(uint16_t) +ROSLIB_CREATE_SIMPLE_TRAITS(int16_t) +ROSLIB_CREATE_SIMPLE_TRAITS(uint32_t) +ROSLIB_CREATE_SIMPLE_TRAITS(int32_t) +ROSLIB_CREATE_SIMPLE_TRAITS(uint64_t) +ROSLIB_CREATE_SIMPLE_TRAITS(int64_t) +ROSLIB_CREATE_SIMPLE_TRAITS(float) +ROSLIB_CREATE_SIMPLE_TRAITS(double) +ROSLIB_CREATE_SIMPLE_TRAITS(Time) +ROSLIB_CREATE_SIMPLE_TRAITS(Duration) + +// because std::vector<bool> is not a true vector, bool is not a simple type +template<> struct IsFixedSize<bool> : public TrueType {}; + +} // namespace message_traits +} // namespace ros + +#endif // ROSLIB_BUILTIN_MESSAGE_TRAITS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/datatypes.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2008, Morgan Quigley and Willow Garage, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the names of Stanford University or Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef CPP_CORE_TYPES_H +#define CPP_CORE_TYPES_H + +#include <string> +#include <vector> +#include <map> +#include <set> +#include <list> + +#include <boost/shared_ptr.hpp> + + +namespace ros { + +typedef std::vector<std::pair<std::string, std::string> > VP_string; +typedef std::vector<std::string> V_string; +typedef std::set<std::string> S_string; +typedef std::map<std::string, std::string> M_string; +typedef std::pair<std::string, std::string> StringPair; + +typedef boost::shared_ptr<M_string> M_stringPtr; + +} + +#endif // CPP_CORE_TYPES_H \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/exception.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2009, Willow Garage, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the names of Stanford University or Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ROSLIB_EXCEPTION_H +#define ROSLIB_EXCEPTION_H + +#include <stdexcept> + +namespace ros +{ + +/** + * \brief Base class for all exceptions thrown by ROS + */ +class Exception : public std::runtime_error +{ +public: + Exception(const std::string& what) + : std::runtime_error(what) + {} +}; + +} // namespace ros + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/macros.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2010, Willow Garage, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the names of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ROSLIB_MACROS_H_INCLUDED +#define ROSLIB_MACROS_H_INCLUDED + +#if defined(__GNUC__) +#define ROS_DEPRECATED __attribute__((deprecated)) +#define ROS_FORCE_INLINE __attribute__((always_inline)) +#elif defined(_MSC_VER) +#define ROS_DEPRECATED +#define ROS_FORCE_INLINE __forceinline +#else +#define ROS_DEPRECATED +#define ROS_FORCE_INLINE inline +#endif + +/* + Windows import/export and gnu http://gcc.gnu.org/wiki/Visibility + macros. + */ +#if defined(_MSC_VER) + #define ROS_HELPER_IMPORT __declspec(dllimport) + #define ROS_HELPER_EXPORT __declspec(dllexport) + #define ROS_HELPER_LOCAL +#elif __GNUC__ >= 4 + #define ROS_HELPER_IMPORT __attribute__ ((visibility("default"))) + #define ROS_HELPER_EXPORT __attribute__ ((visibility("default"))) + #define ROS_HELPER_LOCAL __attribute__ ((visibility("hidden"))) +#else + #define ROS_HELPER_IMPORT + #define ROS_HELPER_EXPORT + #define ROS_HELPER_LOCAL +#endif + +// Ignore warnings about import/exports when deriving from std classes. +#ifdef _MSC_VER + #pragma warning(disable: 4251) + #pragma warning(disable: 4275) +#endif + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/message_forward.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2009, Willow Garage, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the names of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ROSLIB_MESSAGE_FORWARD_H +#define ROSLIB_MESSAGE_FORWARD_H + +// Make sure that either __GLIBCXX__ or _LIBCPP_VERSION is defined. +#include <cstddef> + +// C++ standard section 17.4.3.1/1 states that forward declarations of STL types +// that aren't specializations involving user defined types results in undefined +// behavior. Apparently only libc++ has a problem with this and won't compile it. +#ifndef _LIBCPP_VERSION +namespace std +{ +template<typename T> class allocator; +} +#else +#include <memory> +#endif + +namespace boost +{ +template<typename T> class shared_ptr; +} + +/** + * \brief Forward-declare a message, including Ptr and ConstPtr types, with an allocator + * + * \param msg The "base" message type, i.e., the name of the .msg file + * \param new_name The name you'd like the message to have + * \param alloc The allocator to use, e.g. std::allocator + */ +#define ROS_DECLARE_MESSAGE_WITH_ALLOCATOR(msg, new_name, alloc) \ + template<class Allocator> struct msg##_; \ + typedef msg##_<alloc<void> > new_name; \ + typedef boost::shared_ptr<new_name> new_name##Ptr; \ + typedef boost::shared_ptr<new_name const> new_name##ConstPtr; + +/** + * \brief Forward-declare a message, including Ptr and ConstPtr types, using std::allocator + * \param msg The "base" message type, i.e. the name of the .msg file + */ +#define ROS_DECLARE_MESSAGE(msg) ROS_DECLARE_MESSAGE_WITH_ALLOCATOR(msg, msg, std::allocator) + +#endif // ROSLIB_MESSAGE_FORWARD_H \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/message_operations.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2010, Willow Garage, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the names of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ROSLIB_MESSAGE_OPERATIONS_H +#define ROSLIB_MESSAGE_OPERATIONS_H + +#include <ostream> + +namespace ros +{ +namespace message_operations +{ + +template<typename M> +struct Printer +{ + template<typename Stream> + static void stream(Stream& s, const std::string& indent, const M& value) + { + (void)indent; + s << value << "\n"; + } +}; + +// Explicitly specialize for uint8_t/int8_t because otherwise it thinks it's a char, and treats +// the value as a character code +template<> +struct Printer<int8_t> +{ + template<typename Stream> + static void stream(Stream& s, const std::string& indent, int8_t value) + { + (void)indent; + s << static_cast<int32_t>(value) << "\n"; + } +}; + +template<> +struct Printer<uint8_t> +{ + template<typename Stream> + static void stream(Stream& s, const std::string& indent, uint8_t value) + { + (void)indent; + s << static_cast<uint32_t>(value) << "\n"; + } +}; + +} // namespace message_operations +} // namespace ros + +#endif // ROSLIB_MESSAGE_OPERATIONS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/message_traits.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,360 @@ +/* + * Copyright (C) 2009, Willow Garage, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the names of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ROSLIB_MESSAGE_TRAITS_H +#define ROSLIB_MESSAGE_TRAITS_H + +#include "message_forward.h" + +#include <ros/time.h> + +#include <string> +#include <boost/utility/enable_if.hpp> +#include <boost/type_traits/remove_const.hpp> +#include <boost/type_traits/remove_reference.hpp> + +namespace std_msgs +{ + ROS_DECLARE_MESSAGE(Header) +} + +#define ROS_IMPLEMENT_SIMPLE_TOPIC_TRAITS(msg, md5sum, datatype, definition) \ + namespace ros \ + { \ + namespace message_traits \ + { \ + template<> struct MD5Sum<msg> \ + { \ + static const char* value() { return md5sum; } \ + static const char* value(const msg&) { return value(); } \ + }; \ + template<> struct DataType<msg> \ + { \ + static const char* value() { return datatype; } \ + static const char* value(const msg&) { return value(); } \ + }; \ + template<> struct Definition<msg> \ + { \ + static const char* value() { return definition; } \ + static const char* value(const msg&) { return value(); } \ + }; \ + } \ + } + + +namespace ros +{ +namespace message_traits +{ + +/** + * \brief Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this type + * are \b true values. + */ +struct TrueType +{ + static const bool value = true; + typedef TrueType type; +}; + +/** + * \brief Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this type + * are \b false values. + */ +struct FalseType +{ + static const bool value = false; + typedef FalseType type; +}; + +/** + * \brief A simple datatype is one that can be memcpy'd directly in array form, i.e. it's a POD, fixed-size type and + * sizeof(M) == sum(serializationLength(M:a...)) + */ +template<typename M> struct IsSimple : public FalseType {}; +/** + * \brief A fixed-size datatype is one whose size is constant, i.e. it has no variable-length arrays or strings + */ +template<typename M> struct IsFixedSize : public FalseType {}; +/** + * \brief HasHeader informs whether or not there is a header that gets serialized as the first thing in the message + */ +template<typename M> struct HasHeader : public FalseType {}; + +/** + * \brief Am I message or not + */ +template<typename M> struct IsMessage : public FalseType {}; + +/** + * \brief Specialize to provide the md5sum for a message + */ +template<typename M> +struct MD5Sum +{ + static const char* value() + { + return M::__s_getMD5Sum().c_str(); + } + + static const char* value(const M& m) + { + return m.__getMD5Sum().c_str(); + } +}; + +/** + * \brief Specialize to provide the datatype for a message + */ +template<typename M> +struct DataType +{ + static const char* value() + { + return M::__s_getDataType().c_str(); + } + + static const char* value(const M& m) + { + return m.__getDataType().c_str(); + } +}; + +/** + * \brief Specialize to provide the definition for a message + */ +template<typename M> +struct Definition +{ + static const char* value() + { + return M::__s_getMessageDefinition().c_str(); + } + + static const char* value(const M& m) + { + return m.__getMessageDefinition().c_str(); + } +}; + +/** + * \brief Header trait. In the default implementation pointer() + * returns &m.header if HasHeader<M>::value is true, otherwise returns NULL + */ +template<typename M, typename Enable = void> +struct Header +{ + static std_msgs::Header* pointer(M& m) { (void)m; return 0; } + static std_msgs::Header const* pointer(const M& m) { (void)m; return 0; } +}; + +template<typename M> +struct Header<M, typename boost::enable_if<HasHeader<M> >::type > +{ + static std_msgs::Header* pointer(M& m) { return &m.header; } + static std_msgs::Header const* pointer(const M& m) { return &m.header; } +}; + +/** + * \brief FrameId trait. In the default implementation pointer() + * returns &m.header.frame_id if HasHeader<M>::value is true, otherwise returns NULL. value() + * does not exist, and causes a compile error + */ +template<typename M, typename Enable = void> +struct FrameId +{ + static std::string* pointer(M& m) { (void)m; return 0; } + static std::string const* pointer(const M& m) { (void)m; return 0; } +}; + +template<typename M> +struct FrameId<M, typename boost::enable_if<HasHeader<M> >::type > +{ + static std::string* pointer(M& m) { return &m.header.frame_id; } + static std::string const* pointer(const M& m) { return &m.header.frame_id; } + static std::string value(const M& m) { return m.header.frame_id; } +}; + +/** + * \brief TimeStamp trait. In the default implementation pointer() + * returns &m.header.stamp if HasHeader<M>::value is true, otherwise returns NULL. value() + * does not exist, and causes a compile error + */ +template<typename M, typename Enable = void> +struct TimeStamp +{ + static ros::Time* pointer(M& m) { (void)m; return 0; } + static ros::Time const* pointer(const M& m) { (void)m; return 0; } +}; + +template<typename M> +struct TimeStamp<M, typename boost::enable_if<HasHeader<M> >::type > +{ + static ros::Time* pointer(typename boost::remove_const<M>::type &m) { return &m.header.stamp; } + static ros::Time const* pointer(const M& m) { return &m.header.stamp; } + static ros::Time value(const M& m) { return m.header.stamp; } +}; + +/** + * \brief returns MD5Sum<M>::value(); + */ +template<typename M> +inline const char* md5sum() +{ + return MD5Sum<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value(); +} + +/** + * \brief returns DataType<M>::value(); + */ +template<typename M> +inline const char* datatype() +{ + return DataType<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value(); +} + +/** + * \brief returns Definition<M>::value(); + */ +template<typename M> +inline const char* definition() +{ + return Definition<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value(); +} + +/** + * \brief returns MD5Sum<M>::value(m); + */ +template<typename M> +inline const char* md5sum(const M& m) +{ + return MD5Sum<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value(m); +} + +/** + * \brief returns DataType<M>::value(m); + */ +template<typename M> +inline const char* datatype(const M& m) +{ + return DataType<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value(m); +} + +/** + * \brief returns Definition<M>::value(m); + */ +template<typename M> +inline const char* definition(const M& m) +{ + return Definition<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value(m); +} + +/** + * \brief returns Header<M>::pointer(m); + */ +template<typename M> +inline std_msgs::Header* header(M& m) +{ + return Header<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::pointer(m); +} + +/** + * \brief returns Header<M>::pointer(m); + */ +template<typename M> +inline std_msgs::Header const* header(const M& m) +{ + return Header<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::pointer(m); +} + +/** + * \brief returns FrameId<M>::pointer(m); + */ +template<typename M> +inline std::string* frameId(M& m) +{ + return FrameId<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::pointer(m); +} + +/** + * \brief returns FrameId<M>::pointer(m); + */ +template<typename M> +inline std::string const* frameId(const M& m) +{ + return FrameId<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::pointer(m); +} + +/** + * \brief returns TimeStamp<M>::pointer(m); + */ +template<typename M> +inline ros::Time* timeStamp(M& m) +{ + return TimeStamp<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::pointer(m); +} + +/** + * \brief returns TimeStamp<M>::pointer(m); + */ +template<typename M> +inline ros::Time const* timeStamp(const M& m) +{ + return TimeStamp<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::pointer(m); +} + +/** + * \brief returns IsSimple<M>::value; + */ +template<typename M> +inline bool isSimple() +{ + return IsSimple<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value; +} + +/** + * \brief returns IsFixedSize<M>::value; + */ +template<typename M> +inline bool isFixedSize() +{ + return IsFixedSize<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value; +} + +/** + * \brief returns HasHeader<M>::value; + */ +template<typename M> +inline bool hasHeader() +{ + return HasHeader<typename boost::remove_reference<typename boost::remove_const<M>::type>::type>::value; +} + +} // namespace message_traits +} // namespace ros + +#endif // ROSLIB_MESSAGE_TRAITS_H \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/roscpp_serialization_macros.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,55 @@ +/********************************************************************* +* +* Software License Agreement (BSD License) +* +* Copyright (c) 2009, Willow Garage, Inc. +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of the Willow Garage nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +* POSSIBILITY OF SUCH DAMAGE. +* +*********************************************************************/ +/* + * Cross platform macros. + * + */ +#ifndef ROSCPP_SERIALIZATION_MACROS_HPP_ +#define ROSCPP_SERIALIZATION_MACROS_HPP_ + +#include <ros/macros.h> + +#ifdef ROS_BUILD_SHARED_LIBS // ros is being built around shared libraries + #ifdef roscpp_serialization_EXPORTS // we are building a shared lib/dll + #define ROSCPP_SERIALIZATION_DECL ROS_HELPER_EXPORT + #else // we are using shared lib/dll + #define ROSCPP_SERIALIZATION_DECL ROS_HELPER_IMPORT + #endif +#else // ros is being built around static libraries + #define ROSCPP_SERIALIZATION_DECL +#endif + +#endif /* ROSCPP_SERIALIZATION_MACROS_HPP_ */ \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/serialization.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,887 @@ +/* + * Copyright (C) 2009, Willow Garage, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the names of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ROSCPP_SERIALIZATION_H +#define ROSCPP_SERIALIZATION_H + +#include "roscpp_serialization_macros.h" + +#include <ros/types.h> +#include <ros/time.h> + +#include "serialized_message.h" +#include "ros/message_traits.h" +#include "ros/builtin_message_traits.h" +#include "ros/exception.h" +#include "ros/datatypes.h" + +#include <vector> +#include <map> + +#include <boost/array.hpp> +#include <boost/call_traits.hpp> +#include <boost/utility/enable_if.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/not.hpp> + +#include <cstring> + +#define ROS_NEW_SERIALIZATION_API 1 + +/** + * \brief Declare your serializer to use an allInOne member instead of requiring 3 different serialization + * functions. + * + * The allinone method has the form: +\verbatim +template<typename Stream, typename T> +inline static void allInOne(Stream& stream, T t) +{ + stream.next(t.a); + stream.next(t.b); + ... +} +\endverbatim + * + * The only guarantee given is that Stream::next(T) is defined. + */ +#define ROS_DECLARE_ALLINONE_SERIALIZER \ + template<typename Stream, typename T> \ + inline static void write(Stream& stream, const T& t) \ + { \ + allInOne<Stream, const T&>(stream, t); \ + } \ + \ + template<typename Stream, typename T> \ + inline static void read(Stream& stream, T& t) \ + { \ + allInOne<Stream, T&>(stream, t); \ + } \ + \ + template<typename T> \ + inline static uint32_t serializedLength(const T& t) \ + { \ + LStream stream; \ + allInOne<LStream, const T&>(stream, t); \ + return stream.getLength(); \ + } + +namespace ros +{ +namespace serialization +{ +namespace mt = message_traits; +namespace mpl = boost::mpl; + +class ROSCPP_SERIALIZATION_DECL StreamOverrunException : public ros::Exception +{ +public: + StreamOverrunException(const std::string& what) + : Exception(what) + {} +}; + +ROSCPP_SERIALIZATION_DECL void throwStreamOverrun(); + +/** + * \brief Templated serialization class. Default implementation provides backwards compatibility with + * old message types. + * + * Specializing the Serializer class is the only thing you need to do to get the ROS serialization system + * to work with a type. + */ +template<typename T> +struct Serializer +{ + /** + * \brief Write an object to the stream. Normally the stream passed in here will be a ros::serialization::OStream + */ + template<typename Stream> + inline static void write(Stream& stream, typename boost::call_traits<T>::param_type t) + { + t.serialize(stream.getData(), 0); + } + + /** + * \brief Read an object from the stream. Normally the stream passed in here will be a ros::serialization::IStream + */ + template<typename Stream> + inline static void read(Stream& stream, typename boost::call_traits<T>::reference t) + { + t.deserialize(stream.getData()); + } + + /** + * \brief Determine the serialized length of an object. + */ + inline static uint32_t serializedLength(typename boost::call_traits<T>::param_type t) + { + return t.serializationLength(); + } +}; + +/** + * \brief Serialize an object. Stream here should normally be a ros::serialization::OStream + */ +template<typename T, typename Stream> +inline void serialize(Stream& stream, const T& t) +{ + Serializer<T>::write(stream, t); +} + +/** + * \brief Deserialize an object. Stream here should normally be a ros::serialization::IStream + */ +template<typename T, typename Stream> +inline void deserialize(Stream& stream, T& t) +{ + Serializer<T>::read(stream, t); +} + +/** + * \brief Determine the serialized length of an object + */ +template<typename T> +inline uint32_t serializationLength(const T& t) +{ + return Serializer<T>::serializedLength(t); +} + +#define ROS_CREATE_SIMPLE_SERIALIZER(Type) \ + template<> struct Serializer<Type> \ + { \ + template<typename Stream> inline static void write(Stream& stream, const Type v) \ + { \ + memcpy(stream.advance(sizeof(v)), &v, sizeof(v) ); \ + } \ + \ + template<typename Stream> inline static void read(Stream& stream, Type& v) \ + { \ + memcpy(&v, stream.advance(sizeof(v)), sizeof(v) ); \ + } \ + \ + inline static uint32_t serializedLength(const Type&) \ + { \ + return sizeof(Type); \ + } \ +}; + +ROS_CREATE_SIMPLE_SERIALIZER(uint8_t) +ROS_CREATE_SIMPLE_SERIALIZER(int8_t) +ROS_CREATE_SIMPLE_SERIALIZER(uint16_t) +ROS_CREATE_SIMPLE_SERIALIZER(int16_t) +ROS_CREATE_SIMPLE_SERIALIZER(uint32_t) +ROS_CREATE_SIMPLE_SERIALIZER(int32_t) +ROS_CREATE_SIMPLE_SERIALIZER(uint64_t) +ROS_CREATE_SIMPLE_SERIALIZER(int64_t) +ROS_CREATE_SIMPLE_SERIALIZER(float) +ROS_CREATE_SIMPLE_SERIALIZER(double) + +/** + * \brief Serializer specialized for bool (serialized as uint8) + */ +template<> struct Serializer<bool> +{ + template<typename Stream> inline static void write(Stream& stream, const bool v) + { + uint8_t b = (uint8_t)v; + memcpy(stream.advance(1), &b, 1 ); + } + + template<typename Stream> inline static void read(Stream& stream, bool& v) + { + uint8_t b; + memcpy(&b, stream.advance(1), 1 ); + v = (bool)b; + } + + inline static uint32_t serializedLength(bool) + { + return 1; + } +}; + +/** + * \brief Serializer specialized for std::string + */ +template<class ContainerAllocator> +struct Serializer<std::basic_string<char, std::char_traits<char>, ContainerAllocator> > +{ + typedef std::basic_string<char, std::char_traits<char>, ContainerAllocator> StringType; + + template<typename Stream> + inline static void write(Stream& stream, const StringType& str) + { + size_t len = str.size(); + stream.next((uint32_t)len); + + if (len > 0) + { + memcpy(stream.advance((uint32_t)len), str.data(), len); + } + } + + template<typename Stream> + inline static void read(Stream& stream, StringType& str) + { + uint32_t len; + stream.next(len); + if (len > 0) + { + str = StringType((char*)stream.advance(len), len); + } + else + { + str.clear(); + } + } + + inline static uint32_t serializedLength(const StringType& str) + { + return 4 + (uint32_t)str.size(); + } +}; + +/** + * \brief Serializer specialized for ros::Time + */ +template<> +struct Serializer<ros::Time> +{ + template<typename Stream> + inline static void write(Stream& stream, const ros::Time& v) + { + stream.next(v.sec); + stream.next(v.nsec); + } + + template<typename Stream> + inline static void read(Stream& stream, ros::Time& v) + { + stream.next(v.sec); + stream.next(v.nsec); + } + + inline static uint32_t serializedLength(const ros::Time&) + { + return 8; + } +}; + +/** + * \brief Serializer specialized for ros::Duration + */ +template<> +struct Serializer<ros::Duration> +{ + template<typename Stream> + inline static void write(Stream& stream, const ros::Duration& v) + { + stream.next(v.sec); + stream.next(v.nsec); + } + + template<typename Stream> + inline static void read(Stream& stream, ros::Duration& v) + { + stream.next(v.sec); + stream.next(v.nsec); + } + + inline static uint32_t serializedLength(const ros::Duration&) + { + return 8; + } +}; + +/** + * \brief Vector serializer. Default implementation does nothing + */ +template<typename T, class ContainerAllocator, class Enabled = void> +struct VectorSerializer +{}; + +/** + * \brief Vector serializer, specialized for non-fixed-size, non-simple types + */ +template<typename T, class ContainerAllocator> +struct VectorSerializer<T, ContainerAllocator, typename boost::disable_if<mt::IsFixedSize<T> >::type > +{ + typedef std::vector<T, typename ContainerAllocator::template rebind<T>::other> VecType; + typedef typename VecType::iterator IteratorType; + typedef typename VecType::const_iterator ConstIteratorType; + + template<typename Stream> + inline static void write(Stream& stream, const VecType& v) + { + stream.next((uint32_t)v.size()); + ConstIteratorType it = v.begin(); + ConstIteratorType end = v.end(); + for (; it != end; ++it) + { + stream.next(*it); + } + } + + template<typename Stream> + inline static void read(Stream& stream, VecType& v) + { + uint32_t len; + stream.next(len); + v.resize(len); + IteratorType it = v.begin(); + IteratorType end = v.end(); + for (; it != end; ++it) + { + stream.next(*it); + } + } + + inline static uint32_t serializedLength(const VecType& v) + { + uint32_t size = 4; + ConstIteratorType it = v.begin(); + ConstIteratorType end = v.end(); + for (; it != end; ++it) + { + size += serializationLength(*it); + } + + return size; + } +}; + +/** + * \brief Vector serializer, specialized for fixed-size simple types + */ +template<typename T, class ContainerAllocator> +struct VectorSerializer<T, ContainerAllocator, typename boost::enable_if<mt::IsSimple<T> >::type > +{ + typedef std::vector<T, typename ContainerAllocator::template rebind<T>::other> VecType; + typedef typename VecType::iterator IteratorType; + typedef typename VecType::const_iterator ConstIteratorType; + + template<typename Stream> + inline static void write(Stream& stream, const VecType& v) + { + uint32_t len = (uint32_t)v.size(); + stream.next(len); + if (!v.empty()) + { + const uint32_t data_len = len * (uint32_t)sizeof(T); + memcpy(stream.advance(data_len), &v.front(), data_len); + } + } + + template<typename Stream> + inline static void read(Stream& stream, VecType& v) + { + uint32_t len; + stream.next(len); + v.resize(len); + + if (len > 0) + { + const uint32_t data_len = (uint32_t)sizeof(T) * len; + memcpy(&v.front(), stream.advance(data_len), data_len); + } + } + + inline static uint32_t serializedLength(const VecType& v) + { + return 4 + v.size() * (uint32_t)sizeof(T); + } +}; + +/** + * \brief Vector serializer, specialized for fixed-size non-simple types + */ +template<typename T, class ContainerAllocator> +struct VectorSerializer<T, ContainerAllocator, typename boost::enable_if<mpl::and_<mt::IsFixedSize<T>, mpl::not_<mt::IsSimple<T> > > >::type > +{ + typedef std::vector<T, typename ContainerAllocator::template rebind<T>::other> VecType; + typedef typename VecType::iterator IteratorType; + typedef typename VecType::const_iterator ConstIteratorType; + + template<typename Stream> + inline static void write(Stream& stream, const VecType& v) + { + stream.next((uint32_t)v.size()); + ConstIteratorType it = v.begin(); + ConstIteratorType end = v.end(); + for (; it != end; ++it) + { + stream.next(*it); + } + } + + template<typename Stream> + inline static void read(Stream& stream, VecType& v) + { + uint32_t len; + stream.next(len); + v.resize(len); + IteratorType it = v.begin(); + IteratorType end = v.end(); + for (; it != end; ++it) + { + stream.next(*it); + } + } + + inline static uint32_t serializedLength(const VecType& v) + { + uint32_t size = 4; + if (!v.empty()) + { + uint32_t len_each = serializationLength(v.front()); + size += len_each * (uint32_t)v.size(); + } + + return size; + } +}; + +/** + * \brief serialize version for std::vector + */ +template<typename T, class ContainerAllocator, typename Stream> +inline void serialize(Stream& stream, const std::vector<T, ContainerAllocator>& t) +{ + VectorSerializer<T, ContainerAllocator>::write(stream, t); +} + +/** + * \brief deserialize version for std::vector + */ +template<typename T, class ContainerAllocator, typename Stream> +inline void deserialize(Stream& stream, std::vector<T, ContainerAllocator>& t) +{ + VectorSerializer<T, ContainerAllocator>::read(stream, t); +} + +/** + * \brief serializationLength version for std::vector + */ +template<typename T, class ContainerAllocator> +inline uint32_t serializationLength(const std::vector<T, ContainerAllocator>& t) +{ + return VectorSerializer<T, ContainerAllocator>::serializedLength(t); +} + +/** + * \brief Array serializer, default implementation does nothing + */ +template<typename T, size_t N, class Enabled = void> +struct ArraySerializer +{}; + +/** + * \brief Array serializer, specialized for non-fixed-size, non-simple types + */ +template<typename T, size_t N> +struct ArraySerializer<T, N, typename boost::disable_if<mt::IsFixedSize<T> >::type> +{ + typedef boost::array<T, N > ArrayType; + typedef typename ArrayType::iterator IteratorType; + typedef typename ArrayType::const_iterator ConstIteratorType; + + template<typename Stream> + inline static void write(Stream& stream, const ArrayType& v) + { + ConstIteratorType it = v.begin(); + ConstIteratorType end = v.end(); + for (; it != end; ++it) + { + stream.next(*it); + } + } + + template<typename Stream> + inline static void read(Stream& stream, ArrayType& v) + { + IteratorType it = v.begin(); + IteratorType end = v.end(); + for (; it != end; ++it) + { + stream.next(*it); + } + } + + inline static uint32_t serializedLength(const ArrayType& v) + { + uint32_t size = 0; + ConstIteratorType it = v.begin(); + ConstIteratorType end = v.end(); + for (; it != end; ++it) + { + size += serializationLength(*it); + } + + return size; + } +}; + +/** + * \brief Array serializer, specialized for fixed-size, simple types + */ +template<typename T, size_t N> +struct ArraySerializer<T, N, typename boost::enable_if<mt::IsSimple<T> >::type> +{ + typedef boost::array<T, N > ArrayType; + typedef typename ArrayType::iterator IteratorType; + typedef typename ArrayType::const_iterator ConstIteratorType; + + template<typename Stream> + inline static void write(Stream& stream, const ArrayType& v) + { + const uint32_t data_len = N * sizeof(T); + memcpy(stream.advance(data_len), &v.front(), data_len); + } + + template<typename Stream> + inline static void read(Stream& stream, ArrayType& v) + { + const uint32_t data_len = N * sizeof(T); + memcpy(&v.front(), stream.advance(data_len), data_len); + } + + inline static uint32_t serializedLength(const ArrayType&) + { + return N * sizeof(T); + } +}; + +/** + * \brief Array serializer, specialized for fixed-size, non-simple types + */ +template<typename T, size_t N> +struct ArraySerializer<T, N, typename boost::enable_if<mpl::and_<mt::IsFixedSize<T>, mpl::not_<mt::IsSimple<T> > > >::type> +{ + typedef boost::array<T, N > ArrayType; + typedef typename ArrayType::iterator IteratorType; + typedef typename ArrayType::const_iterator ConstIteratorType; + + template<typename Stream> + inline static void write(Stream& stream, const ArrayType& v) + { + ConstIteratorType it = v.begin(); + ConstIteratorType end = v.end(); + for (; it != end; ++it) + { + stream.next(*it); + } + } + + template<typename Stream> + inline static void read(Stream& stream, ArrayType& v) + { + IteratorType it = v.begin(); + IteratorType end = v.end(); + for (; it != end; ++it) + { + stream.next(*it); + } + } + + inline static uint32_t serializedLength(const ArrayType& v) + { + return serializationLength(v.front()) * N; + } +}; + +/** + * \brief serialize version for boost::array + */ +template<typename T, size_t N, typename Stream> +inline void serialize(Stream& stream, const boost::array<T, N>& t) +{ + ArraySerializer<T, N>::write(stream, t); +} + +/** + * \brief deserialize version for boost::array + */ +template<typename T, size_t N, typename Stream> +inline void deserialize(Stream& stream, boost::array<T, N>& t) +{ + ArraySerializer<T, N>::read(stream, t); +} + +/** + * \brief serializationLength version for boost::array + */ +template<typename T, size_t N> +inline uint32_t serializationLength(const boost::array<T, N>& t) +{ + return ArraySerializer<T, N>::serializedLength(t); +} + +/** + * \brief Enum + */ +namespace stream_types +{ +enum StreamType +{ + Input, + Output, + Length +}; +} +typedef stream_types::StreamType StreamType; + +/** + * \brief Stream base-class, provides common functionality for IStream and OStream + */ +struct ROSCPP_SERIALIZATION_DECL Stream +{ + /* + * \brief Returns a pointer to the current position of the stream + */ + inline uint8_t* getData() { return data_; } + /** + * \brief Advances the stream, checking bounds, and returns a pointer to the position before it + * was advanced. + * \throws StreamOverrunException if len would take this stream past the end of its buffer + */ + ROS_FORCE_INLINE uint8_t* advance(uint32_t len) + { + uint8_t* old_data = data_; + data_ += len; + if (data_ > end_) + { + // Throwing directly here causes a significant speed hit due to the extra code generated + // for the throw statement + throwStreamOverrun(); + } + return old_data; + } + + /** + * \brief Returns the amount of space left in the stream + */ + inline uint32_t getLength() { return (uint32_t)(end_ - data_); } + +protected: + Stream(uint8_t* _data, uint32_t _count) + : data_(_data) + , end_(_data + _count) + {} + +private: + uint8_t* data_; + uint8_t* end_; +}; + +/** + * \brief Input stream + */ +struct ROSCPP_SERIALIZATION_DECL IStream : public Stream +{ + static const StreamType stream_type = stream_types::Input; + + IStream(uint8_t* data, uint32_t count) + : Stream(data, count) + {} + + /** + * \brief Deserialize an item from this input stream + */ + template<typename T> + ROS_FORCE_INLINE void next(T& t) + { + deserialize(*this, t); + } + + template<typename T> + ROS_FORCE_INLINE IStream& operator>>(T& t) + { + deserialize(*this, t); + return *this; + } +}; + +/** + * \brief Output stream + */ +struct ROSCPP_SERIALIZATION_DECL OStream : public Stream +{ + static const StreamType stream_type = stream_types::Output; + + OStream(uint8_t* data, uint32_t count) + : Stream(data, count) + {} + + /** + * \brief Serialize an item to this output stream + */ + template<typename T> + ROS_FORCE_INLINE void next(const T& t) + { + serialize(*this, t); + } + + template<typename T> + ROS_FORCE_INLINE OStream& operator<<(const T& t) + { + serialize(*this, t); + return *this; + } +}; + + +/** + * \brief Length stream + * + * LStream is not what you would normally think of as a stream, but it is used in order to support + * allinone serializers. + */ +struct ROSCPP_SERIALIZATION_DECL LStream +{ + static const StreamType stream_type = stream_types::Length; + + LStream() + : count_(0) + {} + + /** + * \brief Add the length of an item to this length stream + */ + template<typename T> + ROS_FORCE_INLINE void next(const T& t) + { + count_ += serializationLength(t); + } + + /** + * \brief increment the length by len + */ + ROS_FORCE_INLINE uint32_t advance(uint32_t len) + { + uint32_t old = count_; + count_ += len; + return old; + } + + /** + * \brief Get the total length of this tream + */ + inline uint32_t getLength() { return count_; } + +private: + uint32_t count_; +}; + +/** + * \brief Serialize a message + */ +template<typename M> +inline SerializedMessage serializeMessage(const M& message) +{ + SerializedMessage m; + uint32_t len = serializationLength(message); + m.num_bytes = len + 4; + m.buf.reset(new uint8_t[m.num_bytes]); + + OStream s(m.buf.get(), (uint32_t)m.num_bytes); + serialize(s, (uint32_t)m.num_bytes - 4); + m.message_start = s.getData(); + serialize(s, message); + + return m; +} + +/** + * \brief Serialize a service response + */ +template<typename M> +inline SerializedMessage serializeServiceResponse(bool ok, const M& message) +{ + SerializedMessage m; + + if (ok) + { + uint32_t len = serializationLength(message); + m.num_bytes = len + 5; + m.buf.reset(new uint8_t[m.num_bytes]); + + OStream s(m.buf.get(), (uint32_t)m.num_bytes); + serialize(s, (uint8_t)ok); + serialize(s, (uint32_t)m.num_bytes - 5); + serialize(s, message); + } + else + { + uint32_t len = serializationLength(message); + m.num_bytes = len + 1; + m.buf.reset(new uint8_t[m.num_bytes]); + + OStream s(m.buf.get(), (uint32_t)m.num_bytes); + serialize(s, (uint8_t)ok); + serialize(s, message); + } + + return m; +} + +/** + * \brief Deserialize a message. If includes_length is true, skips the first 4 bytes + */ +template<typename M> +inline void deserializeMessage(const SerializedMessage& m, M& message) +{ + IStream s(m.message_start, m.num_bytes - (m.message_start - m.buf.get())); + deserialize(s, message); +} + + +// Additional serialization traits + +template<typename M> +struct PreDeserializeParams +{ + boost::shared_ptr<M> message; + boost::shared_ptr<std::map<std::string, std::string> > connection_header; +}; + +/** + * \brief called by the SubscriptionCallbackHelper after a message is + * instantiated but before that message is deserialized + */ +template<typename M> +struct PreDeserialize +{ + static void notify(const PreDeserializeParams<M>&) { } +}; + +} // namespace serialization + +} // namespace ros + +#endif // ROSCPP_SERIALIZATION_H \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros/types.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2008, Morgan Quigley and Willow Garage, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the names of Stanford University or Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ROSCPP_TYPES_H +#define ROSCPP_TYPES_H + +// this is just for interoperability with visual studio, where the standard +// integer types are not defined. + +#if defined(_MSC_VER) && (_MSC_VER < 1600 ) // MS express/studio 2008 or earlier + typedef __int64 int64_t; + typedef unsigned __int64 uint64_t; + typedef __int32 int32_t; + typedef unsigned __int32 uint32_t; + typedef __int16 int16_t; + typedef unsigned __int16 uint16_t; + typedef __int8 int8_t; + typedef unsigned __int8 uint8_t; +#else + #include <stdint.h> +#endif + + +#endif // ROSCPP_TYPES_H \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stringlb/flaw_info.h Thu Jul 11 13:30:27 2019 +0000 @@ -0,0 +1,196 @@ +// Generated by gencpp from file stringlb/flaw_info.msg +// DO NOT EDIT! + + +#ifndef STRINGLB_MESSAGE_FLAW_INFO_H +#define STRINGLB_MESSAGE_FLAW_INFO_H + + +#include <string> +#include <vector> +#include <map> + +#include <ros/types.h> +#include <ros/serialization.h> +#include <ros/builtin_message_traits.h> +#include <ros/message_operations.h> + + +namespace stringlb +{ +template <class ContainerAllocator> +struct flaw_info_ +{ + typedef flaw_info_<ContainerAllocator> Type; + + flaw_info_() + : cum_dist(0.0) + , flaw_loca(0.0) { + } + flaw_info_(const ContainerAllocator& _alloc) + : cum_dist(0.0) + , flaw_loca(0.0) { + (void)_alloc; + } + + + + typedef double _cum_dist_type; + _cum_dist_type cum_dist; + + typedef double _flaw_loca_type; + _flaw_loca_type flaw_loca; + + + + + + typedef boost::shared_ptr< ::stringlb::flaw_info_<ContainerAllocator> > Ptr; + typedef boost::shared_ptr< ::stringlb::flaw_info_<ContainerAllocator> const> ConstPtr; + +}; // struct flaw_info_ + +typedef ::stringlb::flaw_info_<std::allocator<void> > flaw_info; + +typedef boost::shared_ptr< ::stringlb::flaw_info > flaw_infoPtr; +typedef boost::shared_ptr< ::stringlb::flaw_info const> flaw_infoConstPtr; + +// constants requiring out of line definition + + + +template<typename ContainerAllocator> +std::ostream& operator<<(std::ostream& s, const ::stringlb::flaw_info_<ContainerAllocator> & v) +{ +ros::message_operations::Printer< ::stringlb::flaw_info_<ContainerAllocator> >::stream(s, "", v); +return s; +} + +} // namespace stringlb + +namespace ros +{ +namespace message_traits +{ + + + +// BOOLTRAITS {'IsFixedSize': True, 'IsMessage': True, 'HasHeader': False} +// {'std_msgs': ['/opt/ros/kinetic/share/std_msgs/cmake/../msg'], 'stringlb': ['/home/hdmmic/catkin_ws/src/stringlb/msg']} + +// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types'] + + + + +template <class ContainerAllocator> +struct IsFixedSize< ::stringlb::flaw_info_<ContainerAllocator> > + : TrueType + { }; + +template <class ContainerAllocator> +struct IsFixedSize< ::stringlb::flaw_info_<ContainerAllocator> const> + : TrueType + { }; + +template <class ContainerAllocator> +struct IsMessage< ::stringlb::flaw_info_<ContainerAllocator> > + : TrueType + { }; + +template <class ContainerAllocator> +struct IsMessage< ::stringlb::flaw_info_<ContainerAllocator> const> + : TrueType + { }; + +template <class ContainerAllocator> +struct HasHeader< ::stringlb::flaw_info_<ContainerAllocator> > + : FalseType + { }; + +template <class ContainerAllocator> +struct HasHeader< ::stringlb::flaw_info_<ContainerAllocator> const> + : FalseType + { }; + + +template<class ContainerAllocator> +struct MD5Sum< ::stringlb::flaw_info_<ContainerAllocator> > +{ + static const char* value() + { + return "6f77fb297fa2be6bf375bba6047af121"; + } + + static const char* value(const ::stringlb::flaw_info_<ContainerAllocator>&) { return value(); } + static const uint64_t static_value1 = 0x6f77fb297fa2be6bULL; + static const uint64_t static_value2 = 0xf375bba6047af121ULL; +}; + +template<class ContainerAllocator> +struct DataType< ::stringlb::flaw_info_<ContainerAllocator> > +{ + static const char* value() + { + return "stringlb/flaw_info"; + } + + static const char* value(const ::stringlb::flaw_info_<ContainerAllocator>&) { return value(); } +}; + +template<class ContainerAllocator> +struct Definition< ::stringlb::flaw_info_<ContainerAllocator> > +{ + static const char* value() + { + return "float64 cum_dist\n\ +float64 flaw_loca\n\ +"; + } + + static const char* value(const ::stringlb::flaw_info_<ContainerAllocator>&) { return value(); } +}; + +} // namespace message_traits +} // namespace ros + +namespace ros +{ +namespace serialization +{ + + template<class ContainerAllocator> struct Serializer< ::stringlb::flaw_info_<ContainerAllocator> > + { + template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) + { + stream.next(m.cum_dist); + stream.next(m.flaw_loca); + } + + ROS_DECLARE_ALLINONE_SERIALIZER + }; // struct flaw_info_ + +} // namespace serialization +} // namespace ros + +namespace ros +{ +namespace message_operations +{ + +template<class ContainerAllocator> +struct Printer< ::stringlb::flaw_info_<ContainerAllocator> > +{ + template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::stringlb::flaw_info_<ContainerAllocator>& v) + { + s << indent << "cum_dist: "; + Printer<double>::stream(s, indent + " ", v.cum_dist); + s << indent << "flaw_loca: "; + Printer<double>::stream(s, indent + " ", v.flaw_loca); + } +}; + +} // namespace message_operations +} // namespace ros + +#endif // STRINGLB_MESSAGE_FLAW_INFO_H \ No newline at end of file