ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
vpRobotAfma6.h
1
/****************************************************************************
2
*
3
* $Id: vpRobotAfma6.h 4317 2013-07-17 09:40:17Z 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 controlled by an Adept MotionBlox.
36
*
37
* Authors:
38
* Fabien Spindler
39
*
40
*****************************************************************************/
41
42
#ifndef vpRobotAfma6_h
43
#define vpRobotAfma6_h
44
45
#include <visp/vpConfig.h>
46
47
#ifdef VISP_HAVE_AFMA6
48
49
#include <iostream>
50
#include <stdio.h>
51
52
#include <visp/vpRobot.h>
53
#include <visp/vpColVector.h>
54
#include <visp/vpPoseVector.h>
55
#include <visp/vpDebug.h>
56
#include <visp/vpAfma6.h>
57
58
// low level controller api
59
extern
"C"
{
60
# include "irisa_Afma6.h"
61
# include "trycatch.h"
62
}
63
64
214
class
VISP_EXPORT
vpRobotAfma6
215
:
216
public
vpAfma6
,
217
public
vpRobot
218
{
219
220
private
:
/* Not allowed functions. */
221
225
vpRobotAfma6
(
const
vpRobotAfma6
& robot);
226
227
private
:
/* Attributs prives. */
228
238
static
bool
robotAlreadyCreated;
239
240
double
positioningVelocity;
241
242
// Variables used to compute the measured velocities (see getVelocity() )
243
vpColVector
q_prev_getvel;
244
vpHomogeneousMatrix
fMc_prev_getvel;
245
double
time_prev_getvel;
246
bool
first_time_getvel;
247
248
// Variables used to compute the measured displacement (see
249
// getDisplacement() )
250
vpColVector
q_prev_getdis;
251
bool
first_time_getdis;
252
vpHomogeneousMatrix
fMc_prev_getdis;
253
254
255
public
:
/* Constantes */
256
257
/* Vitesse maximale par default lors du positionnement du robot.
258
* C'est la valeur a la construction de l'attribut prive \a
259
* positioningVelocity. Cette valeur peut etre changee par la fonction
260
* #setPositioningVelocity.
261
*/
262
static
const
double
defaultPositioningVelocity
;
// = 20.0;
263
264
public
:
/* Methode publiques */
265
266
vpRobotAfma6
(
bool
verbose=
true
);
267
virtual
~
vpRobotAfma6
(
void
);
268
269
bool
checkJointLimits(
vpColVector
& jointsStatus);
270
271
void
closeGripper() ;
272
273
void
getDisplacement
(
vpRobot::vpControlFrameType
frame,
274
vpColVector
&displacement);
275
276
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
277
vpColVector
&position);
278
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
279
vpColVector
&position,
double
×tamp);
280
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
281
vpPoseVector
&position);
282
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
283
vpPoseVector
&position,
double
×tamp);
284
285
double
getPositioningVelocity (
void
);
286
bool
getPowerState();
287
double
getTime()
const
;
288
289
void
getVelocity (
const
vpRobot::vpControlFrameType
frame,
290
vpColVector
& velocity);
291
void
getVelocity (
const
vpRobot::vpControlFrameType
frame,
292
vpColVector
& velocity,
double
×tamp);
293
294
vpColVector
getVelocity (
const
vpRobot::vpControlFrameType
frame);
295
vpColVector
getVelocity (
const
vpRobot::vpControlFrameType
frame,
double
×tamp);
296
297
void
get_cMe
(
vpHomogeneousMatrix
&_cMe) ;
298
void
get_cVe
(
vpVelocityTwistMatrix
&_cVe) ;
299
void
get_eJe
(
vpMatrix
&_eJe) ;
300
void
get_fJe
(
vpMatrix
&_fJe) ;
301
302
void
init
(
void
);
303
void
init
(
vpAfma6::vpAfma6ToolType
tool,
304
vpCameraParameters::vpCameraParametersProjType
305
projModel =
vpCameraParameters::perspectiveProjWithoutDistortion
);
306
307
void
move(
const
char
*filename) ;
308
void
move(
const
char
*filename,
const
double
velocity) ;
309
310
void
openGripper() ;
311
312
void
powerOn() ;
313
void
powerOff() ;
314
315
static
bool
readPosFile(
const
char
*filename,
vpColVector
&q) ;
316
static
bool
savePosFile(
const
char
*filename,
const
vpColVector
&q) ;
317
318
/* --- POSITIONNEMENT --------------------------------------------------- */
319
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
320
const
vpPoseVector
& pose );
321
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
322
const
vpColVector
&position) ;
323
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
324
const
double
pos1,
const
double
pos2,
const
double
pos3,
325
const
double
pos4,
const
double
pos5,
const
double
pos6) ;
326
void
setPosition
(
const
char
*filename) ;
327
void
setPositioningVelocity (
const
double
velocity);
328
329
/* --- ETAT ------------------------------------------------------------- */
330
331
vpRobot::vpRobotStateType
setRobotState
(
vpRobot::vpRobotStateType
newState);
332
333
334
/* --- VITESSE ---------------------------------------------------------- */
335
336
void
setVelocity
(
const
vpRobot::vpControlFrameType
frame,
337
const
vpColVector
& velocity);
338
339
void
stopMotion() ;
340
341
private
:
342
void
getArticularDisplacement(
vpColVector
&displacement);
343
void
getCameraDisplacement(
vpColVector
&displacement);
344
};
345
346
347
348
349
350
/*
351
* Local variables:
352
* c-basic-offset: 2
353
* End:
354
*/
355
356
#endif
357
#endif
/* #ifndef vpRobotAfma6_h */
src
robot
real-robot
afma6
vpRobotAfma6.h
Generated on Fri Sep 27 2013 21:09:15 for ViSP by
1.8.4