Visual Servoing Platform version 3.6.0
Loading...
Searching...
No Matches
vpAfma6.h
1/****************************************************************************
2 *
3 * ViSP, open source Visual Servoing Platform software.
4 * Copyright (C) 2005 - 2023 by Inria. All rights reserved.
5 *
6 * This software is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 * See the file LICENSE.txt at the root directory of this source
11 * distribution for additional information about the GNU GPL.
12 *
13 * For using ViSP with software that can not be combined with the GNU
14 * GPL, please contact Inria about acquiring a ViSP Professional
15 * Edition License.
16 *
17 * See https://visp.inria.fr for more information.
18 *
19 * This software was developed at:
20 * Inria Rennes - Bretagne Atlantique
21 * Campus Universitaire de Beaulieu
22 * 35042 Rennes Cedex
23 * France
24 *
25 * If you have questions regarding the use of this file, please contact
26 * Inria at visp@inria.fr
27 *
28 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30 *
31 * Description:
32 * Interface for the Irisa's Afma6 robot.
33 *
34*****************************************************************************/
35
36#ifndef _vpAfma6_h
37#define _vpAfma6_h
38
69#include <visp3/core/vpCameraParameters.h>
70#include <visp3/core/vpHomogeneousMatrix.h>
71#include <visp3/core/vpImage.h>
72#include <visp3/core/vpRGBa.h>
73#include <visp3/core/vpVelocityTwistMatrix.h>
74
75class VISP_EXPORT vpAfma6
76{
77public:
78#ifdef VISP_HAVE_AFMA6_DATA
82 static const std::string CONST_AFMA6_FILENAME;
93 static const std::string CONST_CAMERA_AFMA6_FILENAME;
94#endif
99 static const char *const CONST_CCMOP_CAMERA_NAME;
104 static const char *const CONST_GRIPPER_CAMERA_NAME;
109 static const char *const CONST_VACUUM_CAMERA_NAME;
114 static const char *const CONST_GENERIC_CAMERA_NAME;
115
120 static const char *const CONST_INTEL_D435_CAMERA_NAME;
121
131
134
135public:
136 vpAfma6();
138 virtual ~vpAfma6(){};
139
142 void init(void);
143 void init(const std::string &camera_extrinsic_parameters);
144 void init(const std::string &camera_extrinsic_parameters, const std::string &camera_intrinsic_parameters);
145 void init(vpAfma6::vpAfma6ToolType tool, const std::string &filename);
146 void init(vpAfma6::vpAfma6ToolType tool, const vpHomogeneousMatrix &eMc_);
147 void
148 init(vpAfma6::vpAfma6ToolType tool,
150
151 vpHomogeneousMatrix getForwardKinematics(const vpColVector &q) const;
152 int getInverseKinematics(const vpHomogeneousMatrix &fMc, vpColVector &q, const bool &nearest = true,
153 const bool &verbose = false) const;
154
155 vpHomogeneousMatrix get_eMc() const;
156 vpHomogeneousMatrix get_fMc(const vpColVector &q) const;
157 void get_fMe(const vpColVector &q, vpHomogeneousMatrix &fMe) const;
158 void get_fMc(const vpColVector &q, vpHomogeneousMatrix &fMc) const;
159
160 void get_cMe(vpHomogeneousMatrix &cMe) const;
161 void get_cVe(vpVelocityTwistMatrix &cVe) const;
162 void get_eJe(const vpColVector &q, vpMatrix &eJe) const;
163 void get_fJe(const vpColVector &q, vpMatrix &fJe) const;
164
166 vpAfma6ToolType getToolType() const { return tool_current; };
169
170 void getCameraParameters(vpCameraParameters &cam, const unsigned int &image_width,
171 const unsigned int &image_height) const;
172 void getCameraParameters(vpCameraParameters &cam, const vpImage<unsigned char> &I) const;
173 void getCameraParameters(vpCameraParameters &cam, const vpImage<vpRGBa> &I) const;
174
175 vpColVector getJointMin() const;
176 vpColVector getJointMax() const;
177 double getCoupl56() const;
178 double getLong56() const;
179
180 void parseConfigFile(const std::string &filename);
181
182 virtual void set_eMc(const vpHomogeneousMatrix &eMc);
184
185 friend VISP_EXPORT std::ostream &operator<<(std::ostream &os, const vpAfma6 &afma6);
186
187protected:
191 void setToolType(vpAfma6::vpAfma6ToolType tool) { tool_current = tool; };
193
194public:
195 static const unsigned int njoint;
196
197protected:
198 double _coupl_56; // coupling between join 5 and 6
199 double _long_56; // distance between join 5 and 6
200 double _joint_max[6]; // Maximal value of the joints
201 double _joint_min[6]; // Minimal value of the joints
202 // Minimal representation of _eMc
205
206 vpHomogeneousMatrix _eMc; // Camera extrinsic parameters: effector to camera
207
208protected:
211 // Used projection model
213};
214
215#endif
Modelisation of Irisa's gantry robot named Afma6.
Definition vpAfma6.h:76
static const std::string CONST_EMC_GENERIC_WITHOUT_DISTORTION_FILENAME
Definition vpAfma6.h:91
static const char *const CONST_CCMOP_CAMERA_NAME
Definition vpAfma6.h:99
static const std::string CONST_EMC_CCMOP_WITH_DISTORTION_FILENAME
Definition vpAfma6.h:84
static const std::string CONST_EMC_CCMOP_WITHOUT_DISTORTION_FILENAME
Definition vpAfma6.h:83
static const std::string CONST_EMC_INTEL_D435_WITHOUT_DISTORTION_FILENAME
Definition vpAfma6.h:89
static const std::string CONST_CAMERA_AFMA6_FILENAME
Definition vpAfma6.h:93
static const unsigned int njoint
Number of joint.
Definition vpAfma6.h:195
vpRxyzVector _erc
Definition vpAfma6.h:204
static const char *const CONST_VACUUM_CAMERA_NAME
Definition vpAfma6.h:109
static const std::string CONST_EMC_GRIPPER_WITHOUT_DISTORTION_FILENAME
Definition vpAfma6.h:85
void setToolType(vpAfma6::vpAfma6ToolType tool)
Set the current tool type.
Definition vpAfma6.h:191
vpAfma6ToolType getToolType() const
Get the current tool type.
Definition vpAfma6.h:166
vpCameraParameters::vpCameraParametersProjType getCameraParametersProjType() const
Get the current camera model projection type.
Definition vpAfma6.h:168
double _coupl_56
Definition vpAfma6.h:198
static const std::string CONST_EMC_INTEL_D435_WITH_DISTORTION_FILENAME
Definition vpAfma6.h:90
static const char *const CONST_INTEL_D435_CAMERA_NAME
Definition vpAfma6.h:120
virtual ~vpAfma6()
Definition vpAfma6.h:138
static const vpAfma6ToolType defaultTool
Default tool attached to the robot end effector.
Definition vpAfma6.h:133
static const char *const CONST_GRIPPER_CAMERA_NAME
Definition vpAfma6.h:104
static const std::string CONST_EMC_GRIPPER_WITH_DISTORTION_FILENAME
Definition vpAfma6.h:86
vpHomogeneousMatrix _eMc
Definition vpAfma6.h:206
double _long_56
Definition vpAfma6.h:199
vpTranslationVector _etc
Definition vpAfma6.h:203
vpAfma6ToolType tool_current
Current tool in use.
Definition vpAfma6.h:210
static const char *const CONST_GENERIC_CAMERA_NAME
Definition vpAfma6.h:114
vpCameraParameters::vpCameraParametersProjType projModel
Definition vpAfma6.h:212
static const std::string CONST_EMC_VACUUM_WITHOUT_DISTORTION_FILENAME
Definition vpAfma6.h:87
static const std::string CONST_EMC_GENERIC_WITH_DISTORTION_FILENAME
Definition vpAfma6.h:92
static const std::string CONST_EMC_VACUUM_WITH_DISTORTION_FILENAME
Definition vpAfma6.h:88
static const std::string CONST_AFMA6_FILENAME
Definition vpAfma6.h:82
vpAfma6ToolType
List of possible tools that can be attached to the robot end-effector.
Definition vpAfma6.h:123
@ TOOL_CCMOP
Definition vpAfma6.h:124
@ TOOL_GENERIC_CAMERA
Definition vpAfma6.h:127
@ TOOL_VACUUM
Definition vpAfma6.h:126
@ TOOL_INTEL_D435_CAMERA
Definition vpAfma6.h:128
@ TOOL_GRIPPER
Definition vpAfma6.h:125
Generic class defining intrinsic camera parameters.
@ perspectiveProjWithoutDistortion
Perspective projection without distortion model.
Implementation of column vector and the associated operations.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition of the vpImage class member functions.
Definition vpImage.h:135
Implementation of a matrix and operations on matrices.
Definition vpMatrix.h:152
Implementation of a rotation vector as Euler angle minimal representation.
Class that consider the case of a translation vector.