Skip to content

replace std streams with ROS logging #590

@christianrauch

Description

@christianrauch

Describe the bug
Parts of the code base is using std streams, such as std::cerr, instead of the ROS logging. This makes it difficult to control and redirect the output within the ROS logging system.

To Reproduce
See

void Sinusoid::debug()
{
std::cout << "offset=" << offset_ << " amplitude=" << amplitude_ << " phase=" << phase_
<< " frequency=" << frequency_ << std::endl;
}
,
std::cerr << e.what() << '\n';
, and
std::cerr << "PID: Invalid gains: " << error_msg << ". Skipping new gains." << std::endl;
for example.

Expected behavior
These and other occurances should use the ROS logging intrastructure.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [e.g. Ubuntu]
  • Version [e.g. Humble]
  • Anything that may be unusual about your environment

Additional context
Add any other context about the problem here, especially include any modifications to ros2_control that relate to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions