Visual Servoing Platform  version 3.0.0
vpAfma6.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2015 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:
31  * Interface for the Irisa's Afma6 robot.
32  *
33  * Authors:
34  * Fabien Spindler
35  *
36  *****************************************************************************/
37 
38 #ifndef __vpAfma6_h
39 #define __vpAfma6_h
40 
59 #include <visp3/core/vpHomogeneousMatrix.h>
60 #include <visp3/core/vpImage.h>
61 #include <visp3/core/vpRGBa.h>
62 #include <visp3/core/vpCameraParameters.h>
63 #include <visp3/core/vpVelocityTwistMatrix.h>
64 
65 class VISP_EXPORT vpAfma6
66 {
67  public:
68 #ifdef VISP_HAVE_ACCESS_TO_NAS
69  static const char * const CONST_AFMA6_FILENAME;
74  static const char * const CONST_EMC_CCMOP_WITH_DISTORTION_FILENAME;
76  static const char * const CONST_EMC_GRIPPER_WITH_DISTORTION_FILENAME;
78  static const char * const CONST_EMC_VACUUM_WITH_DISTORTION_FILENAME;
80  static const char * const CONST_EMC_GENERIC_WITH_DISTORTION_FILENAME;
81  static const char * const CONST_CAMERA_AFMA6_FILENAME;
82 #endif
83 
86  static const char * const CONST_CCMOP_CAMERA_NAME;
91  static const char * const CONST_GRIPPER_CAMERA_NAME;
96  static const char * const CONST_VACUUM_CAMERA_NAME;
101  static const char * const CONST_GENERIC_CAMERA_NAME;
102 
104  typedef enum
105  {
109  TOOL_GENERIC_CAMERA
110  } vpAfma6ToolType;
111 
114 
115  public:
116  vpAfma6();
118  virtual ~vpAfma6() {};
119 
120  void init (void);
121 #ifdef VISP_HAVE_ACCESS_TO_NAS
122  void init (const char * paramAfma6, const char * paramCamera);
123 #endif
124  void init (vpAfma6::vpAfma6ToolType tool,
127 
128  vpHomogeneousMatrix getForwardKinematics(const vpColVector & q) const;
129  int getInverseKinematics(const vpHomogeneousMatrix & fMc,
130  vpColVector & q, const bool &nearest=true,
131  const bool &verbose=false) const;
132  vpHomogeneousMatrix get_fMc (const vpColVector & q) const;
133  void get_fMe(const vpColVector & q, vpHomogeneousMatrix & fMe) const;
134  void get_fMc(const vpColVector & q, vpHomogeneousMatrix & fMc) const;
135 
136  void get_cMe(vpHomogeneousMatrix &cMe) const;
137  void get_cVe(vpVelocityTwistMatrix &cVe) const;
138  void get_eJe(const vpColVector &q, vpMatrix &eJe) const;
139  void get_fJe(const vpColVector &q, vpMatrix &fJe) const;
140 
141 #ifdef VISP_HAVE_ACCESS_TO_NAS
142  void parseConfigFile (const char * filename);
143 #endif
144 
147  return tool_current;
148  };
151  return projModel;
152  };
153 
154  void getCameraParameters(vpCameraParameters &cam,
155  const unsigned int &image_width,
156  const unsigned int &image_height) const;
157  void getCameraParameters(vpCameraParameters &cam,
158  const vpImage<unsigned char> &I) const;
159  void getCameraParameters(vpCameraParameters &cam, const vpImage<vpRGBa> &I) const;
160 
161  friend VISP_EXPORT std::ostream & operator << (std::ostream & os, const vpAfma6 & afma6);
162 
163  vpColVector getJointMin() const;
164  vpColVector getJointMax() const;
165  double getCoupl56() const;
166  double getLong56() const;
167 
168  protected:
171  tool_current = tool;
172  };
173 
174  public:
175 
176  static const unsigned int njoint;
177 
178 
179  protected:
180  double _coupl_56; // coupling between join 5 and 6
181  double _long_56; // distance between join 5 and 6
182  double _joint_max[6]; // Maximal value of the joints
183  double _joint_min[6]; // Minimal value of the joints
184  // Minimal representation of _eMc
186  vpRxyzVector _erc; // radian
187 
188  vpHomogeneousMatrix _eMc; // Camera extrinsic parameters: effector to camera
189 
190  protected:
193  // Used projection model
195 
196 };
197 
198 /*
199  * Local variables:
200  * c-basic-offset: 2
201  * End:
202  */
203 
204 #endif
205 
Modelisation of Irisa's gantry robot named Afma6.
Definition: vpAfma6.h:65
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:92
vpRxyzVector _erc
Definition: vpAfma6.h:186
vpTranslationVector _etc
Definition: vpAfma6.h:185
static const char *const CONST_EMC_GRIPPER_WITHOUT_DISTORTION_FILENAME
Definition: vpAfma6.h:75
Perspective projection without distortion model.
static const char *const CONST_EMC_CCMOP_WITH_DISTORTION_FILENAME
Definition: vpAfma6.h:74
vpAfma6ToolType getToolType() const
Get the current tool type.
Definition: vpAfma6.h:146
Implementation of an homogeneous matrix and operations on such kind of matrices.
double _coupl_56
Definition: vpAfma6.h:180
virtual ~vpAfma6()
Definition: vpAfma6.h:118
vpAfma6ToolType
List of possible tools that can be attached to the robot end-effector.
Definition: vpAfma6.h:104
vpCameraParameters::vpCameraParametersProjType projModel
Definition: vpAfma6.h:194
static const char *const CONST_EMC_VACUUM_WITH_DISTORTION_FILENAME
Definition: vpAfma6.h:78
void setToolType(vpAfma6::vpAfma6ToolType tool)
Set the current tool type.
Definition: vpAfma6.h:170
static const char *const CONST_EMC_VACUUM_WITHOUT_DISTORTION_FILENAME
Definition: vpAfma6.h:77
static const char *const CONST_GRIPPER_CAMERA_NAME
Definition: vpAfma6.h:91
static const vpAfma6ToolType defaultTool
Default tool attached to the robot end effector.
Definition: vpAfma6.h:113
static const char *const CONST_EMC_CCMOP_WITHOUT_DISTORTION_FILENAME
Definition: vpAfma6.h:73
static const char *const CONST_EMC_GENERIC_WITHOUT_DISTORTION_FILENAME
Definition: vpAfma6.h:79
static const char *const CONST_CAMERA_AFMA6_FILENAME
Definition: vpAfma6.h:81
Generic class defining intrinsic camera parameters.
vpCameraParameters::vpCameraParametersProjType getCameraParametersProjType() const
Get the current camera model projection type.
Definition: vpAfma6.h:150
Implementation of a velocity twist matrix and operations on such kind of matrices.
vpAfma6ToolType tool_current
Current tool in use.
Definition: vpAfma6.h:192
double _long_56
Definition: vpAfma6.h:181
Implementation of column vector and the associated operations.
Definition: vpColVector.h:72
static const char *const CONST_EMC_GRIPPER_WITH_DISTORTION_FILENAME
Definition: vpAfma6.h:76
vpHomogeneousMatrix _eMc
Definition: vpAfma6.h:188
Implementation of a rotation vector as Euler angle minimal representation.
Definition: vpRxyzVector.h:154
static const char *const CONST_CCMOP_CAMERA_NAME
Definition: vpAfma6.h:86
static const char *const CONST_VACUUM_CAMERA_NAME
Definition: vpAfma6.h:96
Class that consider the case of a translation vector.
static const char *const CONST_EMC_GENERIC_WITH_DISTORTION_FILENAME
Definition: vpAfma6.h:80
static const char *const CONST_GENERIC_CAMERA_NAME
Definition: vpAfma6.h:101