Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpRobotViper650.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 S650 robot controlled by an Adept
32
*MotionBlox.
33
*/
34
35
#ifndef vpRobotViper650_h
36
#define vpRobotViper650_h
37
38
#include <visp3/core/vpConfig.h>
39
40
#ifdef VISP_HAVE_VIPER650
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/vpViper650.h>
49
50
// low level controller api
51
extern
"C"
{
52
#include "irisa_Viper650.h"
53
#include "trycatch.h"
54
}
55
56
BEGIN_VISP_NAMESPACE
361
class
VISP_EXPORT vpRobotViper650 :
public
vpViper650
,
public
vpRobot
362
{
363
364
public
:
/* Constantes */
366
typedef
enum
367
{
368
AUTO
,
369
MANUAL
,
371
ESTOP
372
} vpControlModeType;
373
374
/* Max velocity used during robot control in position.
375
* this value could be changed using setPositioningVelocity().
376
*/
377
static
const
double
m_defaultPositioningVelocity
;
// = 20.0;
378
379
private
:
/* Not allowed functions. */
383
vpRobotViper650(
const
vpRobotViper650 &robot);
384
385
private
:
/* Attributs prives. */
395
static
bool
m_robotAlreadyCreated;
396
397
double
m_positioningVelocity;
398
399
// Variables used to compute the measured velocities (see getVelocity() )
400
vpColVector
m_q_prev_getvel;
401
vpHomogeneousMatrix
m_fMc_prev_getvel;
402
vpHomogeneousMatrix
m_fMe_prev_getvel;
403
double
m_time_prev_getvel;
404
bool
m_first_time_getvel;
405
406
// Variables used to compute the measured displacement (see getDisplacement() )
407
vpColVector
m_q_prev_getdis;
408
bool
m_first_time_getdis;
409
vpControlModeType
m_controlMode;
410
411
public
:
/* Methode publiques */
412
VP_EXPLICIT vpRobotViper650(
bool
verbose =
true
);
413
virtual
~vpRobotViper650(
void
);
414
415
// Force/Torque control
416
void
biasForceTorqueSensor
()
const
;
417
418
void
closeGripper
()
const
;
419
420
void
disableJoint6Limits
()
const
;
421
void
enableJoint6Limits
()
const
;
422
427
vpControlModeType
getControlMode
()
const
{
return
m_controlMode; }
428
429
void
getDisplacement
(
vpRobot::vpControlFrameType
frame,
vpColVector
&displacement);
430
void
getForceTorque(
vpColVector
&H)
const
;
431
vpColVector
getForceTorque()
const
;
432
433
double
getMaxRotationVelocityJoint6()
const
;
434
435
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&position);
436
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&position,
double
×tamp);
437
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpPoseVector
&position);
438
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpPoseVector
&position,
double
×tamp);
439
440
double
getPositioningVelocity(
void
)
const
;
441
bool
getPowerState()
const
;
442
443
double
getTime()
const
;
444
void
getVelocity(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&velocity);
445
void
getVelocity(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&velocity,
double
×tamp);
446
447
vpColVector
getVelocity(
const
vpRobot::vpControlFrameType
frame);
448
vpColVector
getVelocity(
const
vpRobot::vpControlFrameType
frame,
double
×tamp);
449
450
void
get_cMe
(
vpHomogeneousMatrix
&cMe)
const
;
451
void
get_cVe
(
vpVelocityTwistMatrix
&cVe)
const
;
452
void
get_eJe
(
vpMatrix
&eJe) VP_OVERRIDE;
453
void
get_fJe
(
vpMatrix
&fJe) VP_OVERRIDE;
454
455
void
init
(
void
);
456
void
457
init
(
vpViper650::vpToolType
tool,
458
vpCameraParameters::vpCameraParametersProjType
projModel =
vpCameraParameters::perspectiveProjWithoutDistortion
);
459
void
init
(
vpViper650::vpToolType
tool,
const
std::string &filename);
460
void
init
(
vpViper650::vpToolType
tool,
const
vpHomogeneousMatrix
&eMc_);
461
462
void
move(
const
std::string &filename);
463
464
void
openGripper();
465
466
void
powerOn();
467
void
powerOff();
468
469
static
bool
readPosFile(
const
std::string &filename,
vpColVector
&q);
470
static
bool
savePosFile(
const
std::string &filename,
const
vpColVector
&q);
471
472
void
set_eMc
(
const
vpHomogeneousMatrix
&eMc_);
473
void
set_eMc
(
const
vpTranslationVector
&etc_,
const
vpRxyzVector
&erc_);
474
475
void
setMaxRotationVelocity
(
double
w_max);
476
void
setMaxRotationVelocityJoint6(
double
w6_max);
477
478
// Position control
479
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&position) VP_OVERRIDE;
480
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
double
pos1,
double
pos2,
double
pos3,
double
pos4,
481
double
pos5,
double
pos6);
482
void
setPosition
(
const
std::string &filename);
483
void
setPositioningVelocity(
double
velocity);
484
485
// State
486
vpRobot::vpRobotStateType
setRobotState
(
vpRobot::vpRobotStateType
newState);
487
// Velocity control
488
void
setVelocity
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&velocity) VP_OVERRIDE;
489
490
void
stopMotion();
491
492
private
:
493
double
m_maxRotationVelocity_joint6;
494
};
495
END_VISP_NAMESPACE
496
#endif
497
#endif
/* #ifndef vpRobotViper650_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
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
vpRobotViper650::m_defaultPositioningVelocity
static const double m_defaultPositioningVelocity
Definition
vpRobotViper650.h:377
vpRobotViper650::enableJoint6Limits
void enableJoint6Limits() const
Definition
vpRobotViper650.cpp:2498
vpRobotViper650::disableJoint6Limits
void disableJoint6Limits() const
Definition
vpRobotViper650.cpp:2520
vpRobotViper650::biasForceTorqueSensor
void biasForceTorqueSensor() const
Definition
vpRobotViper650.cpp:2362
vpRobotViper650::vpControlModeType
vpControlModeType
Definition
vpRobotViper650.h:367
vpRobotViper650::AUTO
@ AUTO
Automatic control mode (default).
Definition
vpRobotViper650.h:368
vpRobotViper650::MANUAL
@ MANUAL
Definition
vpRobotViper650.h:369
vpRobotViper650::ESTOP
@ ESTOP
Emergency stop activated.
Definition
vpRobotViper650.h:371
vpRobotViper650::closeGripper
void closeGripper() const
Definition
vpRobotViper650.cpp:2606
vpRobotViper650::getControlMode
vpControlModeType getControlMode() const
Definition
vpRobotViper650.h:427
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
vpViper650::init
void init(void)
Definition
vpViper650.cpp:131
vpViper650::vpToolType
vpToolType
List of possible tools that can be attached to the robot end-effector.
Definition
vpViper650.h:120
vpViper650::vpViper650
vpViper650()
Definition
vpViper650.cpp:98
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
vpRobotViper650.h
Generated by
1.17.0