ViSP  2.8.0
vpAfma6.h
1 /****************************************************************************
2  *
3  * $Id: vpAfma6.h 4191 2013-04-01 07:46:05Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2013 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  * Interface for the Irisa's Afma6 robot.
36  *
37  * Authors:
38  * Fabien Spindler
39  *
40  *****************************************************************************/
41 
42 #ifndef __vpAfma6_h
43 #define __vpAfma6_h
44 
63 #include <visp/vpHomogeneousMatrix.h>
64 #include <visp/vpImage.h>
65 #include <visp/vpRGBa.h>
66 #include <visp/vpCameraParameters.h>
67 #include <visp/vpVelocityTwistMatrix.h>
68 
69 class VISP_EXPORT vpAfma6
70 {
71  public:
72 #ifdef VISP_HAVE_ACCESS_TO_NAS
73  static const char * const CONST_AFMA6_FILENAME;
78  static const char * const CONST_EMC_CCMOP_WITH_DISTORTION_FILENAME;
80  static const char * const CONST_EMC_GRIPPER_WITH_DISTORTION_FILENAME;
82  static const char * const CONST_EMC_VACUUM_WITH_DISTORTION_FILENAME;
84  static const char * const CONST_EMC_GENERIC_WITH_DISTORTION_FILENAME;
85  static const char * const CONST_CAMERA_AFMA6_FILENAME;
86 #endif
87 
90  static const char * const CONST_CCMOP_CAMERA_NAME;
95  static const char * const CONST_GRIPPER_CAMERA_NAME;
100  static const char * const CONST_VACUUM_CAMERA_NAME;
105  static const char * const CONST_GENERIC_CAMERA_NAME;
106 
108  typedef enum
109  {
113  TOOL_GENERIC_CAMERA
114  } vpAfma6ToolType;
115 
118 
119  public:
120  vpAfma6();
121 
122  void init (void);
123 #ifdef VISP_HAVE_ACCESS_TO_NAS
124  void init (const char * paramAfma6, const char * paramCamera);
125 #endif
126  void init (vpAfma6::vpAfma6ToolType tool,
129 
130  vpHomogeneousMatrix getForwardKinematics(const vpColVector & q);
131  int getInverseKinematics(const vpHomogeneousMatrix & fMc,
132  vpColVector & q, const bool &nearest=true, const bool &verbose=false);
133  vpHomogeneousMatrix get_fMc (const vpColVector & q);
134  void get_fMe(const vpColVector & q, vpHomogeneousMatrix & fMe);
135  void get_fMc(const vpColVector & q, vpHomogeneousMatrix & fMc);
136 
137  void get_cMe(vpHomogeneousMatrix &cMe) ;
138  void get_cVe(vpVelocityTwistMatrix &cVe) ;
139  void get_eJe(const vpColVector &q, vpMatrix &eJe) ;
140  void get_fJe(const vpColVector &q, vpMatrix &fJe) ;
141 
142 #ifdef VISP_HAVE_ACCESS_TO_NAS
143  void parseConfigFile (const char * filename);
144 #endif
145 
148  return tool_current;
149  };
152  return projModel;
153  };
154 
155  void getCameraParameters(vpCameraParameters &cam,
156  const unsigned int &image_width,
157  const unsigned int &image_height);
158  void getCameraParameters(vpCameraParameters &cam,
159  const vpImage<unsigned char> &I);
160  void getCameraParameters(vpCameraParameters &cam, const vpImage<vpRGBa> &I);
161 
162  friend VISP_EXPORT std::ostream & operator << (std::ostream & os,
163  const vpAfma6 & afma6);
164 
165  vpColVector getJointMin();
166  vpColVector getJointMax();
167  double getCoupl56();
168  double getLong56();
169 
170  protected:
173  tool_current = tool;
174  };
175 
176  public:
177 
178  static const unsigned int njoint;
179 
180 
181  protected:
182  double _coupl_56; // coupling between join 5 and 6
183  double _long_56; // distance between join 5 and 6
184  double _joint_max[6]; // Maximal value of the joints
185  double _joint_min[6]; // Minimal value of the joints
186  // Minimal representation of _eMc
188  vpRxyzVector _erc; // radian
189 
190  vpHomogeneousMatrix _eMc; // Camera extrinsic parameters: effector to camera
191 
192  protected:
195  // Used projection model
197 
198 };
199 
200 /*
201  * Local variables:
202  * c-basic-offset: 2
203  * End:
204  */
205 
206 #endif
207 
Modelisation of Irisa's gantry robot named Afma6.
Definition: vpAfma6.h:69
Definition of the vpMatrix class.
Definition: vpMatrix.h:96
vpRxyzVector _erc
Definition: vpAfma6.h:188
vpTranslationVector _etc
Definition: vpAfma6.h:187
static const char *const CONST_EMC_GRIPPER_WITHOUT_DISTORTION_FILENAME
Definition: vpAfma6.h:79
Perspective projection without distortion model.
static const char *const CONST_EMC_CCMOP_WITH_DISTORTION_FILENAME
Definition: vpAfma6.h:78
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
double _coupl_56
Definition: vpAfma6.h:182
vpAfma6ToolType
List of possible tools that can be attached to the robot end-effector.
Definition: vpAfma6.h:108
vpCameraParameters::vpCameraParametersProjType projModel
Definition: vpAfma6.h:196
static const char *const CONST_EMC_VACUUM_WITH_DISTORTION_FILENAME
Definition: vpAfma6.h:82
vpAfma6ToolType getToolType()
Get the current tool type.
Definition: vpAfma6.h:147
void setToolType(vpAfma6::vpAfma6ToolType tool)
Set the current tool type.
Definition: vpAfma6.h:172
static const char *const CONST_EMC_VACUUM_WITHOUT_DISTORTION_FILENAME
Definition: vpAfma6.h:81
static const char *const CONST_GRIPPER_CAMERA_NAME
Definition: vpAfma6.h:95
static const vpAfma6ToolType defaultTool
Default tool attached to the robot end effector.
Definition: vpAfma6.h:117
static const char *const CONST_EMC_CCMOP_WITHOUT_DISTORTION_FILENAME
Definition: vpAfma6.h:77
static const char *const CONST_EMC_GENERIC_WITHOUT_DISTORTION_FILENAME
Definition: vpAfma6.h:83
static const char *const CONST_CAMERA_AFMA6_FILENAME
Definition: vpAfma6.h:85
Generic class defining intrinsic camera parameters.
Class that consider the particular case of twist transformation matrix that allows to transform a vel...
vpAfma6ToolType tool_current
Current tool in use.
Definition: vpAfma6.h:194
vpCameraParameters::vpCameraParametersProjType getCameraParametersProjType()
Get the current camera model projection type.
Definition: vpAfma6.h:151
double _long_56
Definition: vpAfma6.h:183
Class that provides a data structure for the column vectors as well as a set of operations on these v...
Definition: vpColVector.h:72
static const char *const CONST_EMC_GRIPPER_WITH_DISTORTION_FILENAME
Definition: vpAfma6.h:80
vpHomogeneousMatrix _eMc
Definition: vpAfma6.h:190
Class that consider the case of the Euler angle using the x-y-z convention, where are respectively ...
Definition: vpRxyzVector.h:152
static const char *const CONST_CCMOP_CAMERA_NAME
Definition: vpAfma6.h:90
static const char *const CONST_VACUUM_CAMERA_NAME
Definition: vpAfma6.h:100
Class that consider the case of a translation vector.
static const char *const CONST_EMC_GENERIC_WITH_DISTORTION_FILENAME
Definition: vpAfma6.h:84
static const char *const CONST_GENERIC_CAMERA_NAME
Definition: vpAfma6.h:105