Trace terminal output to program
Does anyone know how I can trace the terminal output to the actual program where it is coming from? I have listed all nodes, search through the program's source codes with VS Code and terminal search, but I just can't find the "print" or "cout" where that text is originating from.
Here is what I'm trying to do: Run autonomous map exploration on ROS noetic (simulation for now) using turtlebot3. I found github repo from "fazildgr8 /ros_autonomous_slam " But it is not autonomously moving. Autonomy fails, I'm trying to find out why, but can't add print statements and watch the terminal output, because too much other stuff that is irrelevant is being printed. Which leads me to this question.
Here some of the output, I'm trying to suppress:
m_count 556
Average Scan Matching Score=202.256
neff= 99.9999
Registering Scans:Done
update frame 1671
update ld=2.48113e-07 ad=2.22128e-06
Laser Pose= -2.06351 0.500132 -3.14022
m_count 557
Average Scan Matching Score=203.167
neff= 99.9999
Registering Scans:Done
update frame 1674
update ld=2.49394e-07 ad=2.23275e-06
Laser Pose= -2.06351 0.500132 -3.14021
m_count 558
Average Scan Matching Score=203.222
neff= 99.9999
Registering Scans:Done
update frame 1677
update ld=2.49809e-07 ad=2.23646e-06
Laser Pose= -2.06351 0.500133 -3.14021
m_count 559
Average Scan Matching Score=203.229
neff= 99.9999
Registering Scans:Done
update frame 1680
update ld=2.49819e-07 ad=2.23655e-06
Laser Pose= -2.06351 0.500133 -3.14021
m_count 560
Average Scan Matching Score=202.238
neff= 99.9999
Registering Scans:Done
update frame 1683
update ld=2.50245e-07 ad=2.24037e-06
Laser Pose= -2.06351 0.500133 -3.14021
I have looked at the topics and noticed, nothing is being published on the /cmd_vel
topic. And that started the curiosity, by adding print statements in the move_base node, which is according to rqt_graph publishing the topic. But rostopic echo /cmd_vel results no info, just a Warning, questioning if anything is being published on that topic.
So, does anyone know how I could find the source of all that text being printed to the console?
Thank you