Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

Fix: rospy logger format %f microseconds#2367

Closed
rafa-martin wants to merge 1 commit intoros:noetic-develfrom
rafa-martin:fix/noetic/timestamp-microseconds
Closed

Fix: rospy logger format %f microseconds#2367
rafa-martin wants to merge 1 commit intoros:noetic-develfrom
rafa-martin:fix/noetic/timestamp-microseconds

Conversation

@rafa-martin
Copy link
Copy Markdown

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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants