Visual Servoing Platform version 3.7.0
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
63class VISP_EXPORT vpRobotPololuPtu : public vpRobot
64{
65public:
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
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
229
230private:
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};
271END_VISP_NAMESPACE
272#endif
273#endif
Implementation of column vector and the associated operations.
Implementation of a matrix and operations on matrices.
Definition vpMatrix.h:175
float getPositioningVelocityPercentage() const
vpRobotPololuPtu(const std::string &device="/dev/ttyACM0", int baudrate=9600, bool verbose=false)
float getAngularVelocityResolution() const
void setVerbose(bool verbose)
void setPositioningVelocityPercentage(float positioning_velocity_percentage)
vpMatrix eJe
robot Jacobian expressed in the end-effector frame
Definition vpRobot.h:103
vpControlFrameType
Definition vpRobot.h:74
virtual void get_eJe(vpMatrix &_eJe)=0
Get the robot Jacobian expressed in the end-effector frame.
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
vpMatrix fJe
robot Jacobian expressed in the robot reference frame available
Definition vpRobot.h:107
virtual vpRobotStateType setRobotState(const vpRobot::vpRobotStateType newState)
Definition vpRobot.cpp:200
virtual void init()=0
virtual void get_fJe(vpMatrix &_fJe)=0
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.