-
Notifications
You must be signed in to change notification settings - Fork 42
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
Adding a message type for Log messages that will be sent out over the… #53
Conversation
For reference this is a migration of the rosgraph_msgs/Log in ROS1: http://docs.ros.org/melodic/api/rosgraph_msgs/html/msg/Log.html
The primary changes are changing the constant values and dropping the topics. The enum values have changed from a bitmask like approach to a sequential approach with padding. This is matching the values in rcutils: https://github.com/ros2/rcutils/blob/master/include/rcutils/logging.h#L156-L165 Since we're using an enum and I don't believe that we're planning to support custom logging levels I'd suggest that we restore the old enum values for consistency adding 0 for UNSET. |
This comment is only partially true. The name might be a node name but it can also be any other user defined string.
The logging system already does support arbitrary numbers in between. So the constants should match the implementation exactly. The type should be changed from
Since there is no semantic associated to |
I'll update the comment to mention that the field is meant to represent the name of the logger used to log this message. The logger name won't exactly match the node name anyways
I'll change the type from |
Don't forget to add msg/Log.msg to the rosidl_generate_interfaces call |
Header -> std_msgs/Header |
Thanks for the feedback @mlautman. I've added the Log.msg to the rosidl_generate_interface call in CMake. I've also removed the header from the Log message for now since it would add a dependency on std_msgs from common_interfaces. In the conversation on issue #50, there was a desire to not have any new dependencies added in front of rcl. |
Seems strange to not be able to depend on a core library like std_msgs. The header field is really useful |
That statement is taken out of context. It is undesired to add a dependency to the |
It may make sense for the Header message definition to be moved into rcl_interfaces. If that's the case then the Log message could add it back in as a field. However, should that be done for this pull request or should we move forward with the Log message as defined in this request and then create a new issue for the follow up work of moving either |
The |
That may beg the question of if frame id belongs inside of |
I would say no... The header is used mostly in the sensor messages where data both has a creation time and a physical origin location, in which case the frame id makes sense. I think it's just convenient for people to grab the header when they needed a timestamp and/or a sequence number (sequence number is no longer in ROS 2's header message). Personally, I think this is a case of "Header abuse". |
The std_msgs/Header has significant meaning for physically connected data which is almost all data at the robotic developer level or robot application level. What we're doing here is much more internal to the middleware. We could define a new datatype but we've already deprecated the sequence number in the header and if you remove the frame_id it's just a timestamp. So just using a raw timestamp is actually really all that there is to a std_msgs/Header if we don't want the frame_id. There's probably a slightly better name for std_msgs/Header but since it's used throughout the ROS ecosystem in it's current name, changing it is much more of a hassle than it's worth. |
Alright, good to know. I'll go ahead and add timestamp as a Time type field |
…nt for the name field.
… that aren't applicable to Log messages Co-Authored-By: nburek <[email protected]>
Added for the Time datatype.
Add |
Thanks Mike. I'm actually in the middle of doing that now and verifying it builds locally. Will update pull request in a minute. |
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.
This lgtm and it's passing CI.
Adding a message type for Log messages that will be sent out over the rosout topic.
Issue for this request: #50