Visual Servoing Platform  version 3.2.0 under development (2019-01-22)
vpVirtuose.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: Class which enables to project an image in the 3D space
32  * and get the view of a virtual camera.
33  *
34  * Authors:
35  * Fabien Spindler
36  *
37  *****************************************************************************/
38 
39 #ifndef _vpVirtuose_h_
40 #define _vpVirtuose_h_
41 
42 #include <ostream>
43 #include <visp3/core/vpConfig.h>
44 #include <visp3/core/vpException.h>
45 #include <visp3/core/vpPoseVector.h>
46 
47 #ifdef VISP_HAVE_VIRTUOSE
48 
49 #include <VirtuoseAPI.h>
50 
143 class VISP_EXPORT vpVirtuose
144 {
145 public:
146  vpVirtuose();
147  virtual ~vpVirtuose();
148 
149  void addForce(vpColVector &force);
150  void close();
151  void enableForceFeedback(int enable);
152 
153  vpColVector getArticularPosition() const;
154  vpColVector getArticularVelocity() const;
155  vpPoseVector getAvatarPosition() const;
156  vpPoseVector getBaseFrame() const;
157  VirtCommandType getCommandType() const;
158  bool getDeadMan() const;
159  bool getEmergencyStop() const;
160  unsigned int getJointsNumber() const;
161  vpColVector getForce() const;
162  VirtContext getHandler();
163  vpPoseVector getObservationFrame() const;
164  vpPoseVector getPhysicalPosition() const;
165  vpColVector getPhysicalVelocity() const;
166  vpPoseVector getPosition() const;
167  bool getPower() const;
168  vpColVector getVelocity() const;
169 
170  void init();
171 
172  void setArticularForce(const vpColVector &articularForce);
173  void setArticularPosition(const vpColVector &articularPosition);
174  void setArticularVelocity(const vpColVector &articularVelocity);
175  void setBaseFrame(const vpPoseVector &position);
176  void setCommandType(const VirtCommandType &type);
177  void setForce(const vpColVector &force);
178  void setForceFactor(const float &forceFactor);
179  void setIndexingMode(const VirtIndexingType &type);
182  inline void setIpAddress(const std::string &ip) { m_ip = ip; }
183  void setObservationFrame(const vpPoseVector &position);
184  void setPeriodicFunction(VirtPeriodicFunction CallBackVirt);
185  void setPosition(vpPoseVector &position);
186  void setPowerOff();
187  void setPowerOn();
188  void setSaturation(const float &forceLimit, const float &torqueLimit);
189  void setTimeStep(const float &timeStep);
190  void setVelocity(vpColVector &velocity);
191  void setVelocityFactor(const float &velocityFactor);
196  void setVerbose(bool mode) { m_verbose = mode; }
197 
198  void startPeriodicFunction();
199  void stopPeriodicFunction();
200 
201 protected:
202  VirtContext m_virtContext;
203  std::string m_ip;
204  bool m_verbose;
209  VirtCommandType m_typeCommand;
210  VirtIndexingType m_indexType;
211  bool m_is_init;
212  float m_period;
213  unsigned int m_njoints;
214 };
215 
216 #endif
217 #endif
int m_apiMinorVersion
Definition: vpVirtuose.h:206
VirtCommandType m_typeCommand
Definition: vpVirtuose.h:209
unsigned int m_njoints
Definition: vpVirtuose.h:213
VirtContext m_virtContext
Definition: vpVirtuose.h:202
VirtIndexingType m_indexType
Definition: vpVirtuose.h:210
bool m_verbose
Definition: vpVirtuose.h:204
bool m_is_init
Definition: vpVirtuose.h:211
int m_ctrlMinorVersion
Definition: vpVirtuose.h:208
void setVerbose(bool mode)
Definition: vpVirtuose.h:196
std::string m_ip
Definition: vpVirtuose.h:203
void setIpAddress(const std::string &ip)
Definition: vpVirtuose.h:182
Implementation of column vector and the associated operations.
Definition: vpColVector.h:72
float m_period
Definition: vpVirtuose.h:212
Implementation of a pose vector and operations on poses.
Definition: vpPoseVector.h:92
int m_apiMajorVersion
Definition: vpVirtuose.h:205
int m_ctrlMajorVersion
Definition: vpVirtuose.h:207