Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
CostSource.h
00001 #ifndef _ROS_moveit_msgs_CostSource_h 00002 #define _ROS_moveit_msgs_CostSource_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "geometry_msgs/Vector3.h" 00009 00010 namespace moveit_msgs 00011 { 00012 00013 class CostSource : public ros::Msg 00014 { 00015 public: 00016 typedef double _cost_density_type; 00017 _cost_density_type cost_density; 00018 typedef geometry_msgs::Vector3 _aabb_min_type; 00019 _aabb_min_type aabb_min; 00020 typedef geometry_msgs::Vector3 _aabb_max_type; 00021 _aabb_max_type aabb_max; 00022 00023 CostSource(): 00024 cost_density(0), 00025 aabb_min(), 00026 aabb_max() 00027 { 00028 } 00029 00030 virtual int serialize(unsigned char *outbuffer) const 00031 { 00032 int offset = 0; 00033 union { 00034 double real; 00035 uint64_t base; 00036 } u_cost_density; 00037 u_cost_density.real = this->cost_density; 00038 *(outbuffer + offset + 0) = (u_cost_density.base >> (8 * 0)) & 0xFF; 00039 *(outbuffer + offset + 1) = (u_cost_density.base >> (8 * 1)) & 0xFF; 00040 *(outbuffer + offset + 2) = (u_cost_density.base >> (8 * 2)) & 0xFF; 00041 *(outbuffer + offset + 3) = (u_cost_density.base >> (8 * 3)) & 0xFF; 00042 *(outbuffer + offset + 4) = (u_cost_density.base >> (8 * 4)) & 0xFF; 00043 *(outbuffer + offset + 5) = (u_cost_density.base >> (8 * 5)) & 0xFF; 00044 *(outbuffer + offset + 6) = (u_cost_density.base >> (8 * 6)) & 0xFF; 00045 *(outbuffer + offset + 7) = (u_cost_density.base >> (8 * 7)) & 0xFF; 00046 offset += sizeof(this->cost_density); 00047 offset += this->aabb_min.serialize(outbuffer + offset); 00048 offset += this->aabb_max.serialize(outbuffer + offset); 00049 return offset; 00050 } 00051 00052 virtual int deserialize(unsigned char *inbuffer) 00053 { 00054 int offset = 0; 00055 union { 00056 double real; 00057 uint64_t base; 00058 } u_cost_density; 00059 u_cost_density.base = 0; 00060 u_cost_density.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00061 u_cost_density.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00062 u_cost_density.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00063 u_cost_density.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00064 u_cost_density.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00065 u_cost_density.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00066 u_cost_density.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00067 u_cost_density.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00068 this->cost_density = u_cost_density.real; 00069 offset += sizeof(this->cost_density); 00070 offset += this->aabb_min.deserialize(inbuffer + offset); 00071 offset += this->aabb_max.deserialize(inbuffer + offset); 00072 return offset; 00073 } 00074 00075 virtual const char * getType(){ return "moveit_msgs/CostSource"; }; 00076 virtual const char * getMD5(){ return "abb7e013237dacaaa8b97e704102f908"; }; 00077 00078 }; 00079 00080 } 00081 #endif
Generated on Mon Sep 26 2022 13:47:00 by
