openrave-yarp-plugins
YarpOpenraveAnalogSensors.hpp
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 #ifndef __YARP_OPENRAVE_ANALOG_SENSORS_HPP__
4 #define __YARP_OPENRAVE_ANALOG_SENSORS_HPP__
5 
6 #include <yarp/dev/DeviceDriver.h>
7 #include <yarp/dev/MultipleAnalogSensorsInterfaces.h>
8 
9 #include <openrave/openrave.h>
10 
11 #include <boost/smart_ptr/shared_ptr.hpp>
12 
13 #include "YarpOpenraveBase.hpp"
14 
15 namespace roboticslab
16 {
17 
31  public yarp::dev::DeviceDriver,
32  public yarp::dev::ISixAxisForceTorqueSensors
33 {
34 public:
35  // ------- DeviceDriver declarations. Implementation in DeviceDriverImageImpl.cpp -------
36  bool open(yarp::os::Searchable& config) override;
37  bool close() override;
38 
39  // ------- ISixAxisForceTorqueSensors declarations. Implementation in ISixAxisForceTorqueSensorsImpl.cpp -------
40  size_t getNrOfSixAxisForceTorqueSensors() const override;
41  yarp::dev::MAS_status getSixAxisForceTorqueSensorStatus(size_t sens_index) const override;
42  bool getSixAxisForceTorqueSensorName(size_t sens_index, std::string &name) const override;
43  bool getSixAxisForceTorqueSensorFrameName(size_t sens_index, std::string &frameName) const override;
44  bool getSixAxisForceTorqueSensorMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const override;
45 
46 private:
47  //OpenRAVE//
48  std::vector<OpenRAVE::SensorBasePtr> vectorOfSensorPtrForForce6Ds;
49  std::vector<boost::shared_ptr<OpenRAVE::SensorBase::Force6DSensorData>> vectorOfForce6DSensorDataPtr;
50 };
51 
52 } // namespace roboticslab
53 
54 #endif // __YARP_OPENRAVE_ANALOG_SENSORS_HPP__
Implements the YARP_dev ISixAxisForceTorqueSensors, etc. interface class member functions.
Definition: YarpOpenraveAnalogSensors.hpp:33
Implements shared configuration functions.
Definition: YarpOpenraveBase.hpp:32
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:5