0
$\begingroup$

Rosanswers logo

Hi community!

In the .ros/log/{cryptic_someting}/ folder I see some nodes create their own log files: E.g.: controller_spawner-3.log or rqt_robot_steering-5.log

How can I achieve that for my own nodes? - Until now all my log messages are written in the roslaunch.log

Thanks in advance Alex


Originally posted by alex_ on ROS Answers with karma: 67 on 2020-10-16

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

using ROS_INFO function to display the log message and you can do this by setting output="log" to a node in the launch file.

Reference


Originally posted by miura with karma: 1908 on 2020-10-16

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by alex_ on 2020-10-19:
It worked thanks. Extra question: Do you know how to set it up that it logs to the separate file AND outputs to the screen?

Comment by MadeleineP on 2020-10-19:
Do you mean: output="log" ? There is no 'display' parameter in node.

Comment by miura on 2020-10-19:
@alex_ I'm glad I could help you. may be you can use the tee command. If you want to have any further interaction, please do so on a separate question page.

Comment by miura on 2020-10-19:
@MadeleineP Thank you for pointing this out. You are right. I have reflected it.

Comment by MadeleineP on 2020-10-19:
@Miura, I have added output="log" to my launch file, and I receive all of my ROS_INFO messages in rosout.log. A separate log file for my node is not being created. However, several other nodes are logging to their own log files. Is there something else I need to do? Thanks.

Comment by jarvisschultz on 2020-10-19:
@MadeleineP You are probably running into the behavior described in this question that also includes a link to an open bug report.

Comment by alex_ on 2020-10-20:
@MadeleineP The answer from miura san worked for me (Ubuntu 16.04) therefore I marked it as correct.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.