Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
types.h
1 
2 /***************************************************************************
3  * types.h - Definition of simple types
4  *
5  * Created: Thu Dec 02 13:51:46 2010
6  * Copyright 2010 Bahram Maleki-Fard
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __PLUGINS_OPENRAVE_TYPES_H_
25 #define __PLUGINS_OPENRAVE_TYPES_H_
26 
27 #include <openrave/openrave.h>
28 
29 #include <vector>
30 #include <string>
31 
32 namespace fawkes {
33 #if 0 /* just to make Emacs auto-indent happy */
34 }
35 #endif
36 
37 class OpenRaveManipulator;
38 
39 /** Euler rotations. */
40 typedef enum {
41  EULER_ZXZ, /**< ZXZ rotation */
42  EULER_ZYZ, /**< ZYZ rotation */
43  EULER_ZYX /**< ZYX rotation */
44 } euler_rotation_t;
45 
46 /** Target types. */
47 typedef enum {
48  TARGET_NONE, /**< No valid target */
49  TARGET_JOINTS, /**< Target: motor joint values */
50  TARGET_TRANSFORM, /**< Target: absolute endeffector translation and rotation */
51  TARGET_RELATIVE, /**< Target: relative endeffector translation, based on robot's coordinate system */
52  TARGET_RELATIVE_EXT, /**< Target: relative endeffector translation, based on arm extension */
53  TARGET_IKPARAM /**< Target: OpenRAVE::IkParameterization string */
54 } target_type_t;
55 
56 
57 /** Struct containing angle of current motor, its number in OpenRAVE and
58  * corresponding motor number of real devices. */
59 typedef struct {
60  unsigned int no; /**< motor number in OpenRAVE */
61  unsigned int no_device; /**< motor number of real device */
62  float angle; /**< radian angle */
63 } motor_t;
64 
65 
66 /** Struct containing information about the current target. */
67 typedef struct {
68  float x; /**< translation on x-axis */
69  float y; /**< translation on y-axis */
70  float z; /**< translation on z-axis */
71  float qx; /**< x value of quaternion */
72  float qy; /**< y value of quaternion */
73  float qz; /**< z value of quaternion */
74  float qw; /**< w value of quaternion */
75  bool solvable; /**< target IK solvable */
76  OpenRaveManipulator* manip; /**< target manipulator configuration */
77  target_type_t type; /**< target type */
78  OpenRAVE::IkParameterization ikparam; /**< OpenRAVE::IkParameterization; each target is implicitly transformed to one by OpenRAVE */
79  std::string plannerparams; /**< additional string to be passed to planner, i.e. BaseManipulation module */
80 } target_t;
81 
82 } // end namespace firevision
83 
84 #endif
Target: OpenRAVE::IkParameterization string.
Definition: types.h:53
ZXZ rotation.
Definition: types.h:41
float qx
x value of quaternion
Definition: types.h:71
float x
translation on x-axis
Definition: types.h:68
Target: relative endeffector translation, based on arm extension.
Definition: types.h:52
ZYZ rotation.
Definition: types.h:42
float qz
z value of quaternion
Definition: types.h:73
target_type_t type
target type
Definition: types.h:77
Target: absolute endeffector translation and rotation.
Definition: types.h:50
std::string plannerparams
additional string to be passed to planner, i.e.
Definition: types.h:79
float z
translation on z-axis
Definition: types.h:70
target_type_t
Target types.
Definition: types.h:47
OpenRaveManipulator * manip
target manipulator configuration
Definition: types.h:76
float y
translation on y-axis
Definition: types.h:69
ZYX rotation.
Definition: types.h:43
unsigned int no_device
motor number of real device
Definition: types.h:61
Target: relative endeffector translation, based on robot's coordinate system.
Definition: types.h:51
OpenRAVE::IkParameterization ikparam
OpenRAVE::IkParameterization; each target is implicitly transformed to one by OpenRAVE.
Definition: types.h:78
No valid target.
Definition: types.h:48
Struct containing information about the current target.
Definition: types.h:67
unsigned int no
motor number in OpenRAVE
Definition: types.h:60
float angle
radian angle
Definition: types.h:62
Class containing information about all manipulator motors.
Definition: manipulator.h:35
float qw
w value of quaternion
Definition: types.h:74
Struct containing angle of current motor, its number in OpenRAVE and corresponding motor number of re...
Definition: types.h:59
bool solvable
target IK solvable
Definition: types.h:75
Target: motor joint values.
Definition: types.h:49
float qy
y value of quaternion
Definition: types.h:72