-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add clock plugin with basic functionality #70
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #70 +/- ##
==========================================
+ Coverage 83.19% 83.36% +0.17%
==========================================
Files 14 16 +2
Lines 964 1004 +40
==========================================
+ Hits 802 837 +35
- Misses 162 167 +5 ☔ View full report in Codecov by Sentry. |
Remove useless project statement Co-authored-by: Silvio Traversaro <[email protected]>
8f6967f
to
e7426c7
Compare
@traversaro I tried to develop a first basic unit test for the clock plugin, here: The unit test instantiates a gazebo server fixture and reads the Next I will try to add test to check other expected behaviors, like the pause and reset of simulation. |
In this way it is possible to avoid desctruction and re-construction of the plugin object with consequent closing of the yarp port.
In commit 5acde4f I've implemented the Unfortunately I've been not able to implement a unit test since the Server object does not expose a Some issues and PRs talking about reset: |
plugins/clock/Clock.cc
Outdated
{ | ||
if (_info.paused) | ||
{ | ||
// yDebug() << "Simulation pause, skipping clock update"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// yDebug() << "Simulation pause, skipping clock update"; | |
// yDebug() << "Simulation pause, skipping clock update"; |
Similarly, if a message is commented, we can just remove it from the code to keep code simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small comment regarding unnecessary debug messages. Beside that, I think it is good to go, remember to squash commits!
Co-authored-by: Silvio Traversaro <[email protected]>
This PR adds to the gz-sim-yarp-plugins a clock plugin, with the only basic functionality of writing the current simulation time on the yarp
/clock
port.Closes #60 , #73