ami-iit / bipedal-locomotion-framework

Suite of libraries for achieving bipedal locomotion on humanoid robots
https://ami-iit.github.io/bipedal-locomotion-framework/
BSD 3-Clause "New" or "Revised" License
154 stars 38 forks source link

Introduce the Signal block #39

Open GiulioRomualdi opened 4 years ago

GiulioRomualdi commented 4 years ago

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.

traversaro commented 4 years ago

For reference, this is also similar to the YARPRead block available in WB-Toolbox:

traversaro commented 4 years ago

Also Drake's LCM systems are related (they also include a system to playback logs):