$search
00001 #ifndef UTILITY_H_ 00002 #define UTILITY_H_ 00003 00004 #include <string.h> 00005 #include <ros/ros.h> 00006 #include <vector> 00007 #include <iostream> 00008 #include <fstream> 00009 #include <sstream> 00010 #include <stdint.h> 00011 #include <algorithm> 00012 #include <iterator> 00013 #include <database_interface/postgresql_database.h> 00014 #include <database_interface/db_class.h> 00015 #include <pcl/ros/conversions.h> 00016 #include <pcl/point_cloud.h> 00017 #include <pcl/point_types.h> 00018 #include <pcl/io/pcd_io.h> 00019 #include <pcl/pcl_base.h> 00020 #include <pcl/io/io.h> 00021 #include <srs_object_database_msgs/surf.h> 00022 #include <srs_object_database_msgs/pcl.h> 00023 #include "srs_object_database_msgs/point_types.h" 00024 #include "srs_object_database_msgs/impl/point_types.cpp" 00025 #include <arm_navigation_msgs/Shape.h> 00026 00027 struct input { 00028 std::string id; 00029 std::string category; 00030 std::string name; 00031 std::string description; 00032 std::string image; 00033 std::string image_type; 00034 std::string grasp; 00035 std::string mesh; 00036 std::string mType; 00037 std::string pcl; 00038 std::string surf; 00039 std::string x; 00040 std::string y; 00041 std::string z; 00042 std::string basic_shape; 00043 std::string graspable; 00044 std::string urdf; 00045 } ; 00046 00047 // FILE OPEN-READ-WRITE UTILITY 00048 void utWriteToFile(char * data,std::string,long); 00049 void utDataWrite(std::vector<uint8_t>,std::string); 00050 char* utConvertToChar(std::vector<char>); 00051 std::vector<char> utConvertToVector(char* inputData); 00052 00053 char * utRetrieveDataFile(std::string, int *); 00054 input utGetInputParameter(std::string); 00055 // Data Loading utility 00056 void utLoadFeaturePointFromFile(std::string,srs_object_database_msgs::surf::Ptr &); 00057 00058 void utLoadCloudPointFromPLYFile(std::string); 00059 00060 arm_navigation_msgs::Shape utLoadMeshFromFile(std::string , srs_object_database_msgs::pcl::Ptr &); 00061 00062 // utility 00063 00064 std::string fromCharPt(char *); 00065 00066 // DATABASE UTILITY 00067 database_interface::PostgresqlDatabase utLoadSettings(std::string ,std::string ,std::string ,std::string ,std::string ); 00068 00069 00070 #endif /* UTILITY_H_ */