ViSP  2.9.0
vpAfma6.h
1 /****************************************************************************
2  *
3  * $Id: vpAfma6.h 4632 2014-02-03 17:06:40Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 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();
122  virtual ~vpAfma6() {};
123 
124  void init (void);
125 #ifdef VISP_HAVE_ACCESS_TO_NAS
126  void init (const char * paramAfma6, const char * paramCamera);
127 #endif
128  void init (vpAfma6::vpAfma6ToolType tool,
131 
132  vpHomogeneousMatrix getForwardKinematics(const vpColVector & q) const;
133  int getInverseKinematics(const vpHomogeneousMatrix & fMc,
134  vpColVector & q, const bool &nearest=true,
135  const bool &verbose=false) const;
136  vpHomogeneousMatrix get_fMc (const vpColVector & q) const;
137  void get_fMe(const vpColVector & q, vpHomogeneousMatrix & fMe) const;
138  void get_fMc(const vpColVector & q, vpHomogeneousMatrix & fMc) const;
139 
140  void get_cMe(vpHomogeneousMatrix &cMe) const;
141  void get_cVe(vpVelocityTwistMatrix &cVe) const;
142  void get_eJe(const vpColVector &q, vpMatrix &eJe) const;
143  void get_fJe(const vpColVector &q, vpMatrix &fJe) const;
144 
145 #ifdef VISP_HAVE_ACCESS_TO_NAS
146  void parseConfigFile (const char * filename);
147 #endif
148 
151  return tool_current;
152  };
155  return projModel;
156  };
157 
158  void getCameraParameters(vpCameraParameters &cam,
159  const unsigned int &image_width,
160  const unsigned int &image_height) const;
161  void getCameraParameters(vpCameraParameters &cam,
162  const vpImage<unsigned char> &I) const;
163  void getCameraParameters(vpCameraParameters &cam, const vpImage<vpRGBa> &I) const;
164 
165  friend VISP_EXPORT std::ostream & operator << (std::ostream & os, const vpAfma6 & afma6);
166 
167  vpColVector getJointMin() const;
168  vpColVector getJointMax() const;
169  double getCoupl56() const;
170  double getLong56() const;
171 
172  protected:
175  tool_current = tool;
176  };
177 
178  public:
179 
180  static const unsigned int njoint;
181 
182 
183  protected:
184  double _coupl_56; // coupling between join 5 and 6
185  double _long_56; // distance between join 5 and 6
186  double _joint_max[6]; // Maximal value of the joints
187  double _joint_min[6]; // Minimal value of the joints
188  // Minimal representation of _eMc
190  vpRxyzVector _erc; // radian
191 
192  vpHomogeneousMatrix _eMc; // Camera extrinsic parameters: effector to camera
193 
194  protected:
197  // Used projection model
199 
200 };
201 
202 /*
203  * Local variables:
204  * c-basic-offset: 2
205  * End:
206  */
207 
208 #endif
209 
Modelisation of Irisa's gantry robot named Afma6.
Definition: vpAfma6.h:69
Definition of the vpMatrix class.
Definition: vpMatrix.h:98
vpRxyzVector _erc
Definition: vpAfma6.h:190
vpTranslationVector _etc
Definition: vpAfma6.h:189
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
vpAfma6ToolType getToolType() const
Get the current tool type.
Definition: vpAfma6.h:150
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:184
virtual ~vpAfma6()
Definition: vpAfma6.h:122
vpAfma6ToolType
List of possible tools that can be attached to the robot end-effector.
Definition: vpAfma6.h:108
vpCameraParameters::vpCameraParametersProjType projModel
Definition: vpAfma6.h:198
static const char *const CONST_EMC_VACUUM_WITH_DISTORTION_FILENAME
Definition: vpAfma6.h:82
void setToolType(vpAfma6::vpAfma6ToolType tool)
Set the current tool type.
Definition: vpAfma6.h:174
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.
vpCameraParameters::vpCameraParametersProjType getCameraParametersProjType() const
Get the current camera model projection type.
Definition: vpAfma6.h:154
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:196
double _long_56
Definition: vpAfma6.h:185
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:192
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