Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpRobotPololuPtu.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
* Common features for Pololu Maestro PanTiltUnit.
32
*/
33
34
#ifndef _vpRobotPololuPtu_h_
35
#define _vpRobotPololuPtu_h_
36
37
#include <visp3/core/vpConfig.h>
38
39
#if defined(VISP_HAVE_POLOLU) && defined(VISP_HAVE_THREADS)
40
41
#include <visp3/robot/vpRobot.h>
42
#include <visp3/robot/vpPololu.h>
43
44
BEGIN_VISP_NAMESPACE
63
class
VISP_EXPORT
vpRobotPololuPtu
:
public
vpRobot
64
{
65
public
:
73
vpRobotPololuPtu
(
const
std::string &device =
"/dev/ttyACM0"
,
int
baudrate = 9600,
bool
verbose =
false
);
74
78
~vpRobotPololuPtu
() VP_OVERRIDE;
79
89
void
get_eJe
(
vpMatrix
&
eJe
) VP_OVERRIDE;
90
102
void
get_eJe
(
const
vpColVector
&q,
vpMatrix
&
eJe
)
const
;
103
110
void
get_fJe
(
vpMatrix
&
fJe
) VP_OVERRIDE;
111
120
void
get_fJe
(
const
vpColVector
&q,
vpMatrix
&
fJe
)
const
;
121
126
float
getAngularVelocityResolution
()
const
;
127
139
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&q) VP_OVERRIDE;
140
149
float
getPositioningVelocityPercentage
()
const
150
{
151
return
m_positioning_velocity_percentage;
152
}
153
168
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&q) VP_OVERRIDE;
169
178
void
setPositioningVelocityPercentage
(
float
positioning_velocity_percentage)
179
{
180
m_positioning_velocity_percentage = positioning_velocity_percentage;
181
}
182
188
void
setVerbose
(
bool
verbose)
189
{
190
m_verbose = verbose;
191
}
192
217
void
setVelocity
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&q_dot) VP_OVERRIDE;
218
222
void
stopVelocity();
223
228
vpRobot::vpRobotStateType
setRobotState
(
const
vpRobot::vpRobotStateType
newState) VP_OVERRIDE;
229
230
private
:
237
void
init
() VP_OVERRIDE { }
238
259
void
getDisplacement
(
const
vpRobot::vpControlFrameType
frame, vpColVector &d) VP_OVERRIDE
260
{
261
(void)frame;
262
(void)d;
263
};
264
265
vpPololu m_pan;
266
vpPololu m_tilt;
267
float
m_positioning_velocity_percentage;
268
269
bool
m_verbose;
270
};
271
END_VISP_NAMESPACE
272
#endif
273
#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
vpRobotPololuPtu::getPositioningVelocityPercentage
float getPositioningVelocityPercentage() const
Definition
vpRobotPololuPtu.h:149
vpRobotPololuPtu::vpRobotPololuPtu
vpRobotPololuPtu(const std::string &device="/dev/ttyACM0", int baudrate=9600, bool verbose=false)
Definition
vpRobotPololuPtu.cpp:44
vpRobotPololuPtu::getAngularVelocityResolution
float getAngularVelocityResolution() const
Definition
vpRobotPololuPtu.cpp:117
vpRobotPololuPtu::setVerbose
void setVerbose(bool verbose)
Definition
vpRobotPololuPtu.h:188
vpRobotPololuPtu::setPositioningVelocityPercentage
void setPositioningVelocityPercentage(float positioning_velocity_percentage)
Definition
vpRobotPololuPtu.h:178
vpRobot::eJe
vpMatrix eJe
robot Jacobian expressed in the end-effector frame
Definition
vpRobot.h:103
vpRobot::vpControlFrameType
vpControlFrameType
Definition
vpRobot.h:74
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::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::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::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.
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
robot
include
visp3
robot
vpRobotPololuPtu.h
Generated by
1.17.0