ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
vpRobotViper650.h
1
/****************************************************************************
2
*
3
* $Id: vpRobotViper650.h 4056 2013-01-05 13:04:42Z 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 Viper S650 robot controlled by an Adept MotionBlox.
36
*
37
* Authors:
38
* Fabien Spindler
39
*
40
*****************************************************************************/
41
42
#ifndef vpRobotViper650_h
43
#define vpRobotViper650_h
44
45
#include <visp/vpConfig.h>
46
47
#ifdef VISP_HAVE_VIPER650
48
49
#include <iostream>
50
#include <stdio.h>
51
52
#include <visp/vpRobot.h>
53
#include <visp/vpColVector.h>
54
#include <visp/vpDebug.h>
55
#include <visp/vpViper650.h>
56
57
// low level controller api
58
extern
"C"
{
59
# include "irisa_Viper650.h"
60
# include "trycatch.h"
61
}
62
63
276
class
VISP_EXPORT
vpRobotViper650
277
:
278
public
vpViper650
,
279
public
vpRobot
280
{
281
282
public
:
/* Constantes */
283
285
typedef
enum
{
286
AUTO
,
287
MANUAL
,
288
ESTOP
289
} vpControlModeType;
290
291
/* Vitesse maximale par default lors du positionnement du robot.
292
* C'est la valeur a la construction de l'attribut prive \a
293
* positioningVelocity. Cette valeur peut etre changee par la fonction
294
* #setPositioningVelocity.
295
*/
296
static
const
double
defaultPositioningVelocity
;
// = 20.0;
297
298
private
:
/* Not allowed functions. */
299
303
vpRobotViper650
(
const
vpRobotViper650
& robot);
304
305
private
:
/* Attributs prives. */
306
316
static
bool
robotAlreadyCreated;
317
318
double
positioningVelocity;
319
320
// Variables used to compute the measured velocities (see getVelocity() )
321
vpColVector
q_prev_getvel;
322
vpHomogeneousMatrix
fMc_prev_getvel;
323
double
time_prev_getvel;
324
bool
first_time_getvel;
325
326
// Variables used to compute the measured displacement (see
327
// getDisplacement() )
328
vpColVector
q_prev_getdis;
329
bool
first_time_getdis;
330
vpControlModeType
controlMode;
331
332
333
public
:
/* Methode publiques */
334
335
vpRobotViper650
(
bool
verbose=
true
);
336
virtual
~
vpRobotViper650
(
void
);
337
338
// Force/Torque control
339
void
biasForceTorqueSensor();
340
345
vpControlModeType
getControlMode
() {
346
return
controlMode;
347
}
348
349
void
getDisplacement
(
vpRobot::vpControlFrameType
frame,
350
vpColVector
&displacement);
351
void
getForceTorque(
vpColVector
&H);
352
353
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
354
vpColVector
&position);
355
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
356
vpColVector
&position,
357
double
×tamp);
358
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
359
vpPoseVector
&position);
360
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
361
vpPoseVector
&position,
362
double
×tamp);
363
364
double
getPositioningVelocity (
void
);
365
bool
getPowerState();
366
367
double
getTime ()
const
;
368
void
getVelocity (
const
vpRobot::vpControlFrameType
frame,
369
vpColVector
& velocity);
370
void
getVelocity (
const
vpRobot::vpControlFrameType
frame,
371
vpColVector
& velocity,
double
×tamp);
372
373
vpColVector
getVelocity (
const
vpRobot::vpControlFrameType
frame);
374
vpColVector
getVelocity (
const
vpRobot::vpControlFrameType
frame,
double
×tamp);
375
376
void
get_cMe
(
vpHomogeneousMatrix
&cMe) ;
377
void
get_cVe
(
vpVelocityTwistMatrix
&cVe) ;
378
void
get_eJe
(
vpMatrix
&eJe) ;
379
void
get_fJe
(
vpMatrix
&fJe) ;
380
381
void
init
(
void
);
382
void
init
(
vpViper650::vpToolType
tool,
383
vpCameraParameters::vpCameraParametersProjType
384
projModel =
vpCameraParameters::perspectiveProjWithoutDistortion
);
385
386
void
move(
const
char
*filename) ;
387
388
void
powerOn() ;
389
void
powerOff() ;
390
391
static
bool
readPosFile(
const
char
*filename,
vpColVector
&q) ;
392
static
bool
savePosFile(
const
char
*filename,
const
vpColVector
&q) ;
393
394
// Position control
395
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
396
const
vpColVector
&position) ;
397
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
398
const
double
pos1,
const
double
pos2,
const
double
pos3,
399
const
double
pos4,
const
double
pos5,
const
double
pos6) ;
400
void
setPosition
(
const
char
*filename) ;
401
void
setPositioningVelocity (
const
double
velocity);
402
403
// State
404
vpRobot::vpRobotStateType
setRobotState
(
vpRobot::vpRobotStateType
newState);
405
// Velocity control
406
void
setVelocity
(
const
vpRobot::vpControlFrameType
frame,
407
const
vpColVector
& velocity);
408
409
void
stopMotion() ;
410
411
private
:
412
void
getArticularDisplacement(
vpColVector
&displacement);
413
void
getCameraDisplacement(
vpColVector
&displacement);
414
};
415
416
#endif
417
#endif
/* #ifndef vpRobotViper650_h */
src
robot
real-robot
viper
vpRobotViper650.h
Generated on Wed Jun 12 2013 05:39:46 for ViSP by
1.8.1.2