Skip to content

Commit

Permalink
added log level to components
Browse files Browse the repository at this point in the history
  • Loading branch information
jwallace42 committed Aug 21, 2022
1 parent 8be8d75 commit 23ea5fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nav2_bringup/launch/bringup_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def generate_launch_description():
autostart = LaunchConfiguration('autostart')
use_composition = LaunchConfiguration('use_composition')
use_respawn = LaunchConfiguration('use_respawn')
log_level = LaunchConfiguration('log_level')

# Map fully qualified names to relative ones so the node's namespace can be prepended.
# In case of the transforms (tf), currently, there doesn't seem to be a better alternative
Expand Down Expand Up @@ -107,6 +108,10 @@ def generate_launch_description():
'use_respawn', default_value='False',
description='Whether to respawn if a node crashes. Applied when composition is disabled.')

declare_log_level_cmd = DeclareLaunchArgument(
'log_level', default_value='info',
description='log level')

# Specify the actions
bringup_cmd_group = GroupAction([
PushRosNamespace(
Expand All @@ -119,6 +124,7 @@ def generate_launch_description():
package='rclcpp_components',
executable='component_container_isolated',
parameters=[configured_params, {'autostart': autostart}],
arguments=['--ros-args', '--log-level', log_level],
remappings=remappings,
output='screen'),

Expand Down Expand Up @@ -171,6 +177,7 @@ def generate_launch_description():
ld.add_action(declare_autostart_cmd)
ld.add_action(declare_use_composition_cmd)
ld.add_action(declare_use_respawn_cmd)
ld.add_action(declare_log_level_cmd)

# Add the actions to launch all of the navigation nodes
ld.add_action(bringup_cmd_group)
Expand Down

0 comments on commit 23ea5fb

Please sign in to comment.