ros-controls / ros-controls/control_toolbox

replace std streams with ROS logging

Open
#590 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good second issue help wanted persistent
Dominant language
C++
Stars
176
Forks
124
Avg merge
3h 44m
Merged PRs (30d)
9

Description

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 https://github.com/ros-controls/control_toolbox/blob/e0b69576213896613cac6210011bcd5e98fc65c4/control_toolbox/src/sinusoid.cpp#L59-L63, https://github.com/ros-controls/control_toolbox/blob/e0b69576213896613cac6210011bcd5e98fc65c4/control_toolbox/src/pid.cpp#L141, and https://github.com/ros-controls/control_toolbox/blob/e0b69576213896613cac6210011bcd5e98fc65c4/control_toolbox/src/pid.cpp#L151 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with control_toolbox/src/sinusoid.cpp at lines 59-63 and control_toolbox/src/pid.cpp at lines 141 and 151, then search the codebase for other standard-stream output. Replace the identified occurrences with the ROS logging infrastructure and verify that no relevant diagnostic output still uses std::cerr or similar streams.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.