gravity_compensation.h
Go to the documentation of this file.
1 /*
2  * gravity_compensation.h
3  *
4  * Created on: Nov 11, 2013
5  * Authors: Francisco Viña
6  * fevb <at> kth.se
7  */
8 
9 /* Copyright (c) 2013, Francisco Viña, CVAP, KTH
10  All rights reserved.
11 
12  Redistribution and use in source and binary forms, with or without
13  modification, are permitted provided that the following conditions are met:
14  * Redistributions of source code must retain the above copyright
15  notice, this list of conditions and the following disclaimer.
16  * Redistributions in binary form must reproduce the above copyright
17  notice, this list of conditions and the following disclaimer in the
18  documentation and/or other materials provided with the distribution.
19  * Neither the name of KTH nor the
20  names of its contributors may be used to endorse or promote products
21  derived from this software without specific prior written permission.
22 
23  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  DISCLAIMED. IN NO EVENT SHALL KTH BE LIABLE FOR ANY
27  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34 
35 #ifndef GRAVITY_COMPENSATION_H_
36 #define GRAVITY_COMPENSATION_H_
37 
39 #include <tf/transform_listener.h>
40 #include <tf/transform_datatypes.h>
41 #include <geometry_msgs/WrenchStamped.h>
42 #include <sensor_msgs/Imu.h>
43 
44 
46 {
47 public:
48 
50 
51  virtual ~GravityCompensation();
52 
53  // Eliminate bias from the force-torque readings
54  void Zero(const geometry_msgs::WrenchStamped &ft_raw,
55  geometry_msgs::WrenchStamped &ft_zeroed);
56 
57  // Compensate for the weight of the gripper.
58  // Assumes that the gripper has fixed mass and COM
59  // relative to F/T sensor.
60  bool Compensate(const geometry_msgs::WrenchStamped &ft_zeroed,
61  const sensor_msgs::Imu &gravity,
62  geometry_msgs::WrenchStamped &ft_compensated);
63 
64 private:
65 
68 
69 
70 };
71 
72 
73 #endif
tf::TransformListener * m_tf_listener
GravityCompensation(GravityCompensationParams *g_comp_params)
bool Compensate(const geometry_msgs::WrenchStamped &ft_zeroed, const sensor_msgs::Imu &gravity, geometry_msgs::WrenchStamped &ft_compensated)
GravityCompensationParams * m_g_comp_params
void Zero(const geometry_msgs::WrenchStamped &ft_raw, geometry_msgs::WrenchStamped &ft_zeroed)


gravity_compensation
Author(s): Francisco Vina
autogenerated on Mon May 10 2021 02:27:45