Setting ros log level in launchfile does not work

asked 2020-04-15 08:46:16 -0500

didi1311 gravatar image

updated 2020-04-15 09:02:16 -0500

I want to run some node using a launchfile and want to disable the DEBUG log (I only want to set the log level to INFO and above) on terminal. I've already tried using a rosconsole config file as specified here. But, when I launch the launchfile, the debug outputs are still printed on the terminal.

Here is my rosconsole.conf file which is located in my_package/config/rosconsole.conf:

# Set the default ros output to INFO and higher
log4j.logger.ros=INFO

And this is how I include it in the launchfile:

<launch>
  <env name="ROSCONSOLE_CONFIG_FILE" value="$(find my_package)/config/rosconsole.conf"/>

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <param name="some_param" value="some_value"/>
    <param name="some_other_param" value="some_value"/>
  </node>

  <node pkg="my_package" type="some_node" respawn="false" name="some_node" output="screen">
    <param name="some_param" value="some_value"/>
    <param name="some_other_param" value="some_value"/>
  </node>
</launch>

When I launch the launchfile, the terminal output looks like this. As we can see, the DEBUG logs are still printed on the terminal.

[ INFO] [1586957212.870558945, 114.123000000]: START
[DEBUG] [1586957218.315616627, 115.588000000]: Getting status over the wire.
[DEBUG] [1586957218.315955720, 115.588000000]: Trying to transition to ACTIVE
[DEBUG] [1586957218.316061459, 115.588000000]: Transitioning CommState from WAITING_FOR_GOAL_ACK to ACTIVE
[DEBUG] [1586957218.316162601, 115.588000000]: Transitioning SimpleState from [PENDING] to [ACTIVE]
[DEBUG] [1586957218.319201167, 115.590000000]: received full new map, resizing to: 2112, 2112

Any idea on why that does not work?

Edit: added terminal output example

edit retag flag offensive close merge delete