Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * types.h - Definition of simple types 00004 * 00005 * Created: Thu Dec 02 13:51:46 2010 00006 * Copyright 2010 Bahram Maleki-Fard 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __PLUGINS_OPENRAVE_TYPES_H_ 00025 #define __PLUGINS_OPENRAVE_TYPES_H_ 00026 00027 #include <openrave/openrave.h> 00028 00029 #include <vector> 00030 #include <string> 00031 00032 namespace fawkes { 00033 #if 0 /* just to make Emacs auto-indent happy */ 00034 } 00035 #endif 00036 00037 class OpenRaveManipulator; 00038 00039 /** Euler rotations. */ 00040 typedef enum { 00041 EULER_ZXZ, /**< ZXZ rotation */ 00042 EULER_ZYZ, /**< ZYZ rotation */ 00043 EULER_ZYX /**< ZYX rotation */ 00044 } euler_rotation_t; 00045 00046 /** Target types. */ 00047 typedef enum { 00048 TARGET_NONE, /**< No valid target */ 00049 TARGET_JOINTS, /**< Target: motor joint values */ 00050 TARGET_TRANSFORM, /**< Target: absolute endeffector translation and rotation */ 00051 TARGET_RELATIVE, /**< Target: relative endeffector translation, based on robot's coordinate system */ 00052 TARGET_RELATIVE_EXT, /**< Target: relative endeffector translation, based on arm extension */ 00053 TARGET_IKPARAM /**< Target: OpenRAVE::IkParameterization string */ 00054 } target_type_t; 00055 00056 00057 /** Struct containing angle of current motor, its number in OpenRAVE and 00058 * corresponding motor number of real devices. */ 00059 typedef struct { 00060 unsigned int no; /**< motor number in OpenRAVE */ 00061 unsigned int no_device; /**< motor number of real device */ 00062 float angle; /**< radian angle */ 00063 } motor_t; 00064 00065 00066 /** Struct containing information about the current target. */ 00067 typedef struct { 00068 float x; /**< translation on x-axis */ 00069 float y; /**< translation on y-axis */ 00070 float z; /**< translation on z-axis */ 00071 float qx; /**< x value of quaternion */ 00072 float qy; /**< y value of quaternion */ 00073 float qz; /**< z value of quaternion */ 00074 float qw; /**< w value of quaternion */ 00075 bool solvable; /**< target IK solvable */ 00076 OpenRaveManipulator* manip; /**< target manipulator configuration */ 00077 target_type_t type; /**< target type */ 00078 OpenRAVE::IkParameterization ikparam; /**< OpenRAVE::IkParameterization; each target is implicitly transformed to one by OpenRAVE */ 00079 std::string plannerparams; /**< additional string to be passed to planner, i.e. BaseManipulation module */ 00080 } target_t; 00081 00082 } // end namespace firevision 00083 00084 #endif