Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline example #27

Merged
merged 2 commits into from
Jan 13, 2021
Merged

Pipeline example #27

merged 2 commits into from
Jan 13, 2021

Conversation

AlexAntn
Copy link
Contributor

@AlexAntn AlexAntn commented Jan 7, 2021

After working with Nicolo in the morning, we came up with a small example of the full pipeline, from a data vector to circular buffer, then reading from the circular buffer and creating a mat file with matioCpp.

The reading is done in a thread, made safe by use of mutex locks. The data is stored in a local collection, and the mat file is created at the end of the run (when the user chooses to terminate the module).

This already uses the Buffer API developed by @Nicogene

@traversaro
Copy link
Member

The homebrew failure is not related to this repo, but rather to actions/runner-images#2391 or actions/runner-images#2322 . We can add some workarounds, but given the frequency of this incidents I think we can also just disable macOS testing for now.

@traversaro
Copy link
Member

@AlexAntn can you please write down the discussion in today's meeting? Thanks!

@AlexAntn
Copy link
Contributor Author

In the meeting, we discussed the use of a circular buffer, and whether it makes sense to copy the contents read from a buffer to a "local collection" vector.

In practice, if we make the buffer large enough and also specify a threshold at which it writes the data to a file, it should be possible to work just with the circular buffer (for example, the circular buffer could have a capacity for 300 entries of data, and a threshold for saving to the file at 200, allowing still 100 entries to write new data without losing any data).

Another aspect is the saving of the file when something happens (e.g.: ctrl+c or a segmentation fault exception). This might require using yarp modules or checking how to do it in a OS-independent way.

I will implement these changes and update the PR.

@Nicogene Nicogene mentioned this pull request Jan 13, 2021
@Nicogene
Copy link
Member

As stated here the ideas that came out from the latest meeting has been implemented in the high-level API.
In this sense, I would merge this PR as it is since this example already accomplished its purpose.

cc @AlexAntn @traversaro @S-Dafarra @drdanz

@traversaro
Copy link
Member

As stated here the ideas that came out from the latest meeting has been implemented in the high-level API.
In this sense, I would merge this PR as it is since this example already accomplished its purpose.

cc @AlexAntn @traversaro @S-Dafarra @drdanz

Ok for me!

@Nicogene Nicogene merged commit 581187c into master Jan 13, 2021
@Nicogene Nicogene deleted the pipeline_example branch January 13, 2021 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants