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

ergoCubEmotions: avoid reading videos at each update of the module #214

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

martinaxgloria
Copy link
Member

This should fix #213. I tried to launch the module after these changes on my laptop and the cpu consumption significantly decreased.

To be tested on ergocub-head.

@martinaxgloria
Copy link
Member Author

I modified the code to open only the transitions at runtime, while the "static" video are opened in the configuration and then read in the updateModule when the correspondent command is set. In this way, only 4 videos are saved in memory, instead of 16 (videos + transitions). This is the result tested on my laptop:

Screencast.from.01-23-2024.03.14.16.PM.webm

I'm going to test it on ergoCub.

cc @traversaro @GiulioRomualdi @Nicogene

@martinaxgloria
Copy link
Member Author

martinaxgloria commented Jan 23, 2024

I did the test on the ergocub-head on bench and this is what I obtaned:

ergocubemotions.mp4

@GiulioRomualdi, @S-Dafarra, @traversaro could you please review?

@martinaxgloria martinaxgloria marked this pull request as ready for review January 23, 2024 15:24
#[expression_3]
#name shy
#type image
#file expressions/images/exp_img_3.png
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these commented lines are not used? can we get rid of them?

Copy link
Member Author

@martinaxgloria martinaxgloria Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept them to have an example of how to handle images instead of videos. So far, we haven't used them, but if we need, we will just uncomment them. If you think that they're not necessary, I'll remove those lines

Copy link
Member

@Nicogene Nicogene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a minor comment, great work!

@Nicogene Nicogene merged commit 1533382 into icub-tech-iit:master Jan 23, 2024
7 checks passed
@martinaxgloria martinaxgloria deleted the fix-ergocubemotions branch January 23, 2024 15:54
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.

ergoCubEmotions uses more than 100% of the cpu on ergocub-head
2 participants