ViSP  2.6.2
vpRobotCamera.cpp
1 /****************************************************************************
2  *
3  * $Id: vpRobotCamera.cpp 2456 2010-01-07 10:33:12Z nmelchio $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2012 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Defines the simplest robot : a free flying camera.
36  *
37  * Authors:
38  * Eric Marchand
39  *
40  *****************************************************************************/
41 
42 
48 #include <visp/vpHomogeneousMatrix.h>
49 #include <visp/vpRobotCamera.h>
50 #include <visp/vpRobotException.h>
51 #include <visp/vpDebug.h>
52 #include <visp/vpExponentialMap.h>
53 
54 
75 {
76  init() ;
77 }
78 
90 {
91  eJe.resize(6,6) ;
92  eJe.setIdentity() ;
93  setSamplingTime(0.040f);
94 }
95 
96 
102 {
103 }
104 
105 /*
106 
107 AT LEAST ONE OF THESE TWO FUNCTIONS HAS TO BE IMPLEMENTED
108 
109 get_eJe
110 get_fJe
111 
112 */
113 
121 void
123 {
124  eJe = this->eJe ;
125 }
126 
132 void
134 {
135  std::cout << "Not implemented ! " << std::endl;
136 }
137 
138 
139 /*
140 
141 AT LEAST ONE OF THESE TWO FUNCTIONS HAS TO BE IMPLEMENTED
142 
143 sendCameraVelocity
144 sendArticularVelocity
145 
146 
147 */
148 
163 void
165 {
166  cMo = vpExponentialMap::direct(v, delta_t).inverse()*cMo ;
167 }
168 
186 void
188 {
189  cMo = vpExponentialMap::direct(qdot, delta_t).inverse()*cMo ;
190 }
191 
220 void
222  const vpColVector &v)
223 {
224  switch (frame)
225  {
228  break ;
230  setCameraVelocity(v) ;
231  break ;
233  vpERROR_TRACE ("Cannot set a velocity in the reference frame: "
234  "functionality not implemented");
236  "Cannot set a velocity in the reference frame:"
237  "functionality not implemented");
238  break ;
239  case vpRobot::MIXT_FRAME:
240  vpERROR_TRACE ("Cannot set a velocity in the mixt frame: "
241  "functionality not implemented");
243  "Cannot set a velocity in the mixt frame:"
244  "functionality not implemented");
245 
246  break ;
247  }
248 }
249 
250 
251 /*
252 
253 THESE FUNCTIONS ARE NOT MENDATORY BUT ARE USUALLY USEFUL
254 
255 */
256 
265 void
267 {
268  std::cout << "Not implemented ! " << std::endl;
269  // cpo.buildFrom(cMo) ;
270 }
271 
276 void
278 {
279  cMo = this->cMo ;
280 }
284 void
286 {
287  this->cMo = cMo ;
288 }
289 
295 void
297 {
298  std::cout << "Not implemented ! " << std::endl;
299 }
300 
306 void
308  vpColVector & /* q */)
309 {
310  std::cout << "Not implemented ! " << std::endl;
311 }
312 
318 void
320 {
321  std::cout << "Not implemented ! " << std::endl;
322 }
323 
329 void
331 {
332  std::cout << "Not implemented ! " << std::endl;
333 }
334 
340 void
342  vpColVector &/* q */)
343 {
344  std::cout << "Not implemented ! " << std::endl;
345 }
346 
347 
348 /*
349  * Local variables:
350  * c-basic-offset: 2
351  * End:
352  */
void setCameraVelocity(const vpColVector &v)
Definition of the vpMatrix class.
Definition: vpMatrix.h:96
void resize(const unsigned int nrows, const unsigned int ncols, const bool nullify=true)
Definition: vpMatrix.cpp:174
Error that can be emited by the vpRobot class and its derivates.
void setSamplingTime(const double &delta_t)
Definition: vpRobotCamera.h:87
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
#define vpERROR_TRACE
Definition: vpDebug.h:379
void setArticularVelocity(const vpColVector &qdot)
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)
vpControlFrameType
Definition: vpRobot.h:83
void getDisplacement(const vpRobot::vpControlFrameType repere, vpColVector &q)
void setIdentity(const double &val=1.0)
Definition: vpMatrix.cpp:1108
void get_fJe(vpMatrix &_fJe)
void getArticularPosition(vpColVector &q) const
virtual ~vpRobotCamera()
void getPosition(vpColVector &q)
void getArticularDisplacement(vpColVector &qdot)
void setPosition(const vpRobot::vpControlFrameType, const vpColVector &)
Set a displacement (frame has to be specified) in position control.
void getCameraDisplacement(vpColVector &v)
vpMatrix eJe
robot Jacobian expressed in the end-effector frame
Definition: vpRobot.h:113
Class that provides a data structure for the column vectors as well as a set of operations on these v...
Definition: vpColVector.h:72
vpHomogeneousMatrix inverse() const
static vpHomogeneousMatrix direct(const vpColVector &v)
void get_eJe(vpMatrix &_eJe)