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
PlanningSceneWorld.h
00001 #ifndef _ROS_moveit_msgs_PlanningSceneWorld_h 00002 #define _ROS_moveit_msgs_PlanningSceneWorld_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "moveit_msgs/CollisionObject.h" 00009 #include "octomap_msgs/OctomapWithPose.h" 00010 00011 namespace moveit_msgs 00012 { 00013 00014 class PlanningSceneWorld : public ros::Msg 00015 { 00016 public: 00017 uint32_t collision_objects_length; 00018 typedef moveit_msgs::CollisionObject _collision_objects_type; 00019 _collision_objects_type st_collision_objects; 00020 _collision_objects_type * collision_objects; 00021 typedef octomap_msgs::OctomapWithPose _octomap_type; 00022 _octomap_type octomap; 00023 00024 PlanningSceneWorld(): 00025 collision_objects_length(0), collision_objects(NULL), 00026 octomap() 00027 { 00028 } 00029 00030 virtual int serialize(unsigned char *outbuffer) const 00031 { 00032 int offset = 0; 00033 *(outbuffer + offset + 0) = (this->collision_objects_length >> (8 * 0)) & 0xFF; 00034 *(outbuffer + offset + 1) = (this->collision_objects_length >> (8 * 1)) & 0xFF; 00035 *(outbuffer + offset + 2) = (this->collision_objects_length >> (8 * 2)) & 0xFF; 00036 *(outbuffer + offset + 3) = (this->collision_objects_length >> (8 * 3)) & 0xFF; 00037 offset += sizeof(this->collision_objects_length); 00038 for( uint32_t i = 0; i < collision_objects_length; i++){ 00039 offset += this->collision_objects[i].serialize(outbuffer + offset); 00040 } 00041 offset += this->octomap.serialize(outbuffer + offset); 00042 return offset; 00043 } 00044 00045 virtual int deserialize(unsigned char *inbuffer) 00046 { 00047 int offset = 0; 00048 uint32_t collision_objects_lengthT = ((uint32_t) (*(inbuffer + offset))); 00049 collision_objects_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00050 collision_objects_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00051 collision_objects_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00052 offset += sizeof(this->collision_objects_length); 00053 if(collision_objects_lengthT > collision_objects_length) 00054 this->collision_objects = (moveit_msgs::CollisionObject*)realloc(this->collision_objects, collision_objects_lengthT * sizeof(moveit_msgs::CollisionObject)); 00055 collision_objects_length = collision_objects_lengthT; 00056 for( uint32_t i = 0; i < collision_objects_length; i++){ 00057 offset += this->st_collision_objects.deserialize(inbuffer + offset); 00058 memcpy( &(this->collision_objects[i]), &(this->st_collision_objects), sizeof(moveit_msgs::CollisionObject)); 00059 } 00060 offset += this->octomap.deserialize(inbuffer + offset); 00061 return offset; 00062 } 00063 00064 virtual const char * getType(){ return "moveit_msgs/PlanningSceneWorld"; }; 00065 virtual const char * getMD5(){ return "373d88390d1db385335639f687723ee6"; }; 00066 00067 }; 00068 00069 } 00070 #endif
Generated on Mon Sep 26 2022 13:47:02 by
