Skip to content
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

Merged
merged 3 commits into from
Nov 13, 2024
Merged

Conversation

christophfroehlich
Copy link
Contributor

#543 with additional local variables/methods for logging, which are available from jazzy on only.

christophfroehlich and others added 2 commits November 2, 2024 20:44
* 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>
@christophfroehlich
Copy link
Contributor Author

@Mergifyio backport iron

Copy link
Contributor

mergify bot commented Nov 2, 2024

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());
Copy link
Member

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());
Copy link
Member

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());
Copy link
Member

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());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing throttle here

@christophfroehlich
Copy link
Contributor Author

@saikishor we have the problems with throttling in the plugins, remember #603 ;)

Copy link
Member

@saikishor saikishor left a 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

@christophfroehlich christophfroehlich merged commit 105f3e4 into humble Nov 13, 2024
7 of 8 checks passed
@christophfroehlich christophfroehlich deleted the backport/humble/543 branch November 13, 2024 10:34
mergify bot pushed a commit that referenced this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants