force_torque_sensor_sim.h
Go to the documentation of this file.
1 /****************************************************************
2  *
3  * Copyright 2016 Intelligent Industrial Robotics (IIROB) Group,
4  * Institute for Anthropomatics and Robotics (IAR) -
5  * Intelligent Process Control and Robotics (IPR),
6  * Karlsruhe Institute of Technology
7  *
8  * Maintainers: Andreea Tulbure, email: andreea.tulbure@student.kit.edu
9  *
10  * Date of update: 2016-2017
11  *
12  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are met:
16  *
17  * * Redistributions of source code must retain the above copyright
18  * notice, this list of conditions and the following disclaimer.
19  * * Redistributions in binary form must reproduce the above copyright
20  * notice, this list of conditions and the following disclaimer in the
21  * documentation and/or other materials provided with the distribution.
22  * * Neither the name of the copyright holder nor the names of its
23  * contributors may be used to endorse or promote products derived from
24  * this software without specific prior written permission.
25  *
26  * This program is free software: you can redistribute it and/or modify
27  * it under the terms of the GNU Lesser General Public License LGPL as
28  * published by the Free Software Foundation, either version 3 of the
29  * License, or (at your option) any later version.
30  *
31  * This program is distributed in the hope that it will be useful,
32  * but WITHOUT ANY WARRANTY; without even the implied warranty of
33  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34  * GNU Lesser General Public License LGPL for more details.
35  *
36  * You should have received a copy of the GNU Lesser General Public
37  * License LGPL along with this program.
38  * If not, see <http://www.gnu.org/licenses/>.
39  *
40  ****************************************************************/
41 #include <stdint.h>
42 typedef unsigned char uint8_t;
43 #include <inttypes.h>
44 #include <iostream>
45 #include <ros/ros.h>
46 #include <geometry_msgs/Wrench.h>
47 #include <geometry_msgs/Twist.h>
48 #include <geometry_msgs/WrenchStamped.h>
49 #include <geometry_msgs/PoseStamped.h>
50 #include <geometry_msgs/Vector3Stamped.h>
52 
56 
57 #include <ati_force_torque/PublishConfigurationParameters.h>
58 #include <ati_force_torque/NodeConfigurationParameters.h>
59 
60 #include <math.h>
61 #include <iostream>
62 
63 #define PI 3.14159265
64 
66 {
67 public:
69  void init_sensor();
70 
71 protected:
72 
73  std::string transform_frame_;
74  std::string sensor_frame_;
75  ati_force_torque::NodeConfigurationParameters node_params_;
76  ati_force_torque::PublishConfigurationParameters pub_params_;
77  void pullFTData(const ros::TimerEvent &event);
78  void filterFTData();
79  void subscribeData(const geometry_msgs::Twist::ConstPtr& msg);
80  // Arrays for dumping FT-Data
82  virtual void updateFTData(const ros::TimerEvent &event) = 0;
83 
84 
85 private:
86  bool transform_wrench(std::string goal_frame, std::string source_frame, geometry_msgs::Wrench wrench, geometry_msgs::Wrench *transformed);
95  bool is_pub_sensor_data_=false;
96 
97 };
98 
unsigned char uint8_t
bool transform_wrench(std::string goal_frame, std::string source_frame, geometry_msgs::Wrench wrench, geometry_msgs::Wrench *transformed)
tf2_ros::Buffer * p_tfBuffer
ForceTorqueSensorSim(ros::NodeHandle &nh)
void pullFTData(const ros::TimerEvent &event)
ati_force_torque::PublishConfigurationParameters pub_params_
geometry_msgs::WrenchStamped joystick_data
ros::Publisher transformed_data_pub_
tf2_ros::TransformListener * p_tfListener
geometry_msgs::WrenchStamped transformed_data
void subscribeData(const geometry_msgs::Twist::ConstPtr &msg)
virtual void updateFTData(const ros::TimerEvent &event)=0
ros::Subscriber force_input_subscriber
ati_force_torque::NodeConfigurationParameters node_params_
geometry_msgs::WrenchStamped threshold_filtered_force


ati_force_torque
Author(s): Denis Štogl, Alexander Bubeck
autogenerated on Thu Sep 17 2020 03:18:35