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