Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpReflexTakktile2.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 Reflex Takktile 2 hand from Right Hand Robotics.
32 */
33
34#ifndef _vpReflexTakktile2_h_
35#define _vpReflexTakktile2_h_
36
37#include <visp3/core/vpConfig.h>
38#ifdef VISP_HAVE_TAKKTILE2
39
40#include <string>
41#include <vector>
42
43#include <visp3/core/vpColVector.h>
44
65class VISP_EXPORT vpReflexTakktile2
66{
67public:
69 {
70 public:
71 std::vector<float> proximal;
72 std::vector<float> distal_approx;
73 std::vector<std::vector<int> > pressure;
74 std::vector<std::vector<bool> > contact;
75
76 std::vector<float> joint_angle;
77 std::vector<float> raw_angle;
78 std::vector<float> velocity;
79 std::vector<float> load;
80 std::vector<float> voltage;
81
82 std::vector<uint32_t> temperature;
83 std::vector<std::string> error_state;
84
85 HandInfo();
87
88 friend VISP_EXPORT std::ostream &operator<<(std::ostream &os, const HandInfo &hand);
89 };
90
92 virtual ~vpReflexTakktile2();
93
94 void calibrate();
95
96 void disableTorque();
97
98 HandInfo getHandInfo();
99
100 int getNumFingers() const;
101 int getNumSensorsPerFinger() const;
102 int getNumServos() const;
103
104 vpColVector getPosition() const;
105 vpColVector getVelocity() const;
106
107 void open();
108
113 void setFingerConfigFile(const std::string &finger_file_name) { m_finger_file_name = finger_file_name; }
114
119 void setMotorConfigFile(const std::string &motor_file_name) { m_motor_file_name = motor_file_name; }
120
126 void setNetworkInterface(const std::string &network_interface = "eth0") { m_network_interface = network_interface; }
127
128 void setPosition(const vpColVector &targets);
129
134 void setTactileConfigFile(const std::string &tactile_file_name) { m_tactile_file_name = tactile_file_name; }
135
136 void setTactileThreshold(int threshold);
137 void setTactileThreshold(const std::vector<int> &thresholds);
138
139 void setPositioningVelocity(const vpColVector &targets);
140 void setVelocityUntilAnyContact(const vpColVector &targets);
141 void setVelocityUntilEachContact(const vpColVector &targets);
142
143 void wait(int milliseconds);
144
145protected:
149 std::string m_motor_file_name;
151
152private:
153 // Implementation
154 class Impl;
155 Impl *m_impl;
156};
157END_VISP_NAMESPACE
158#endif
159#endif
Implementation of column vector and the associated operations.
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 > 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)