Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Error Reporting and Reduce Log Redundancy (#327)
### Changelog None ### Docs None ### Description <!-- Describe the problem, what has changed, and motivation behind those changes. Pretend you are advocating for this change and the reader is skeptical. --> The ROS 1 foxglove_bridge rejects parameter names with `.` and spams the terminal with redundant error messages. While it is possible for ROS 1 parameters to have a `.` in their name, they are not "supposed" to (`Character [.] is not valid in Graph Resource Name`). For this reason, the foxglove_bridge will keep raising errors for parameter names with `.` This PR addresses the error handling part of this issue: an unordered set tracks the encountered invalid parameters to throttle error log messages. <!-- In addition to unit tests, describe any manual testing you did to validate this change. --> <table><tr><th>Before</th><th>After</th></tr><tr><td> The bridge std_out gets periodically spammed with the same error messages until the invalid parameter is removed. In the app, the only visible error message is too vague. <img width="824" alt="error_log_before" src="https://github.com/user-attachments/assets/b7628362-5e36-497e-b3b2-485fc18edf68"> </td><td> The bridge std_out only prints errors when invalid parameters are first encountered—one error message per invalid parameter. In the app, the error message lists the invalid parameters. <img width="818" alt="error_log_after" src="https://github.com/user-attachments/assets/1ac6b9d6-3f3f-4b01-b032-d5615438bac5"> </td></tr></table>
- Loading branch information