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