Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpRobotViper850.h
1
/*
2
* ViSP, open source Visual Servoing Platform software.
3
* Copyright (C) 2005 - 2025 by Inria. All rights reserved.
4
*
5
* This software is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
* See the file LICENSE.txt at the root directory of this source
10
* distribution for additional information about the GNU GPL.
11
*
12
* For using ViSP with software that can not be combined with the GNU
13
* GPL, please contact Inria about acquiring a ViSP Professional
14
* Edition License.
15
*
16
* See https://visp.inria.fr for more information.
17
*
18
* This software was developed at:
19
* Inria Rennes - Bretagne Atlantique
20
* Campus Universitaire de Beaulieu
21
* 35042 Rennes Cedex
22
* France
23
*
24
* If you have questions regarding the use of this file, please contact
25
* Inria at visp@inria.fr
26
*
27
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29
*
30
* Description:
31
* Interface for the Irisa's Viper S850 robot controlled by an Adept
32
*MotionBlox.
33
*/
34
35
#ifndef vpRobotViper850_h
36
#define vpRobotViper850_h
37
38
#include <visp3/core/vpConfig.h>
39
40
#ifdef VISP_HAVE_VIPER850
41
42
#include <iostream>
43
#include <stdio.h>
44
45
#include <visp3/core/vpColVector.h>
46
#include <visp3/core/vpDebug.h>
47
#include <visp3/robot/vpRobot.h>
48
#include <visp3/robot/vpViper850.h>
49
50
// low level controller api
51
extern
"C"
{
52
#include "irisa_Viper850.h"
53
#include "trycatch.h"
54
}
55
56
// If USE_ATI_DAQ defined, use DAQ board instead of serial connexion to
57
// acquire data using comedi
58
#define USE_ATI_DAQ
59
60
#ifdef USE_ATI_DAQ
61
#include <visp3/sensor/vpForceTorqueAtiSensor.h>
62
#endif
63
64
BEGIN_VISP_NAMESPACE
363
class
VISP_EXPORT vpRobotViper850 :
public
vpViper850
,
public
vpRobot
364
{
365
366
public
:
/* Constantes */
368
typedef
enum
369
{
370
AUTO
,
371
MANUAL
,
373
ESTOP
374
} vpControlModeType;
375
376
/* Max velocity used during robot control in position.
377
* this value could be changed using setPositioningVelocity().
378
*/
379
static
const
double
m_defaultPositioningVelocity
;
// = 20.0;
380
381
private
:
/* Not allowed functions. */
385
vpRobotViper850(
const
vpRobotViper850 &robot);
386
387
private
:
/* Attributs prives. */
397
static
bool
m_robotAlreadyCreated;
398
399
double
m_positioningVelocity;
400
401
// Variables used to compute the measured velocities (see getVelocity() )
402
vpColVector
m_q_prev_getvel;
403
vpHomogeneousMatrix
m_fMc_prev_getvel;
404
vpHomogeneousMatrix
m_fMe_prev_getvel;
405
double
m_time_prev_getvel;
406
bool
m_first_time_getvel;
407
408
// Variables used to compute the measured displacement (see
409
// getDisplacement() )
410
vpColVector
m_q_prev_getdis;
411
bool
m_first_time_getdis;
412
vpControlModeType
m_controlMode;
413
414
#if defined(USE_ATI_DAQ) && defined(VISP_HAVE_COMEDI)
415
vpForceTorqueAtiSensor
m_ati;
416
#endif
417
418
public
:
/* Methode publiques */
419
VP_EXPLICIT vpRobotViper850(
bool
verbose =
true
);
420
virtual
~vpRobotViper850(
void
);
421
422
// Force/Torque control
423
void
biasForceTorqueSensor
();
424
425
void
closeGripper
()
const
;
426
427
void
disableJoint6Limits
()
const
;
428
void
enableJoint6Limits
()
const
;
429
430
void
getDisplacement
(
vpRobot::vpControlFrameType
frame,
vpColVector
&displacement);
435
vpControlModeType
getControlMode
()
const
{
return
m_controlMode; }
436
437
void
getForceTorque(
vpColVector
&H)
const
;
438
vpColVector
getForceTorque()
const
;
439
440
double
getMaxRotationVelocityJoint6()
const
;
441
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&position) VP_OVERRIDE;
442
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&position,
double
×tamp);
443
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpPoseVector
&position);
444
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpPoseVector
&position,
double
×tamp);
445
446
double
getPositioningVelocity(
void
)
const
;
447
bool
getPowerState()
const
;
448
449
void
getVelocity(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&velocity);
450
void
getVelocity(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&velocity,
double
×tamp);
451
452
vpColVector
getVelocity(
const
vpRobot::vpControlFrameType
frame);
453
vpColVector
getVelocity(
const
vpRobot::vpControlFrameType
frame,
double
×tamp);
454
455
double
getTime()
const
;
456
457
void
get_cMe
(
vpHomogeneousMatrix
&cMe)
const
;
458
void
get_cVe
(
vpVelocityTwistMatrix
&cVe)
const
;
459
void
get_eJe
(
vpMatrix
&eJe) VP_OVERRIDE;
460
void
get_fJe
(
vpMatrix
&fJe) VP_OVERRIDE;
461
462
void
init
(
void
);
463
void
464
init
(
vpViper850::vpToolType
tool,
465
vpCameraParameters::vpCameraParametersProjType
projModel =
vpCameraParameters::perspectiveProjWithoutDistortion
);
466
void
init
(
vpViper850::vpToolType
tool,
const
std::string &filename);
467
void
init
(
vpViper850::vpToolType
tool,
const
vpHomogeneousMatrix
&eMc_);
468
469
void
move(
const
std::string &filename);
470
471
void
openGripper();
472
473
void
powerOn();
474
void
powerOff();
475
476
static
bool
readPosFile(
const
std::string &filename,
vpColVector
&q);
477
static
bool
savePosFile(
const
std::string &filename,
const
vpColVector
&q);
478
479
void
set_eMc
(
const
vpHomogeneousMatrix
&eMc_);
480
void
set_eMc
(
const
vpTranslationVector
&etc_,
const
vpRxyzVector
&erc_);
481
482
void
setMaxRotationVelocity
(
double
w_max);
483
void
setMaxRotationVelocityJoint6(
double
w6_max);
484
485
// Position control
486
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&position) VP_OVERRIDE;
487
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
double
pos1,
double
pos2,
double
pos3,
double
pos4,
488
double
pos5,
double
pos6);
489
void
setPosition
(
const
std::string &filename);
490
void
setPositioningVelocity(
double
velocity);
491
492
// State
493
vpRobot::vpRobotStateType
setRobotState
(
vpRobot::vpRobotStateType
newState);
494
495
// Velocity control
496
void
setVelocity
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&velocity) VP_OVERRIDE;
497
498
void
stopMotion();
499
void
unbiasForceTorqueSensor();
500
501
private
:
502
double
maxRotationVelocity_joint6;
503
};
504
END_VISP_NAMESPACE
505
#endif
506
#endif
/* #ifndef vpRobotViper850_h */
vpCameraParameters::vpCameraParametersProjType
vpCameraParametersProjType
Definition
vpCameraParameters.h:317
vpCameraParameters::perspectiveProjWithoutDistortion
@ perspectiveProjWithoutDistortion
Perspective projection without distortion model.
Definition
vpCameraParameters.h:318
vpColVector
Implementation of column vector and the associated operations.
Definition
vpColVector.h:191
vpForceTorqueAtiSensor
Definition
vpForceTorqueAtiSensor.h:86
vpHomogeneousMatrix
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition
vpHomogeneousMatrix.h:221
vpMatrix
Implementation of a matrix and operations on matrices.
Definition
vpMatrix.h:175
vpPoseVector
Implementation of a pose vector and operations on poses.
Definition
vpPoseVector.h:203
vpRobotViper850::m_defaultPositioningVelocity
static const double m_defaultPositioningVelocity
Definition
vpRobotViper850.h:379
vpRobotViper850::closeGripper
void closeGripper() const
Definition
vpRobotViper850.cpp:2593
vpRobotViper850::biasForceTorqueSensor
void biasForceTorqueSensor()
Definition
vpRobotViper850.cpp:2387
vpRobotViper850::disableJoint6Limits
void disableJoint6Limits() const
Definition
vpRobotViper850.cpp:2631
vpRobotViper850::enableJoint6Limits
void enableJoint6Limits() const
Definition
vpRobotViper850.cpp:2609
vpRobotViper850::vpControlModeType
vpControlModeType
Definition
vpRobotViper850.h:369
vpRobotViper850::MANUAL
@ MANUAL
Definition
vpRobotViper850.h:371
vpRobotViper850::AUTO
@ AUTO
Automatic control mode (default).
Definition
vpRobotViper850.h:370
vpRobotViper850::ESTOP
@ ESTOP
Emergency stop activated.
Definition
vpRobotViper850.h:373
vpRobotViper850::getControlMode
vpControlModeType getControlMode() const
Definition
vpRobotViper850.h:435
vpRobot::vpControlFrameType
vpControlFrameType
Definition
vpRobot.h:74
vpRobot::setVelocity
virtual void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)=0
vpRobot::getPosition
virtual void getPosition(const vpRobot::vpControlFrameType frame, vpColVector &position)=0
Get the robot position (frame has to be specified).
vpRobot::vpRobotStateType
vpRobotStateType
Definition
vpRobot.h:62
vpRobot::setRobotState
virtual vpRobotStateType setRobotState(const vpRobot::vpRobotStateType newState)
Definition
vpRobot.cpp:200
vpRobot::getDisplacement
virtual void getDisplacement(const vpRobot::vpControlFrameType frame, vpColVector &q)=0
vpRobot::vpRobot
vpRobot(void)
Definition
vpRobot.cpp:49
vpRobot::setMaxRotationVelocity
void setMaxRotationVelocity(double maxVr)
Definition
vpRobot.cpp:259
vpRobot::setPosition
virtual void setPosition(const vpRobot::vpControlFrameType frame, const vpColVector &q)=0
Set a displacement (frame has to be specified) in position control.
vpRxyzVector
Implementation of a rotation vector as Euler angle minimal representation.
Definition
vpRxyzVector.h:183
vpTranslationVector
Class that consider the case of a translation vector.
Definition
vpTranslationVector.h:119
vpVelocityTwistMatrix
Definition
vpVelocityTwistMatrix.h:175
vpViper850::vpViper850
vpViper850()
Definition
vpViper850.cpp:98
vpViper850::vpToolType
vpToolType
List of possible tools that can be attached to the robot end-effector.
Definition
vpViper850.h:120
vpViper850::init
void init(void)
Definition
vpViper850.cpp:132
vpViper::set_eMc
virtual void set_eMc(const vpHomogeneousMatrix &eMc_)
Definition
vpViper.cpp:1250
vpViper::get_cMe
void get_cMe(vpHomogeneousMatrix &cMe) const
Definition
vpViper.cpp:942
vpViper::get_fJe
void get_fJe(const vpColVector &q, vpMatrix &fJe) const
Definition
vpViper.cpp:1179
vpViper::get_eJe
void get_eJe(const vpColVector &q, vpMatrix &eJe) const
Definition
vpViper.cpp:990
vpViper::get_cVe
void get_cVe(vpVelocityTwistMatrix &cVe) const
Definition
vpViper.cpp:958
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
robot
include
visp3
robot
vpRobotViper850.h
Generated by
1.17.0