Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpRobot.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
* Generic virtual robot.
32
*/
33
38
39
#ifndef vpRobot_H
40
#define vpRobot_H
41
42
#include <visp3/core/vpColVector.h>
43
#include <visp3/core/vpConfig.h>
44
#include <visp3/core/vpHomogeneousMatrix.h>
45
#include <visp3/core/vpMatrix.h>
46
#include <visp3/core/vpPoseVector.h>
47
48
BEGIN_VISP_NAMESPACE
55
class
VISP_EXPORT
vpRobot
56
{
57
public
:
61
typedef
enum
62
{
63
STATE_STOP
,
64
STATE_VELOCITY_CONTROL
,
65
STATE_POSITION_CONTROL
,
66
STATE_ACCELERATION_CONTROL
,
67
STATE_FORCE_TORQUE_CONTROL
68
} vpRobotStateType;
69
73
typedef
enum
74
{
75
REFERENCE_FRAME
,
77
ARTICULAR_FRAME
,
79
JOINT_STATE
=
ARTICULAR_FRAME
,
80
END_EFFECTOR_FRAME
,
81
CAMERA_FRAME
,
83
TOOL_FRAME
=
CAMERA_FRAME
,
85
MIXT_FRAME
88
} vpControlFrameType;
89
90
private
:
/* Membres privees */
91
vpRobot::vpRobotStateType
stateRobot;
92
vpRobot::vpControlFrameType
frameRobot;
93
94
protected
:
95
double
maxTranslationVelocity
;
96
static
const
double
maxTranslationVelocityDefault
;
// = 0.2;
97
double
maxRotationVelocity
;
98
static
const
double
maxRotationVelocityDefault
;
// = 0.7;
99
101
int
nDof
;
103
vpMatrix
eJe
;
105
int
eJeAvailable
;
107
vpMatrix
fJe
;
109
int
fJeAvailable
;
110
111
int
areJointLimitsAvailable
;
112
double
*
qmin
;
113
double
*
qmax
;
114
115
bool
verbose_
;
116
117
public
:
118
vpRobot
(
void
);
119
vpRobot
(
const
vpRobot
&robot);
120
virtual
~vpRobot
();
121
124
125
//---------- Jacobian -----------------------------
127
virtual
void
get_eJe
(
vpMatrix
&_eJe) = 0;
130
virtual
void
get_fJe
(
vpMatrix
&_fJe) = 0;
131
134
virtual
void
getDisplacement
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&q) = 0;
135
136
double
getMaxTranslationVelocity
(
void
)
const
;
137
double
getMaxRotationVelocity
(
void
)
const
;
138
142
int
getNDof
()
const
143
{
144
return
nDof
;
145
}
146
148
virtual
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&position) = 0;
149
150
// Return the robot position (frame has to be specified).
151
vpColVector
getPosition
(
const
vpRobot::vpControlFrameType
frame);
152
virtual
vpRobotStateType
getRobotState
(
void
)
const
{
return
stateRobot; }
153
154
virtual
void
init
() = 0;
155
156
vpRobot
&
operator=
(
const
vpRobot
&robot);
157
158
void
setMaxRotationVelocity
(
double
maxVr);
159
void
setMaxTranslationVelocity
(
double
maxVt);
161
virtual
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&q) = 0;
162
virtual
vpRobotStateType
setRobotState
(
const
vpRobot::vpRobotStateType
newState);
163
166
virtual
void
setVelocity
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&vel) = 0;
167
inline
void
setVerbose
(
bool
verbose) {
verbose_
= verbose; }
168
170
173
static
vpColVector
saturateVelocities(
const
vpColVector
&v_in,
const
vpColVector
&v_max,
bool
verbose =
false
);
175
176
protected
:
179
vpControlFrameType setRobotFrame(
vpRobot::vpControlFrameType
newFrame);
180
vpControlFrameType
getRobotFrame
(
void
)
const
{
return
frameRobot; }
182
};
183
END_VISP_NAMESPACE
184
#endif
vpColVector
Implementation of column vector and the associated operations.
Definition
vpColVector.h:191
vpMatrix
Implementation of a matrix and operations on matrices.
Definition
vpMatrix.h:175
vpRobot::nDof
int nDof
number of degrees of freedom
Definition
vpRobot.h:101
vpRobot::eJe
vpMatrix eJe
robot Jacobian expressed in the end-effector frame
Definition
vpRobot.h:103
vpRobot::operator=
vpRobot & operator=(const vpRobot &robot)
Definition
vpRobot.cpp:81
vpRobot::setVerbose
void setVerbose(bool verbose)
Definition
vpRobot.h:167
vpRobot::getRobotState
virtual vpRobotStateType getRobotState(void) const
Definition
vpRobot.h:152
vpRobot::qmin
double * qmin
Definition
vpRobot.h:112
vpRobot::vpControlFrameType
vpControlFrameType
Definition
vpRobot.h:74
vpRobot::REFERENCE_FRAME
@ REFERENCE_FRAME
Definition
vpRobot.h:75
vpRobot::ARTICULAR_FRAME
@ ARTICULAR_FRAME
Definition
vpRobot.h:77
vpRobot::JOINT_STATE
@ JOINT_STATE
Definition
vpRobot.h:79
vpRobot::TOOL_FRAME
@ TOOL_FRAME
Definition
vpRobot.h:83
vpRobot::MIXT_FRAME
@ MIXT_FRAME
Definition
vpRobot.h:85
vpRobot::CAMERA_FRAME
@ CAMERA_FRAME
Definition
vpRobot.h:81
vpRobot::END_EFFECTOR_FRAME
@ END_EFFECTOR_FRAME
Definition
vpRobot.h:80
vpRobot::maxRotationVelocityDefault
static const double maxRotationVelocityDefault
Definition
vpRobot.h:98
vpRobot::get_eJe
virtual void get_eJe(vpMatrix &_eJe)=0
Get the robot Jacobian expressed in the end-effector frame.
vpRobot::setVelocity
virtual void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)=0
vpRobot::getRobotFrame
vpControlFrameType getRobotFrame(void) const
Definition
vpRobot.h:180
vpRobot::qmax
double * qmax
Definition
vpRobot.h:113
vpRobot::areJointLimitsAvailable
int areJointLimitsAvailable
Definition
vpRobot.h:111
vpRobot::getPosition
virtual void getPosition(const vpRobot::vpControlFrameType frame, vpColVector &position)=0
Get the robot position (frame has to be specified).
vpRobot::fJeAvailable
int fJeAvailable
is the robot Jacobian expressed in the robot reference frame available
Definition
vpRobot.h:109
vpRobot::vpRobotStateType
vpRobotStateType
Definition
vpRobot.h:62
vpRobot::STATE_POSITION_CONTROL
@ STATE_POSITION_CONTROL
Initialize the position controller.
Definition
vpRobot.h:65
vpRobot::STATE_VELOCITY_CONTROL
@ STATE_VELOCITY_CONTROL
Initialize the velocity controller.
Definition
vpRobot.h:64
vpRobot::STATE_ACCELERATION_CONTROL
@ STATE_ACCELERATION_CONTROL
Initialize the acceleration controller.
Definition
vpRobot.h:66
vpRobot::STATE_STOP
@ STATE_STOP
Stops robot motion especially in velocity and acceleration control.
Definition
vpRobot.h:63
vpRobot::STATE_FORCE_TORQUE_CONTROL
@ STATE_FORCE_TORQUE_CONTROL
Initialize the force/torque controller.
Definition
vpRobot.h:67
vpRobot::maxTranslationVelocityDefault
static const double maxTranslationVelocityDefault
Definition
vpRobot.h:96
vpRobot::getMaxRotationVelocity
double getMaxRotationVelocity(void) const
Definition
vpRobot.cpp:272
vpRobot::fJe
vpMatrix fJe
robot Jacobian expressed in the robot reference frame available
Definition
vpRobot.h:107
vpRobot::setRobotState
virtual vpRobotStateType setRobotState(const vpRobot::vpRobotStateType newState)
Definition
vpRobot.cpp:200
vpRobot::init
virtual void init()=0
vpRobot::get_fJe
virtual void get_fJe(vpMatrix &_fJe)=0
vpRobot::maxTranslationVelocity
double maxTranslationVelocity
Definition
vpRobot.h:95
vpRobot::eJeAvailable
int eJeAvailable
is the robot Jacobian expressed in the end-effector frame available
Definition
vpRobot.h:105
vpRobot::getDisplacement
virtual void getDisplacement(const vpRobot::vpControlFrameType frame, vpColVector &q)=0
vpRobot::getMaxTranslationVelocity
double getMaxTranslationVelocity(void) const
Definition
vpRobot.cpp:250
vpRobot::vpRobot
vpRobot(void)
Definition
vpRobot.cpp:49
vpRobot::maxRotationVelocity
double maxRotationVelocity
Definition
vpRobot.h:97
vpRobot::setMaxRotationVelocity
void setMaxRotationVelocity(double maxVr)
Definition
vpRobot.cpp:259
vpRobot::setMaxTranslationVelocity
void setMaxTranslationVelocity(double maxVt)
Definition
vpRobot.cpp:238
vpRobot::verbose_
bool verbose_
Definition
vpRobot.h:115
vpRobot::setPosition
virtual void setPosition(const vpRobot::vpControlFrameType frame, const vpColVector &q)=0
Set a displacement (frame has to be specified) in position control.
vpRobot::getNDof
int getNDof() const
Definition
vpRobot.h:142
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
robot
include
visp3
robot
vpRobot.h
Generated by
1.17.0