Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpRobotAfma6.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 Afma6 robot controlled by an Adept MotionBlox.
32
*/
33
34
#ifndef vpRobotAfma6_h
35
#define vpRobotAfma6_h
36
37
#include <visp3/core/vpConfig.h>
38
39
#ifdef VISP_HAVE_AFMA6
40
41
#include <iostream>
42
#include <stdio.h>
43
44
#include <visp3/core/vpColVector.h>
45
#include <visp3/core/vpDebug.h>
46
#include <visp3/core/vpPoseVector.h>
47
#include <visp3/robot/vpAfma6.h>
48
#include <visp3/robot/vpRobot.h>
49
50
// low level controller api
51
extern
"C"
{
52
#include "irisa_Afma6.h"
53
#include "trycatch.h"
54
}
55
56
BEGIN_VISP_NAMESPACE
209
class
VISP_EXPORT vpRobotAfma6 :
public
vpAfma6
,
public
vpRobot
210
{
211
212
private
:
/* Not allowed functions. */
216
vpRobotAfma6(
const
vpRobotAfma6 &robot);
217
218
private
:
/* Attributs prives. */
228
static
bool
robotAlreadyCreated;
229
230
double
positioningVelocity;
231
232
// Variables used to compute the measured velocities (see getVelocity() )
233
vpColVector
q_prev_getvel;
234
vpHomogeneousMatrix
fMc_prev_getvel;
235
double
time_prev_getvel;
236
bool
first_time_getvel;
237
238
// Variables used to compute the measured displacement (see
239
// getDisplacement() )
240
vpColVector
q_prev_getdis;
241
bool
first_time_getdis;
242
vpHomogeneousMatrix
fMc_prev_getdis;
243
244
public
:
/* Constantes */
245
/* Vitesse maximale par default lors du positionnement du robot.
246
* C'est la valeur a la construction de l'attribut prive \a
247
* positioningVelocity. Cette valeur peut etre changee par la fonction
248
* #setPositioningVelocity.
249
*/
250
static
const
double
defaultPositioningVelocity
;
// = 20.0;
251
252
public
:
/* Methode publiques */
253
VP_EXPLICIT vpRobotAfma6(
bool
verbose =
true
);
254
virtual
~vpRobotAfma6(
void
);
255
256
bool
checkJointLimits
(
vpColVector
&jointsStatus);
257
258
void
closeGripper
();
259
260
void
getDisplacement
(
vpRobot::vpControlFrameType
frame,
vpColVector
&displacement);
261
262
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&position) VP_OVERRIDE;
263
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&position,
double
×tamp);
264
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpPoseVector
&position);
265
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpPoseVector
&position,
double
×tamp);
266
267
double
getPositioningVelocity
(
void
);
268
bool
getPowerState
();
269
double
getTime
()
const
;
270
271
void
getVelocity
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&velocity);
272
void
getVelocity
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&velocity,
double
×tamp);
273
274
vpColVector
getVelocity
(
const
vpRobot::vpControlFrameType
frame);
275
vpColVector
getVelocity
(
const
vpRobot::vpControlFrameType
frame,
double
×tamp);
276
277
void
get_cMe
(
vpHomogeneousMatrix
&_cMe)
const
;
278
void
get_cVe
(
vpVelocityTwistMatrix
&_cVe)
const
;
279
void
get_eJe
(
vpMatrix
&_eJe) VP_OVERRIDE;
280
void
get_fJe
(
vpMatrix
&_fJe) VP_OVERRIDE;
281
282
void
init
(
void
);
283
void
init
(
vpAfma6::vpAfma6ToolType
tool,
const
vpHomogeneousMatrix
&eMc);
284
void
init
(
vpAfma6::vpAfma6ToolType
tool,
const
std::string &filename);
285
void
286
init
(
vpAfma6::vpAfma6ToolType
tool,
287
vpCameraParameters::vpCameraParametersProjType
projModel
=
vpCameraParameters::perspectiveProjWithoutDistortion
);
288
289
void
move
(
const
std::string &filename);
290
void
move
(
const
std::string &filename,
double
velocity);
291
292
void
openGripper
();
293
294
void
powerOn
();
295
void
powerOff
();
296
297
static
bool
readPosFile
(
const
std::string &filename,
vpColVector
&q);
298
static
bool
savePosFile
(
const
std::string &filename,
const
vpColVector
&q);
299
300
/* --- POSITIONNEMENT --------------------------------------------------- */
301
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
const
vpPoseVector
&pose);
302
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&position) VP_OVERRIDE;
303
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
double
pos1,
double
pos2,
double
pos3,
double
pos4,
304
double
pos5,
double
pos6);
305
void
setPosition
(
const
std::string &filename);
306
void
setPositioningVelocity
(
double
velocity);
307
void
set_eMc
(
const
vpHomogeneousMatrix
&eMc);
308
309
/* --- ETAT ------------------------------------------------------------- */
310
311
vpRobot::vpRobotStateType
setRobotState
(
vpRobot::vpRobotStateType
newState);
312
313
/* --- VITESSE ---------------------------------------------------------- */
314
315
void
setVelocity
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&velocity) VP_OVERRIDE;
316
317
void
stopMotion
();
318
};
319
END_VISP_NAMESPACE
320
#endif
321
#endif
/* #ifndef vpRobotAfma6_h */
vpAfma6::set_eMc
virtual void set_eMc(const vpHomogeneousMatrix &eMc)
Definition
vpAfma6.cpp:1189
vpAfma6::get_cVe
void get_cVe(vpVelocityTwistMatrix &cVe) const
Definition
vpAfma6.cpp:912
vpAfma6::init
void init(void)
Definition
vpAfma6.cpp:155
vpAfma6::get_cMe
void get_cMe(vpHomogeneousMatrix &cMe) const
Definition
vpAfma6.cpp:890
vpAfma6::vpAfma6
vpAfma6()
Definition
vpAfma6.cpp:117
vpAfma6::projModel
vpCameraParameters::vpCameraParametersProjType projModel
Definition
vpAfma6.h:213
vpAfma6::get_eJe
void get_eJe(const vpColVector &q, vpMatrix &eJe) const
Definition
vpAfma6.cpp:934
vpAfma6::get_fJe
void get_fJe(const vpColVector &q, vpMatrix &fJe) const
Definition
vpAfma6.cpp:1004
vpAfma6::vpAfma6ToolType
vpAfma6ToolType
List of possible tools that can be attached to the robot end-effector.
Definition
vpAfma6.h:124
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
vpRobotAfma6::powerOff
void powerOff()
Definition
vpRobotAfma6.cpp:740
vpRobotAfma6::checkJointLimits
bool checkJointLimits(vpColVector &jointsStatus)
Definition
vpRobotAfma6.cpp:2304
vpRobotAfma6::savePosFile
static bool savePosFile(const std::string &filename, const vpColVector &q)
Definition
vpRobotAfma6.cpp:2093
vpRobotAfma6::openGripper
void openGripper()
Definition
vpRobotAfma6.cpp:2166
vpRobotAfma6::getVelocity
void getVelocity(const vpRobot::vpControlFrameType frame, vpColVector &velocity)
Definition
vpRobotAfma6.cpp:1888
vpRobotAfma6::getTime
double getTime() const
Definition
vpRobotAfma6.cpp:1514
vpRobotAfma6::defaultPositioningVelocity
static const double defaultPositioningVelocity
Definition
vpRobotAfma6.h:250
vpRobotAfma6::getPositioningVelocity
double getPositioningVelocity(void)
Definition
vpRobotAfma6.cpp:937
vpRobotAfma6::move
void move(const std::string &filename)
Definition
vpRobotAfma6.cpp:2128
vpRobotAfma6::getPowerState
bool getPowerState()
Definition
vpRobotAfma6.cpp:774
vpRobotAfma6::setPositioningVelocity
void setPositioningVelocity(double velocity)
Definition
vpRobotAfma6.cpp:930
vpRobotAfma6::closeGripper
void closeGripper()
Definition
vpRobotAfma6.cpp:2185
vpRobotAfma6::stopMotion
void stopMotion()
Definition
vpRobotAfma6.cpp:648
vpRobotAfma6::readPosFile
static bool readPosFile(const std::string &filename, vpColVector &q)
Definition
vpRobotAfma6.cpp:2009
vpRobotAfma6::powerOn
void powerOn()
Definition
vpRobotAfma6.cpp:670
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::setPosition
virtual void setPosition(const vpRobot::vpControlFrameType frame, const vpColVector &q)=0
Set a displacement (frame has to be specified) in position control.
vpVelocityTwistMatrix
Definition
vpVelocityTwistMatrix.h:175
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
robot
include
visp3
robot
vpRobotAfma6.h
Generated by
1.17.0