-
Notifications
You must be signed in to change notification settings - Fork 192
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
Refactor logging (backport #543) #619
Conversation
* Refactor logging for example 1 - 6 * Update logger for remaining examples * Revert change to copyright * Revert "Reduce update rate to avoid clogging the log" This reverts commit 10f2e22. * Don't use throttling for example_6 * Update example_1/doc/userdoc.rst Co-authored-by: Felix Exner (fexner) <felix_mauch@web.de> * Update example_2/doc/userdoc.rst Co-authored-by: Felix Exner (fexner) <felix_mauch@web.de> * Updating docs * Merge into one logging statement * Remove throttled logging from example_14 * Apply suggestions from code review Co-authored-by: Felix Exner (fexner) <felix_mauch@web.de> --------- Co-authored-by: Felix Exner (fexner) <felix_mauch@web.de>
@Mergifyio backport iron |
✅ Backports have been created
|
data.str().c_str()); | ||
send(sock_, data.str().c_str(), strlen(data.str().c_str()), 0); | ||
ss << "Sending data command: " << data.str() << std::endl; | ||
RCLCPP_INFO(get_logger(), ss.str().c_str()); |
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.
@christophfroehlich is throttle missing here?
ss << "Got measured velocity " << measured_velocity << std::endl; | ||
ss << "Got state " << hw_joint_state_ << " for joint '" << info_.joints[0].name << "'" | ||
<< std::endl; | ||
RCLCPP_INFO(get_logger(), ss.str().c_str()); |
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.
@christophfroehlich here as well?
ss << std::fixed << std::setprecision(2) << std::endl | ||
<< "\t" << hw_joint_state_ << " for joint '" << info_.joints[0].name << "'"; | ||
|
||
RCLCPP_INFO(get_logger(), "%s", ss.str().c_str()); |
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.
missing throttle here
|
||
RCLCPP_INFO(rclcpp::get_logger("RRBotModularJoint"), "Joints successfully written!"); | ||
RCLCPP_INFO(get_logger(), "%s", ss.str().c_str()); |
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.
missing throttle here
@saikishor we have the problems with throttling in the plugins, remember #603 ;) |
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.
You are right! Looks good to me
#543 with additional local variables/methods for logging, which are available from jazzy on only.