libmove3d
3.13.0
|
00001 #ifndef GP_GRASP_IO_H 00002 #define GP_GRASP_IO_H 00003 00004 #include <string> 00005 00010 00012 typedef struct gpElementParserData 00013 { 00014 std::string object_name, hand_type, version, autoGen; 00015 int ID, fingerID, handID, body_index, face; 00016 double stability, quality, friction_coefficient, curvature; 00017 double position[3], normal[3], force_direction[3], baryCoords[3]; 00018 double frame[4][4]; 00019 std::list<double> configuration, open_configuration; 00020 } gpElementParserData; 00021 00022 00024 typedef struct gpContactParserData 00025 { 00026 double friction_coefficient, curvature; 00027 double position[3], normal[3], force_direction[3], baryCoords[3]; 00028 int fingerID, face; 00029 } gpContactParserData; 00030 00032 typedef struct gpGraspParserData 00033 { 00034 bool autoGen; 00035 std::string object_name; 00036 gpHand_type hand_type; 00037 int body_index; 00038 int ID, handID; 00039 double stability, quality; 00040 double frame[4][4]; 00041 std::list<gpContact> contacts; 00042 std::list<double> configuration, open_configuration; 00043 } gpGraspParserData; 00044 00045 00046 extern int gpSave_grasp_list(std::list<class gpGrasp> &graspList, std::string filename); 00047 00048 extern int gpLoad_grasp_list(std::string filename, std::list<class gpGrasp> &graspList); 00049 00050 extern int gpCheck_grasp_list_validity(std::list<class gpGrasp> &graspList, std::string objectName); 00051 00052 extern int gpInvert_axis(std::string inputFile, std::string outputFile, p3d_matrix4 T); 00053 00054 extern int gpMirror_robot(p3d_rob *robot, int axis); 00055 00056 extern int gpMirror_robot_bodies(p3d_rob *robot, std::string path, int axis); 00057 00058 #endif 00059