Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
vpVirtuose.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
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 http://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: Class which enables to project an image in the 3D space
31  * and get the view of a virtual camera.
32  *
33  * Authors:
34  * Fabien Spindler
35  *
36  *****************************************************************************/
37 
38 #ifndef __vpVirtuose_h_
39 #define __vpVirtuose_h_
40 
41 #include <ostream>
42 #include <visp3/core/vpConfig.h>
43 #include <visp3/core/vpException.h>
44 #include <visp3/core/vpPoseVector.h>
45 
46 #ifdef VISP_HAVE_VIRTUOSE
47 
48 #include <VirtuoseAPI.h>
49 
50 
133 class VISP_EXPORT vpVirtuose
134 {
135 public:
136  vpVirtuose();
137  ~vpVirtuose();
138 
139  void addForce (vpColVector &force);
140  void enableForceFeedback (int enable);
141 
142  vpColVector getArticularPosition() const;
143  vpColVector getArticularVelocity() const;
144  vpPoseVector getAvatarPosition() const ;
145  vpPoseVector getBaseFrame() const;
146  VirtCommandType getCommandType() const;
147  bool getDeadMan() const;
148  bool getEmergencyStop() const;
149  vpColVector getForce() const;
150  VirtContext getHandler();
151  vpPoseVector getObservationFrame() const;
152  vpPoseVector getPhysicalPosition() const;
153  vpColVector getPhysicalVelocity() const;
154  vpPoseVector getPosition() const;
155  bool getPower() const;
156  vpColVector getVelocity() const;
157 
158  void init();
159 
160  void setArticularForce(const vpColVector &articularForce);
161  void setArticularPosition(const vpColVector &articularPosition);
162  void setArticularVelocity(const vpColVector &articularVelocity);
163  void setBaseFrame (const vpPoseVector &position);
164  void setCommandType(const VirtCommandType &type);
165  void setForce(const vpColVector &force);
166  void setForceFactor (const float &forceFactor);
167  void setIndexingMode (const VirtIndexingType &type) ;
169  inline void setIpAddress(const std::string &ip) {m_ip = ip;}
170  void setObservationFrame (const vpPoseVector &position);
171  void setPeriodicFunction(VirtPeriodicFunction CallBackVirt);
172  void setPosition(vpPoseVector &position);
173  void setPowerOff();
174  void setPowerOn();
175  void setSaturation(const float &forceLimit, const float &torqueLimit);
176  void setTimeStep(const float &timeStep);
177  void setVelocity(vpColVector &velocity);
178  void setVelocityFactor(const float &velocityFactor);
183  void setVerbose(bool mode) {m_verbose = mode;}
184 
185  void startPeriodicFunction();
186  void stopPeriodicFunction();
187 
188 protected:
189  VirtContext m_virtContext;
190  std::string m_ip;
191  bool m_verbose;
196  VirtCommandType m_typeCommand;
197  VirtIndexingType m_indexType;
198  bool m_is_init;
199  float m_period;
200 };
201 
202 #endif
203 #endif
int m_apiMinorVersion
Definition: vpVirtuose.h:193
VirtCommandType m_typeCommand
Definition: vpVirtuose.h:196
VirtContext m_virtContext
Definition: vpVirtuose.h:189
VirtIndexingType m_indexType
Definition: vpVirtuose.h:197
bool m_verbose
Definition: vpVirtuose.h:191
bool m_is_init
Definition: vpVirtuose.h:198
int m_ctrlMinorVersion
Definition: vpVirtuose.h:195
void setVerbose(bool mode)
Definition: vpVirtuose.h:183
std::string m_ip
Definition: vpVirtuose.h:190
void setIpAddress(const std::string &ip)
Definition: vpVirtuose.h:169
Implementation of column vector and the associated operations.
Definition: vpColVector.h:72
float m_period
Definition: vpVirtuose.h:199
Implementation of a pose vector and operations on poses.
Definition: vpPoseVector.h:93
int m_apiMajorVersion
Definition: vpVirtuose.h:192
int m_ctrlMajorVersion
Definition: vpVirtuose.h:194