I noticed that every time I need to read the data from a yarp port, I always need the following ingredients
yarp::os::BufferedPort<T> port;
U data; /**< Vector containing the data. */
std::unique_ptr<Smoother> smoother;
std::mutex mutex // <---- Useful if we are going to introduce threads in the final application
Where the Smoother is an optional class that smooths the data. In general, it is a low pass filter or a minimum jerk trajectory generator.
Last but not least, a signal may be streamed not only through a yarp port. For instance, the signal may arrive from a file (i.e. @prashanthr05 dataset for testing the estimation)
We can try to abstract the concept of the signal and introduce an interface for streaming data through the network/logfile.
A possible idea is to adapt what @xenvre did in robots-io.
I noticed that every time I need to read the data from a
yarp port
, I always need the following ingredientsWhere the
Smoother
is an optional class that smooths the data. In general, it is a low pass filter or a minimum jerk trajectory generator.Last but not least, a signal may be streamed not only through a
yarp port
. For instance, the signal may arrive from a file (i.e. @prashanthr05 dataset for testing the estimation)We can try to abstract the concept of the signal and introduce an interface for streaming data through the network/logfile.
A possible idea is to adapt what @xenvre did in robots-io.