1 #ifndef __STREAMING_DEVICE_HPP__
2 #define __STREAMING_DEVICE_HPP__
7 #include <yarp/os/Searchable.h>
8 #include <yarp/os/Value.h>
9 #include <yarp/dev/PolyDriver.h>
12 #include "CentroidTransform.hpp"
17 class StreamingDevice;
18 class CentroidTransform;
50 using PolyDriver::isValid;
100 return actuatorState;
127 this->iCartesianControl = iCartesianControl;
133 std::vector<double> data;
134 std::vector<bool> fixedAxes;
Contains roboticslab::ICartesianControl and related vocabs.
Abstract base class for a cartesian controller.
Definition: ICartesianControl.h:146
Represents an invalid device.
Definition: StreamingDevice.hpp:153
void stopMotion() override
Sends a movement command that would stop motion.
Definition: StreamingDevice.hpp:173
bool acquireInterfaces() override
Acquires plugin interfaces.
Definition: StreamingDevice.hpp:160
bool acquireData() override
Acquires data from remote device.
Definition: StreamingDevice.hpp:165
void sendMovementCommand(double timestamp) override
Sends movement command to the cartesian controller.
Definition: StreamingDevice.hpp:170
InvalidDevice()
Creates an invalid device.
Definition: StreamingDevice.hpp:156
Factory class for creating instances of StreamingDevice.
Definition: StreamingDevice.hpp:26
static StreamingDevice * makeDevice(const std::string &deviceName, yarp::os::Searchable &config)
Creates a new YARP device handle.
Definition: StreamingDevice.cpp:15
Abstract class for a YARP streaming device.
Definition: StreamingDevice.hpp:46
virtual bool transformData(double scaling)
Performs required operations on stored data.
Definition: StreamingDevice.cpp:62
virtual bool acquireData()=0
Acquires data from remote device.
virtual void stopMotion()=0
Sends a movement command that would stop motion.
virtual bool hasValidMovementData() const
Checks whether the device may forward acquired and processed data to the controller.
Definition: StreamingDevice.cpp:79
virtual int getActuatorState()
If actuator command data is available, return its current state.
Definition: StreamingDevice.hpp:98
virtual void sendMovementCommand(double timestamp)=0
Sends movement command to the cartesian controller.
virtual bool acquireInterfaces()=0
Acquires plugin interfaces.
void setCartesianControllerHandle(ICartesianControl *iCartesianControl)
Stores handle to an ICartesianControl instance.
Definition: StreamingDevice.hpp:125
virtual bool initialize(bool usingStreamingPreset)
Perform any custom initialization needed. This method is called after the successful creation of the ...
Definition: StreamingDevice.hpp:75
virtual ~StreamingDevice()
Destructor.
Definition: StreamingDevice.cpp:57
void configureFixedAxes(const yarp::os::Value &v)
Stores vector of values representing axes that are always fixed.
Definition: StreamingDevice.cpp:97
StreamingDevice(yarp::os::Searchable &config)
Constructor.
Definition: StreamingDevice.cpp:46
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:6