Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpRobotPtu46.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 ptu-46 robot.
32 */
33
34#include <visp3/core/vpConfig.h>
35#ifdef VISP_HAVE_PTU46
36
37#ifndef _vpRobotPtu46_h_
38#define _vpRobotPtu46_h_
39
40/* ------------------------------------------------------------------------ */
41/* --- INCLUDES ----------------------------------------------------------- */
42/* ------------------------------------------------------------------------ */
43
44/* --- GENERAL --- */
45#include <iostream>
46#include <stdio.h>
47
48/* --- ViSP --- */
49#include <visp3/core/vpColVector.h>
50#include <visp3/core/vpDebug.h>
51#include <visp3/core/vpVelocityTwistMatrix.h>
52#include <visp3/robot/vpPtu46.h>
53#include <visp3/robot/vpRobot.h>
54
55#include <ptu.h> // Contrib for Ptu-46 robot
56
57/* ------------------------------------------------------------------------ */
58/* --- CLASS ------------------------------------------------------------- */
59/* ------------------------------------------------------------------------ */
75class VISP_EXPORT vpRobotPtu46 : public vpPtu46, public vpRobot
76{
77
78private:
80 vpRobotPtu46(const vpRobotPtu46 &ass);
81
83 Ptu ptu;
84
85private:
86 static bool robotAlreadyCreated;
87 double positioningVelocity;
88 int velocityMesureTempo;
89 std::string device;
90
91public:
92 static const double defaultPositioningVelocity;
93
94 VP_EXPLICIT vpRobotPtu46(const std::string &device = "/dev/ttyS0");
95 VP_EXPLICIT vpRobotPtu46(vpRobotPtu46 *pub);
96 virtual ~vpRobotPtu46(void);
97
98 void get_cMe(vpHomogeneousMatrix &_cMe) const;
99 void get_cVe(vpVelocityTwistMatrix &_cVe) const;
100 void get_eJe(vpMatrix &_eJe) VP_OVERRIDE;
101 void get_fJe(vpMatrix &_fJe) VP_OVERRIDE;
102
104 void getPosition(const vpRobot::vpControlFrameType frame, vpColVector &q) VP_OVERRIDE;
105 double getPositioningVelocity(void);
106 void getVelocity(const vpRobot::vpControlFrameType frame, vpColVector &q_dot);
108
109 void init(void);
110
111 bool readPositionFile(const std::string &filename, vpColVector &q);
112
113 void setPosition(const vpRobot::vpControlFrameType frame, const vpColVector &q) VP_OVERRIDE;
114 void setPosition(const vpRobot::vpControlFrameType frame, const double &q1, const double &q2);
115 void setPosition(const char *filename);
116 void setPositioningVelocity(double velocity);
118
119 void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &q_dot) VP_OVERRIDE;
120
121 void stopMotion();
122};
123END_VISP_NAMESPACE
124#endif /* #ifndef _vpRobotPtu46_h_ */
125
126#endif
Implementation of column vector and the associated operations.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a matrix and operations on matrices.
Definition vpMatrix.h:175
vpPtu46(void)
Definition vpPtu46.cpp:153
void get_cVe(vpVelocityTwistMatrix &_cVe) const
Definition vpPtu46.cpp:189
void init(void)
Definition vpPtu46.cpp:162
void get_cMe(vpHomogeneousMatrix &_cMe) const
Definition vpPtu46.cpp:206
void get_fJe(const vpColVector &q, vpMatrix &fJe) const
Definition vpPtu46.cpp:274
void get_eJe(const vpColVector &q, vpMatrix &eJe) const
Definition vpPtu46.cpp:245
void setPositioningVelocity(double velocity)
double getPositioningVelocity(void)
void getVelocity(const vpRobot::vpControlFrameType frame, vpColVector &q_dot)
static const double defaultPositioningVelocity
VP_EXPLICIT vpRobotPtu46(vpRobotPtu46 *pub)
bool readPositionFile(const std::string &filename, vpColVector &q)
vpControlFrameType
Definition vpRobot.h:74
virtual void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)=0
virtual void getPosition(const vpRobot::vpControlFrameType frame, vpColVector &position)=0
Get the robot position (frame has to be specified).
vpRobotStateType
Definition vpRobot.h:62
virtual vpRobotStateType setRobotState(const vpRobot::vpRobotStateType newState)
Definition vpRobot.cpp:200
virtual void getDisplacement(const vpRobot::vpControlFrameType frame, vpColVector &q)=0
vpRobot(void)
Definition vpRobot.cpp:49
virtual void setPosition(const vpRobot::vpControlFrameType frame, const vpColVector &q)=0
Set a displacement (frame has to be specified) in position control.