include
sr_tactile_sensors
sr_gazebo_virtual_tactile_sensor.hpp
Go to the documentation of this file.
1
/*
2
* Copyright 2011 Shadow Robot Company Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the Free
6
* Software Foundation version 2 of the License.
7
*
8
* This program is distributed in the hope that it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
* more details.
12
*
13
* You should have received a copy of the GNU General Public License along
14
* with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
29
#ifndef _SR_GAZEBO_VIRTUAL_TACTILE_SENSOR_HPP_
30
#define _SR_GAZEBO_VIRTUAL_TACTILE_SENSOR_HPP_
31
32
#include <
ros/ros.h
>
33
34
#include <boost/thread/mutex.hpp>
35
#include <string>
36
37
#include "
sr_tactile_sensors/sr_generic_tactile_sensor.hpp
"
38
39
#include <gazebo_msgs/ContactsState.h>
40
41
namespace
shadowrobot
42
{
43
class
SrGazeboVirtualTactileSensor
:
44
public
SrGenericTactileSensor
45
{
46
public
:
47
SrGazeboVirtualTactileSensor
(std::string name, std::string gazebo_topic);
48
49
virtual
~SrGazeboVirtualTactileSensor
();
50
51
protected
:
57
virtual
double
get_touch_data
();
58
59
private
:
60
ros::NodeHandle
nh
;
61
boost::mutex
touch_mutex
;
62
double
touch_value
;
63
bool
touch_freshdata
;
64
65
ros::Subscriber
sub
;
66
73
void
callback
(
const
gazebo_msgs::ContactsState &msg);
74
};
75
76
class
SrGazeboVirtualTactileSensorManager
:
77
public
SrTactileSensorManager
78
{
79
public
:
80
SrGazeboVirtualTactileSensorManager
();
81
82
~
SrGazeboVirtualTactileSensorManager
();
83
};
84
}
// namespace shadowrobot
85
86
/* For the emacs weenies in the crowd.
87
Local Variables:
88
c-basic-offset: 2
89
End:
90
*/
91
92
#endif
ros::NodeHandle
sr_generic_tactile_sensor.hpp
This is a generic parent class for the tactile sensors used in the Shadow Robot Dextrous Hand...
shadowrobot::SrGazeboVirtualTactileSensor::get_touch_data
virtual double get_touch_data()
Definition:
sr_gazebo_virtual_tactile_sensor.cpp:85
shadowrobot::SrGazeboVirtualTactileSensor::SrGazeboVirtualTactileSensor
SrGazeboVirtualTactileSensor(std::string name, std::string gazebo_topic)
Definition:
sr_gazebo_virtual_tactile_sensor.cpp:39
shadowrobot
Definition:
sr_gazebo_virtual_tactile_sensor.hpp:41
shadowrobot::SrGazeboVirtualTactileSensor::~SrGazeboVirtualTactileSensor
virtual ~SrGazeboVirtualTactileSensor()
Definition:
sr_gazebo_virtual_tactile_sensor.cpp:48
shadowrobot::SrGazeboVirtualTactileSensor
Definition:
sr_gazebo_virtual_tactile_sensor.hpp:43
ros::Subscriber
shadowrobot::SrGenericTactileSensor
Definition:
sr_generic_tactile_sensor.hpp:46
shadowrobot::SrGazeboVirtualTactileSensor::touch_freshdata
bool touch_freshdata
Definition:
sr_gazebo_virtual_tactile_sensor.hpp:63
shadowrobot::SrGazeboVirtualTactileSensorManager
Definition:
sr_gazebo_virtual_tactile_sensor.hpp:76
ros.h
shadowrobot::SrGazeboVirtualTactileSensor::touch_mutex
boost::mutex touch_mutex
Definition:
sr_gazebo_virtual_tactile_sensor.hpp:61
shadowrobot::SrGazeboVirtualTactileSensor::touch_value
double touch_value
Definition:
sr_gazebo_virtual_tactile_sensor.hpp:62
shadowrobot::SrGazeboVirtualTactileSensor::sub
ros::Subscriber sub
Definition:
sr_gazebo_virtual_tactile_sensor.hpp:65
shadowrobot::SrGazeboVirtualTactileSensor::callback
void callback(const gazebo_msgs::ContactsState &msg)
Definition:
sr_gazebo_virtual_tactile_sensor.cpp:52
shadowrobot::SrTactileSensorManager
Definition:
sr_generic_tactile_sensor.hpp:73
shadowrobot::SrGazeboVirtualTactileSensor::nh
ros::NodeHandle nh
Definition:
sr_gazebo_virtual_tactile_sensor.hpp:60
sr_tactile_sensors
Author(s): Ugo Cupcic
autogenerated on Mon Feb 28 2022 23:52:14