kinematics-dynamics
Loading...
Searching...
No Matches
StreamingDeviceController.hpp
1#ifndef __STREAMING_DEVICE_CONTROLLER_HPP__
2#define __STREAMING_DEVICE_CONTROLLER_HPP__
3
4#include <vector>
5
6#include <yarp/os/Bottle.h>
7#include <yarp/os/BufferedPort.h>
8#include <yarp/os/RFModule.h>
9#include <yarp/os/TypedReaderCallback.h>
10
11#include <yarp/dev/PolyDriver.h>
12
13#include "StreamingDevice.hpp"
14#include "CentroidTransform.hpp"
15
16#include "ICartesianControl.h"
17
18namespace roboticslab
19{
20
29class StreamingDeviceController : public yarp::os::RFModule,
30 public yarp::os::TypedReaderCallback<yarp::os::Bottle>
31{
32public:
34 { close(); }
35
36 bool configure(yarp::os::ResourceFinder & rf) override;
37 bool updateModule() override;
38 bool interruptModule() override;
39 bool close() override;
40 double getPeriod() override;
41 void onRead(yarp::os::Bottle & bot) override;
42
43private:
44 bool update(double timestamp);
45
46 StreamingDevice * streamingDevice;
47
48 yarp::dev::PolyDriver cartesianControlClientDevice;
49 roboticslab::ICartesianControl * iCartesianControl;
50
51 yarp::os::BufferedPort<yarp::os::Bottle> proximityPort;
52 int thresholdAlertHigh;
53 int thresholdAlertLow;
54 bool disableSensorsLowLevel;
55
56 yarp::os::BufferedPort<yarp::os::Bottle> centroidPort;
57 CentroidTransform centroidTransform;
58
59 yarp::os::BufferedPort<yarp::os::Bottle> syncPort;
60
61 double period;
62 double scaling;
63 bool isStopped;
64};
65
66} // namespace roboticslab
67
68#endif // __STREAMING_DEVICE_CONTROLLER_HPP__
Contains roboticslab::ICartesianControl and related vocabs.
Definition CentroidTransform.hpp:22
Abstract base class for a cartesian controller.
Definition ICartesianControl.h:146
Sends streaming commands to the cartesian controller from a streaming input device like the 3Dconnexi...
Definition StreamingDeviceController.hpp:31
Abstract class for a YARP streaming device.
Definition StreamingDevice.hpp:46
The main, catch-all namespace for Robotics Lab UC3M.
Definition groups.dox:6