set log level in launch file
Is there a way to set the log level for a node in a launch file?
I would find this practical.
Cheers, Gaël
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Is there a way to set the log level for a node in a launch file?
I would find this practical.
Cheers, Gaël
Self answer: http://wiki.ros.org/rosconsole#Config...
The feature is not launch-file specific and works by setting an environment variable to a configuration file.
Combining calling rosservice in launch file and setting log level with rosservice, the launch-file specific way would be the following
<node pkg="rosservice" type="rosservice" name="set_move_base_log_level" args="call --wait /move_base/set_logger_level 'ros.move_base' 'debug'" />
I wouldn't be surprised if there's a proper launch file specific way of doing this... if someone knows, please enlighten us!
Sometimes a rosnode cleanup
is required prior to the launch that contains this, otherwise the --wait
results in this (at least in noetic)
Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 152, in wait_for_service
uri = contact_service(resolved_name)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 113, in contact_service
s.connect(addr)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
...
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/rostime.py", line 190, in get_rostime
raise rospy.exceptions.ROSInitException("time is not initialized. Have you called init_node()?")
rospy.exceptions.ROSInitException: time is not initialized. Have you called init_node()?
Well I just tried it in kinetik like this:
<group if="$(arg use_DEBUG_OUTPUT)" >
<node pkg="rosservice" type="rosservice" name="set_logger_level" args="call /tf_mapping_node/set_logger_level '{logger: 'rosout', level: 'ERROR'}'"/>
</group>
But it somehow failes for me....
Asked: 2014-11-21 09:24:25 -0600
Seen: 22,638 times
Last updated: Apr 04 '21
Can I call one .launch file from another .launch file?
Spawn and kill nodes from nodes/smach
Debug output within a launch file
combining launch files doesn't give same behavior: order / timing of ik solver
Multiple Kinects - 2nd openni_node never publishes anything
launch a node within another node
openni camera launch multikinect
What is the manifest.xml convention for dependencies of launch files?
roslaunch ocl deployer node does not recognize '-s foo.ops --'