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
KinematicSolverInfo.h
00001 #ifndef _ROS_moveit_msgs_KinematicSolverInfo_h 00002 #define _ROS_moveit_msgs_KinematicSolverInfo_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "moveit_msgs/JointLimits.h" 00009 00010 namespace moveit_msgs 00011 { 00012 00013 class KinematicSolverInfo : public ros::Msg 00014 { 00015 public: 00016 uint32_t joint_names_length; 00017 typedef char* _joint_names_type; 00018 _joint_names_type st_joint_names; 00019 _joint_names_type * joint_names; 00020 uint32_t limits_length; 00021 typedef moveit_msgs::JointLimits _limits_type; 00022 _limits_type st_limits; 00023 _limits_type * limits; 00024 uint32_t link_names_length; 00025 typedef char* _link_names_type; 00026 _link_names_type st_link_names; 00027 _link_names_type * link_names; 00028 00029 KinematicSolverInfo(): 00030 joint_names_length(0), joint_names(NULL), 00031 limits_length(0), limits(NULL), 00032 link_names_length(0), link_names(NULL) 00033 { 00034 } 00035 00036 virtual int serialize(unsigned char *outbuffer) const 00037 { 00038 int offset = 0; 00039 *(outbuffer + offset + 0) = (this->joint_names_length >> (8 * 0)) & 0xFF; 00040 *(outbuffer + offset + 1) = (this->joint_names_length >> (8 * 1)) & 0xFF; 00041 *(outbuffer + offset + 2) = (this->joint_names_length >> (8 * 2)) & 0xFF; 00042 *(outbuffer + offset + 3) = (this->joint_names_length >> (8 * 3)) & 0xFF; 00043 offset += sizeof(this->joint_names_length); 00044 for( uint32_t i = 0; i < joint_names_length; i++){ 00045 uint32_t length_joint_namesi = strlen(this->joint_names[i]); 00046 varToArr(outbuffer + offset, length_joint_namesi); 00047 offset += 4; 00048 memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); 00049 offset += length_joint_namesi; 00050 } 00051 *(outbuffer + offset + 0) = (this->limits_length >> (8 * 0)) & 0xFF; 00052 *(outbuffer + offset + 1) = (this->limits_length >> (8 * 1)) & 0xFF; 00053 *(outbuffer + offset + 2) = (this->limits_length >> (8 * 2)) & 0xFF; 00054 *(outbuffer + offset + 3) = (this->limits_length >> (8 * 3)) & 0xFF; 00055 offset += sizeof(this->limits_length); 00056 for( uint32_t i = 0; i < limits_length; i++){ 00057 offset += this->limits[i].serialize(outbuffer + offset); 00058 } 00059 *(outbuffer + offset + 0) = (this->link_names_length >> (8 * 0)) & 0xFF; 00060 *(outbuffer + offset + 1) = (this->link_names_length >> (8 * 1)) & 0xFF; 00061 *(outbuffer + offset + 2) = (this->link_names_length >> (8 * 2)) & 0xFF; 00062 *(outbuffer + offset + 3) = (this->link_names_length >> (8 * 3)) & 0xFF; 00063 offset += sizeof(this->link_names_length); 00064 for( uint32_t i = 0; i < link_names_length; i++){ 00065 uint32_t length_link_namesi = strlen(this->link_names[i]); 00066 varToArr(outbuffer + offset, length_link_namesi); 00067 offset += 4; 00068 memcpy(outbuffer + offset, this->link_names[i], length_link_namesi); 00069 offset += length_link_namesi; 00070 } 00071 return offset; 00072 } 00073 00074 virtual int deserialize(unsigned char *inbuffer) 00075 { 00076 int offset = 0; 00077 uint32_t joint_names_lengthT = ((uint32_t) (*(inbuffer + offset))); 00078 joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00079 joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00080 joint_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00081 offset += sizeof(this->joint_names_length); 00082 if(joint_names_lengthT > joint_names_length) 00083 this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); 00084 joint_names_length = joint_names_lengthT; 00085 for( uint32_t i = 0; i < joint_names_length; i++){ 00086 uint32_t length_st_joint_names; 00087 arrToVar(length_st_joint_names, (inbuffer + offset)); 00088 offset += 4; 00089 for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ 00090 inbuffer[k-1]=inbuffer[k]; 00091 } 00092 inbuffer[offset+length_st_joint_names-1]=0; 00093 this->st_joint_names = (char *)(inbuffer + offset-1); 00094 offset += length_st_joint_names; 00095 memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); 00096 } 00097 uint32_t limits_lengthT = ((uint32_t) (*(inbuffer + offset))); 00098 limits_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00099 limits_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00100 limits_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00101 offset += sizeof(this->limits_length); 00102 if(limits_lengthT > limits_length) 00103 this->limits = (moveit_msgs::JointLimits*)realloc(this->limits, limits_lengthT * sizeof(moveit_msgs::JointLimits)); 00104 limits_length = limits_lengthT; 00105 for( uint32_t i = 0; i < limits_length; i++){ 00106 offset += this->st_limits.deserialize(inbuffer + offset); 00107 memcpy( &(this->limits[i]), &(this->st_limits), sizeof(moveit_msgs::JointLimits)); 00108 } 00109 uint32_t link_names_lengthT = ((uint32_t) (*(inbuffer + offset))); 00110 link_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00111 link_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00112 link_names_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00113 offset += sizeof(this->link_names_length); 00114 if(link_names_lengthT > link_names_length) 00115 this->link_names = (char**)realloc(this->link_names, link_names_lengthT * sizeof(char*)); 00116 link_names_length = link_names_lengthT; 00117 for( uint32_t i = 0; i < link_names_length; i++){ 00118 uint32_t length_st_link_names; 00119 arrToVar(length_st_link_names, (inbuffer + offset)); 00120 offset += 4; 00121 for(unsigned int k= offset; k< offset+length_st_link_names; ++k){ 00122 inbuffer[k-1]=inbuffer[k]; 00123 } 00124 inbuffer[offset+length_st_link_names-1]=0; 00125 this->st_link_names = (char *)(inbuffer + offset-1); 00126 offset += length_st_link_names; 00127 memcpy( &(this->link_names[i]), &(this->st_link_names), sizeof(char*)); 00128 } 00129 return offset; 00130 } 00131 00132 virtual const char * getType(){ return "moveit_msgs/KinematicSolverInfo"; }; 00133 virtual const char * getMD5(){ return "cc048557c0f9795c392dd80f8bb00489"; }; 00134 00135 }; 00136 00137 } 00138 #endif
Generated on Mon Sep 26 2022 13:47:01 by
