Visual Servoing Platform version 3.5.0
vpReflexTakktile2.h
1/****************************************************************************
2 *
3 * ViSP, open source Visual Servoing Platform software.
4 * Copyright (C) 2005 - 2019 by Inria. All rights reserved.
5 *
6 * This software is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 * See the file LICENSE.txt at the root directory of this source
11 * distribution for additional information about the GNU GPL.
12 *
13 * For using ViSP with software that can not be combined with the GNU
14 * GPL, please contact Inria about acquiring a ViSP Professional
15 * Edition License.
16 *
17 * See http://visp.inria.fr for more information.
18 *
19 * This software was developed at:
20 * Inria Rennes - Bretagne Atlantique
21 * Campus Universitaire de Beaulieu
22 * 35042 Rennes Cedex
23 * France
24 *
25 * If you have questions regarding the use of this file, please contact
26 * Inria at visp@inria.fr
27 *
28 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30 *
31 * Description:
32 * Interface for the Reflex Takktile 2 hand from Right Hand Robotics.
33 *
34 * Authors:
35 * Fabien Spindler
36 *
37 *****************************************************************************/
38
39#ifndef _vpReflexTakktile2_h_
40#define _vpReflexTakktile2_h_
41
42#include <visp3/core/vpConfig.h>
43#ifdef VISP_HAVE_TAKKTILE2
44
45#include <string>
46#include <vector>
47
48#include <visp3/core/vpColVector.h>
49
69class VISP_EXPORT vpReflexTakktile2
70{
71public:
73 {
74 public:
75 std::vector<float> proximal;
76 std::vector<float> distal_approx;
77 std::vector<std::vector<int> > pressure;
78 std::vector<std::vector<bool> > contact;
79
80 std::vector<float> joint_angle;
81 std::vector<float> raw_angle;
82 std::vector<float> velocity;
83 std::vector<float> load;
84 std::vector<float> voltage;
85
86 std::vector<uint32_t> temperature;
87 std::vector<std::string> error_state;
88
89 HandInfo();
91
92 friend VISP_EXPORT std::ostream &operator<<(std::ostream &os, const HandInfo &hand);
93 };
94
96 virtual ~vpReflexTakktile2();
97
98 void calibrate();
99
100 void disableTorque();
101
102 HandInfo getHandInfo();
103
104 int getNumFingers() const;
105 int getNumSensorsPerFinger() const;
106 int getNumServos() const;
107
108 vpColVector getPosition() const;
109 vpColVector getVelocity() const;
110
111 void open();
112
117 void setFingerConfigFile(const std::string &finger_file_name) { m_finger_file_name = finger_file_name; }
118
123 void setMotorConfigFile(const std::string &motor_file_name) { m_motor_file_name = motor_file_name; }
124
130 void setNetworkInterface(const std::string &network_interface = "eth0") { m_network_interface = network_interface; }
131
132 void setPosition(const vpColVector &targets);
133
138 void setTactileConfigFile(const std::string &tactile_file_name) { m_tactile_file_name = tactile_file_name; }
139
140 void setTactileThreshold(int threshold);
141 void setTactileThreshold(const std::vector<int> &thresholds);
142
143 void setPositioningVelocity(const vpColVector &targets);
144 void setVelocityUntilAnyContact(const vpColVector &targets);
145 void setVelocityUntilEachContact(const vpColVector &targets);
146
147 void wait(int milliseconds);
148
149protected:
153 std::string m_motor_file_name;
155
156private:
157 // Implementation
158 class Impl;
159 Impl *m_impl;
160};
161
162#endif
163#endif
Implementation of column vector and the associated operations.
Definition: vpColVector.h:131
std::vector< uint32_t > temperature
std::vector< float > joint_angle
std::vector< std::vector< bool > > contact
std::vector< std::vector< int > > pressure
std::vector< std::string > error_state
std::vector< float > load
std::vector< float > raw_angle
std::vector< float > proximal
std::vector< float > voltage
std::vector< float > distal_approx
std::vector< float > velocity
std::string m_finger_file_name
std::string m_tactile_file_name
std::string m_network_interface
void setMotorConfigFile(const std::string &motor_file_name)
void setTactileConfigFile(const std::string &tactile_file_name)
void setNetworkInterface(const std::string &network_interface="eth0")
std::string m_motor_file_name
void setFingerConfigFile(const std::string &finger_file_name)