ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
vpAfma6.h
1
/****************************************************************************
2
*
3
* $Id: vpAfma6.h 4191 2013-04-01 07:46:05Z fspindle $
4
*
5
* This file is part of the ViSP software.
6
* Copyright (C) 2005 - 2013 by INRIA. All rights reserved.
7
*
8
* This software is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* ("GPL") version 2 as published by the Free Software Foundation.
11
* See the file LICENSE.txt at the root directory of this source
12
* distribution for additional information about the GNU GPL.
13
*
14
* For using ViSP with software that can not be combined with the GNU
15
* GPL, please contact INRIA about acquiring a ViSP Professional
16
* Edition License.
17
*
18
* See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19
*
20
* This software was developed at:
21
* INRIA Rennes - Bretagne Atlantique
22
* Campus Universitaire de Beaulieu
23
* 35042 Rennes Cedex
24
* France
25
* http://www.irisa.fr/lagadic
26
*
27
* If you have questions regarding the use of this file, please contact
28
* INRIA at visp@inria.fr
29
*
30
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32
*
33
*
34
* Description:
35
* Interface for the Irisa's Afma6 robot.
36
*
37
* Authors:
38
* Fabien Spindler
39
*
40
*****************************************************************************/
41
42
#ifndef __vpAfma6_h
43
#define __vpAfma6_h
44
63
#include <visp/vpHomogeneousMatrix.h>
64
#include <visp/vpImage.h>
65
#include <visp/vpRGBa.h>
66
#include <visp/vpCameraParameters.h>
67
#include <visp/vpVelocityTwistMatrix.h>
68
69
class
VISP_EXPORT
vpAfma6
70
{
71
public
:
72
#ifdef VISP_HAVE_ACCESS_TO_NAS
73
static
const
char
*
const
CONST_AFMA6_FILENAME;
77
static
const
char
*
const
CONST_EMC_CCMOP_WITHOUT_DISTORTION_FILENAME
;
78
static
const
char
*
const
CONST_EMC_CCMOP_WITH_DISTORTION_FILENAME
;
79
static
const
char
*
const
CONST_EMC_GRIPPER_WITHOUT_DISTORTION_FILENAME
;
80
static
const
char
*
const
CONST_EMC_GRIPPER_WITH_DISTORTION_FILENAME
;
81
static
const
char
*
const
CONST_EMC_VACUUM_WITHOUT_DISTORTION_FILENAME
;
82
static
const
char
*
const
CONST_EMC_VACUUM_WITH_DISTORTION_FILENAME
;
83
static
const
char
*
const
CONST_EMC_GENERIC_WITHOUT_DISTORTION_FILENAME
;
84
static
const
char
*
const
CONST_EMC_GENERIC_WITH_DISTORTION_FILENAME
;
85
static
const
char
*
const
CONST_CAMERA_AFMA6_FILENAME
;
86
#endif
87
90
static
const
char
*
const
CONST_CCMOP_CAMERA_NAME
;
95
static
const
char
*
const
CONST_GRIPPER_CAMERA_NAME
;
100
static
const
char
*
const
CONST_VACUUM_CAMERA_NAME
;
105
static
const
char
*
const
CONST_GENERIC_CAMERA_NAME
;
106
108
typedef
enum
109
{
110
TOOL_CCMOP
,
111
TOOL_GRIPPER
,
112
TOOL_VACUUM
,
113
TOOL_GENERIC_CAMERA
114
} vpAfma6ToolType;
115
117
static
const
vpAfma6ToolType
defaultTool
;
118
119
public
:
120
vpAfma6
();
121
122
void
init (
void
);
123
#ifdef VISP_HAVE_ACCESS_TO_NAS
124
void
init (
const
char
* paramAfma6,
const
char
* paramCamera);
125
#endif
126
void
init (
vpAfma6::vpAfma6ToolType
tool,
127
vpCameraParameters::vpCameraParametersProjType
projModel =
128
vpCameraParameters::perspectiveProjWithoutDistortion
);
129
130
vpHomogeneousMatrix
getForwardKinematics(
const
vpColVector
& q);
131
int
getInverseKinematics(
const
vpHomogeneousMatrix
& fMc,
132
vpColVector
& q,
const
bool
&nearest=
true
,
const
bool
&verbose=
false
);
133
vpHomogeneousMatrix
get_fMc (
const
vpColVector
& q);
134
void
get_fMe(
const
vpColVector
& q,
vpHomogeneousMatrix
& fMe);
135
void
get_fMc(
const
vpColVector
& q,
vpHomogeneousMatrix
& fMc);
136
137
void
get_cMe(
vpHomogeneousMatrix
&cMe) ;
138
void
get_cVe(
vpVelocityTwistMatrix
&cVe) ;
139
void
get_eJe(
const
vpColVector
&q,
vpMatrix
&eJe) ;
140
void
get_fJe(
const
vpColVector
&q,
vpMatrix
&fJe) ;
141
142
#ifdef VISP_HAVE_ACCESS_TO_NAS
143
void
parseConfigFile (
const
char
* filename);
144
#endif
145
147
vpAfma6ToolType
getToolType
(){
148
return
tool_current;
149
};
151
vpCameraParameters::vpCameraParametersProjType
getCameraParametersProjType
(){
152
return
projModel;
153
};
154
155
void
getCameraParameters(
vpCameraParameters
&cam,
156
const
unsigned
int
&image_width,
157
const
unsigned
int
&image_height);
158
void
getCameraParameters(
vpCameraParameters
&cam,
159
const
vpImage<unsigned char>
&I);
160
void
getCameraParameters(
vpCameraParameters
&cam,
const
vpImage<vpRGBa>
&I);
161
162
friend
VISP_EXPORT std::ostream & operator << (std::ostream & os,
163
const
vpAfma6
& afma6);
164
165
vpColVector
getJointMin();
166
vpColVector
getJointMax();
167
double
getCoupl56();
168
double
getLong56();
169
170
protected
:
172
void
setToolType
(
vpAfma6::vpAfma6ToolType
tool){
173
tool_current = tool;
174
};
175
176
public
:
177
178
static
const
unsigned
int
njoint;
179
180
181
protected
:
182
double
_coupl_56
;
// coupling between join 5 and 6
183
double
_long_56
;
// distance between join 5 and 6
184
double
_joint_max[6];
// Maximal value of the joints
185
double
_joint_min[6];
// Minimal value of the joints
186
// Minimal representation of _eMc
187
vpTranslationVector
_etc
;
// meters
188
vpRxyzVector
_erc
;
// radian
189
190
vpHomogeneousMatrix
_eMc
;
// Camera extrinsic parameters: effector to camera
191
192
protected
:
194
vpAfma6ToolType
tool_current
;
195
// Used projection model
196
vpCameraParameters::vpCameraParametersProjType
projModel
;
197
198
};
199
200
/*
201
* Local variables:
202
* c-basic-offset: 2
203
* End:
204
*/
205
206
#endif
207
src
robot
real-robot
afma6
vpAfma6.h
Generated on Tue Sep 17 2013 00:21:37 for ViSP by
1.8.4