-
Notifications
You must be signed in to change notification settings - Fork 308
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
CM: Check if a valid time is received #1901
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1901 +/- ##
==========================================
- Coverage 87.59% 87.55% -0.04%
==========================================
Files 122 122
Lines 12766 12774 +8
Branches 1146 1147 +1
==========================================
+ Hits 11182 11184 +2
- Misses 1155 1161 +6
Partials 429 429
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Personally I would throw an error! Probably we can do that in the constructor of the CM?
Haven't tried that but there are SE answers that clock()->now() with sim_time is always zero in the constructor of a node. |
We could just use the time argument instead, and maybe use a throttled/once warning? |
This definitively fixes the issues I recently faced, thank you for fixing that. Regarding the discussion I think it's good to be verbose about this. A throttled warning seems suitable in my opinion. But it would be good if the warning could point users to how to actually fix that problem if it occurs. |
I just realized that we cannot use the throttle as the clock is not working |
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.
Sounds fine!
Just some minor changes
Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
This reverts commit 5ee083c.
Co-authored-by: Felix Exner (fexner) <exner@fzi.de>
This pull request is in conflict. Could you fix it @christophfroehlich? |
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.
Tested this locally with both, a /clock topic present and not. The result was as expected and the output is helpful in case of the missing clock topic.
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.
Some changes that might bring back the failing tests.
Sorry, it got mixed up with my Diagnostics update.
Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
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.
Thanks
With use_sim_time=true but nothing received on /clock topic, we get a not so nice exception
ros-controls/gz_ros2_control#439
Not sure if we should escalate and throw an error or spam the console with log output.