Fawkes API  Fawkes Development Version
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 #include <core/utils/refptr.h>
29 
30 #include <vector>
31 #include <string>
32 
33 namespace fawkes {
34 #if 0 /* just to make Emacs auto-indent happy */
35 }
36 #endif
37 
38 class OpenRaveEnvironment;
39 class OpenRaveRobot;
40 class OpenRaveManipulator;
41 
42 typedef RefPtr<OpenRaveEnvironment> OpenRaveEnvironmentPtr;
43 typedef RefPtr<OpenRaveRobot> OpenRaveRobotPtr;
44 typedef RefPtr<OpenRaveManipulator> OpenRaveManipulatorPtr;
45 
46 /** Euler rotations. */
47 typedef enum {
48  EULER_ZXZ, /**< ZXZ rotation */
49  EULER_ZYZ, /**< ZYZ rotation */
50  EULER_ZYX /**< ZYX rotation */
52 
53 /** Target types. */
54 typedef enum {
55  TARGET_NONE, /**< No valid target */
56  TARGET_JOINTS, /**< Target: motor joint values */
57  TARGET_TRANSFORM, /**< Target: absolute endeffector translation and rotation */
58  TARGET_RELATIVE, /**< Target: relative endeffector translation, based on robot's coordinate system */
59  TARGET_RELATIVE_EXT, /**< Target: relative endeffector translation, based on arm extension */
60  TARGET_IKPARAM, /**< Target: OpenRAVE::IkParameterization string */
61  TARGET_RAW /**< Target: Raw string, passed to OpenRAVE's BaseManipulation module */
63 
64 
65 /** Struct containing angle of current motor, its number in OpenRAVE and
66  * corresponding motor number of real devices. */
67 typedef struct {
68  unsigned int no; /**< motor number in OpenRAVE */
69  unsigned int no_device; /**< motor number of real device */
70  float angle; /**< radian angle */
71 } motor_t;
72 
73 
74 /** Struct containing information about the current target. */
75 typedef struct {
76  float x; /**< translation on x-axis */
77  float y; /**< translation on y-axis */
78  float z; /**< translation on z-axis */
79  float qx; /**< x value of quaternion */
80  float qy; /**< y value of quaternion */
81  float qz; /**< z value of quaternion */
82  float qw; /**< w value of quaternion */
83  bool solvable; /**< target IK solvable */
84  OpenRaveManipulatorPtr manip; /**< target manipulator configuration */
85  target_type_t type; /**< target type */
86  OpenRAVE::IkParameterization ikparam; /**< OpenRAVE::IkParameterization; each target is implicitly transformed to one by OpenRAVE */
87  std::string plannerparams; /**< additional string to be passed to planner, i.e. BaseManipulation module */
88  std::string raw_cmd; /**< raw command passed to the BaseManipulator module, e.g. for anything that is not covered */
89 } target_t;
90 
91 } // end namespace firevision
92 
93 #endif
Target: OpenRAVE::IkParameterization string.
Definition: types.h:60
ZXZ rotation.
Definition: types.h:48
float qx
x value of quaternion
Definition: types.h:79
float x
translation on x-axis
Definition: types.h:76
Target: relative endeffector translation, based on arm extension.
Definition: types.h:59
Fawkes library namespace.
ZYZ rotation.
Definition: types.h:49
float qz
z value of quaternion
Definition: types.h:81
target_type_t type
target type
Definition: types.h:85
Target: absolute endeffector translation and rotation.
Definition: types.h:57
std::string raw_cmd
raw command passed to the BaseManipulator module, e.g.
Definition: types.h:88
std::string plannerparams
additional string to be passed to planner, i.e.
Definition: types.h:87
float z
translation on z-axis
Definition: types.h:78
RefPtr< OpenRaveEnvironment > OpenRaveEnvironmentPtr
RefPtr to OpenRaveEnvironment.
target_type_t
Target types.
Definition: types.h:54
Target: Raw string, passed to OpenRAVE&#39;s BaseManipulation module.
Definition: types.h:61
float y
translation on y-axis
Definition: types.h:77
ZYX rotation.
Definition: types.h:50
unsigned int no_device
motor number of real device
Definition: types.h:69
RefPtr< OpenRaveManipulator > OpenRaveManipulatorPtr
RefPtr to OpenRaveManipulator.
Target: relative endeffector translation, based on robot&#39;s coordinate system.
Definition: types.h:58
OpenRAVE::IkParameterization ikparam
OpenRAVE::IkParameterization; each target is implicitly transformed to one by OpenRAVE.
Definition: types.h:86
No valid target.
Definition: types.h:55
Struct containing information about the current target.
Definition: types.h:75
unsigned int no
motor number in OpenRAVE
Definition: types.h:68
float angle
radian angle
Definition: types.h:70
float qw
w value of quaternion
Definition: types.h:82
euler_rotation_t
Euler rotations.
Definition: types.h:47
OpenRaveManipulatorPtr manip
target manipulator configuration
Definition: types.h:84
Struct containing angle of current motor, its number in OpenRAVE and corresponding motor number of re...
Definition: types.h:67
bool solvable
target IK solvable
Definition: types.h:83
RefPtr< OpenRaveRobot > OpenRaveRobotPtr
RefPtr to OpenRaveRobot.
Target: motor joint values.
Definition: types.h:56
float qy
y value of quaternion
Definition: types.h:80