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

Fix: rospy logger format %f microseconds #2367

Conversation

rafa-martin
Copy link

With the following ROSCONSOLE_FORMAT=[${severity}] [${time:%Y-%m-%d %H:%M:%S.%f}] ... the console output from rospy info function:

[INFO] [2024-01-16 23:46:27.%f] ...

The problem here is, date class does't use "%f" to match microseconds link.

This issue can be addressed to way:

  1. Calculate microseconds and replace each "%f" with calculated
  2. Change time class to datetime class

This PR uses first aproach. Now output of python node is:

[INFO] [2024-01-16 23:46:27.920983] ...

Aditional info:

@peci1
Copy link
Contributor

peci1 commented Feb 20, 2024

I've implemented option 2 in #2370 .

@rafa-martin rafa-martin deleted the fix/noetic/timestamp-microseconds branch June 26, 2024 21:00
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.

2 participants