ft_calib.h
Go to the documentation of this file.
1 /*
2  * ft_calib.h
3  *
4  * Least squares calibration of:
5  * - Bias of F/T sensor
6  * - Mass of attached gripper
7  * - Location of the center of mass of the gripper
8  *
9  * Requires calibrated accelerometer readings
10  * (calibrated with respect to the robot).
11  *
12  *
13  * Created on: Sep 26, 2012
14  * Authors: Francisco Viña
15  * fevb <at> kth.se
16  */
17 
18 /* Copyright (c) 2012, Francisco Viña, CVAP, KTH
19  All rights reserved.
20 
21  Redistribution and use in source and binary forms, with or without
22  modification, are permitted provided that the following conditions are met:
23  * Redistributions of source code must retain the above copyright
24  notice, this list of conditions and the following disclaimer.
25  * Redistributions in binary form must reproduce the above copyright
26  notice, this list of conditions and the following disclaimer in the
27  documentation and/or other materials provided with the distribution.
28  * Neither the name of KTH nor the
29  names of its contributors may be used to endorse or promote products
30  derived from this software without specific prior written permission.
31 
32  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
33  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35  DISCLAIMED. IN NO EVENT SHALL KTH BE LIABLE FOR ANY
36  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
39  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 */
43 
44 
45 
46 #ifndef FTCALIB_H_
47 #define FTCALIB_H_
48 #include <geometry_msgs/Vector3Stamped.h>
49 #include <geometry_msgs/WrenchStamped.h>
50 #include <Eigen/Core>
51 
52 
53 // Least Squares calibration of bias of FT sensor and the mass and location of the COM of the gripper
54 namespace Calibration{
55 class FTCalib
56 {
57 public:
58 
59  FTCalib();
60  virtual ~FTCalib();
61 
62 
63  // adds a F/T measurement and the corresponding measurement matrix from the gravity
64  // measurements of the accelerometer
65  // gravity is assumed to be expressed in the F/T sensor frame
66  virtual void addMeasurement(const geometry_msgs::Vector3Stamped &gravity,
67  const geometry_msgs::WrenchStamped &ft_raw);
68 
69 
70  // Least squares to estimate the F/T sensor parameters
71  // The estimated parameters are :
72  // [m m*cx m*cy m*cz FBx FBy FBz TBx TBy TBz]
73  // m: mass of the gripper
74  // [cx, cy, cz] are the coordinates of the center of mass of the gripper
75  // FB : force bias
76  // TB: torque bias
77  // All expressed in the FT sensor frame
78  virtual Eigen::VectorXd getCalib();
79 
80 
81 
82 protected:
83 
84  Eigen::MatrixXd H; // stacked measurement matrices
85  Eigen::VectorXd Z; // stacked F/T measurements
86  // FT_sensor_frame_acc taken as 0
87 
88  unsigned int m_num_meas; // number of stacked measurements;
89 
90  // measurement matrix based on "On-line Rigid Object Recognition and Pose Estimation
91  // Based on Inertial Parameters", D. Kubus, T. Kroger, F. Wahl, IROS 2008
92  virtual Eigen::MatrixXd getMeasurementMatrix(const geometry_msgs::Vector3Stamped &gravity);
93 
94 };
95 }
96 
97 
98 #endif /* INERTIALPARAMESTIMATOR_H_ */
virtual void addMeasurement(const geometry_msgs::Vector3Stamped &gravity, const geometry_msgs::WrenchStamped &ft_raw)
Definition: ft_calib.cpp:53
virtual Eigen::MatrixXd getMeasurementMatrix(const geometry_msgs::Vector3Stamped &gravity)
Definition: ft_calib.cpp:113
virtual Eigen::VectorXd getCalib()
Definition: ft_calib.cpp:103
Eigen::VectorXd Z
Definition: ft_calib.h:85
unsigned int m_num_meas
Definition: ft_calib.h:88
Eigen::MatrixXd H
Definition: ft_calib.h:84
virtual ~FTCalib()
Definition: ft_calib.cpp:49


force_torque_sensor_calib
Author(s): Francisco Vina
autogenerated on Mon May 10 2021 02:27:43