Ros logging
Public API Changes
Implements Javascript logging functionality similar to ROS logging functions logwarn, logerr, etc.
Description
Created a JS file implementing functions which log to the console and publish to rosout based on the ROS logging level. Created an example file to demonstrate how the functions are used.
Resolves #352
The logging is all in an example. Would be best to make this part of the library IMO.
@sea-bass @EzraBrooks What do you think of this PR?
@sea-bass @EzraBrooks What do you think of this PR?
I would probably prefer to have this be part of the protocol and have the Python backend do actual logging calls through rclpy.
I say this because publishing to /rosout is a limited subset of logging that notably does not make it into console or log file -- see, e.g., https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Logging.html#overview
Agreed. I think the "most correct" way to implement this with my knowledge of ROS logging would be to create a protocol-level API in rosbridge + roslib that allows creating namespaced child loggers in the Python backend and then forwarding log content to those from a roslibjs log call. There are some issues with that approach, as we've seen in moveit2, but we're working on fixing them in ROS itself.
I agree with the vision of @sea-bass @EzraBrooks therefore I am closing this PR.