Skip to content

Commit

Permalink
Reduce verbosity of some nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
miloszlagan committed Dec 20, 2024
1 parent 62ee399 commit 5512d6c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 29 deletions.
37 changes: 32 additions & 5 deletions husarion_ugv_controller/launch/controller.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,25 @@ def generate_launch_description():
)
robot_description = {"robot_description": robot_description_content}

joint_state_broadcaster_log_level = PythonExpression(
[
"'",
namespace,
"' + '.joint_state_broadcaster:=INFO' if '",
namespace,
"' else 'joint_state_broadcaster:=INFO'",
]
)
controller_manager_log_level = PythonExpression(
[
"'",
namespace,
"' + '.controller_manager:=INFO' if '",
namespace,
"' else 'controller_manager:=INFO'",
]
)

control_node = Node(
package="controller_manager",
executable="ros2_control_node",
Expand Down Expand Up @@ -246,6 +265,19 @@ def generate_launch_description():
"_joint_state_broadcaster/transition_event",
),
],
arguments=[
"--ros-args",
"--log-level",
log_level,
"--log-level",
"rcl:=INFO",
"--log-level",
"pluginlib.ClassLoader:=INFO",
"--log-level",
joint_state_broadcaster_log_level,
"--log-level",
controller_manager_log_level,
],
condition=UnlessCondition(use_sim),
emulate_tty=True,
)
Expand Down Expand Up @@ -289,11 +321,6 @@ def generate_launch_description():
"controller_manager",
"--controller-manager-timeout",
"10",
"--ros-args",
"--log-level",
log_level,
"--log-level",
"rcl:=INFO",
],
namespace=namespace,
emulate_tty=True,
Expand Down
5 changes: 0 additions & 5 deletions husarion_ugv_gazebo/launch/simulate_robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,6 @@ def generate_launch_description():
"world",
"--child-frame-id",
child_tf,
"--ros-args",
"--log-level",
log_level,
"--log-level",
"rcl:=INFO",
],
namespace=namespace,
emulate_tty=True,
Expand Down
9 changes: 0 additions & 9 deletions lynx_description/launch/load_urdf.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@ def generate_launch_description():
),
)

log_level = LaunchConfiguration("log_level")
declare_log_level_arg = DeclareLaunchArgument(
"log_level",
default_value="info",
description="Logging level",
)

namespace = LaunchConfiguration("namespace")
declare_namespace_arg = DeclareLaunchArgument(
"namespace",
Expand Down Expand Up @@ -184,7 +177,6 @@ def generate_launch_description():
package="joint_state_publisher",
executable="joint_state_publisher",
namespace=namespace,
arguments=["--ros-args", "--log-level", log_level, "--log-level", "rcl:=INFO"],
emulate_tty=True,
condition=IfCondition(add_wheel_joints),
)
Expand All @@ -195,7 +187,6 @@ def generate_launch_description():
declare_components_config_path_arg,
declare_wheel_type_arg, # wheel_type is used by controller_config_path
declare_controller_config_path_arg,
declare_log_level_arg,
declare_namespace_arg,
declare_use_sim_arg,
declare_wheel_config_path_arg,
Expand Down
10 changes: 0 additions & 10 deletions panther_description/launch/load_urdf.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ def generate_launch_description():
),
)

log_level = LaunchConfiguration("log_level")
declare_log_level_arg = DeclareLaunchArgument(
"log_level",
default_value="info",
description="Logging level",
)

namespace = LaunchConfiguration("namespace")
declare_namespace_arg = DeclareLaunchArgument(
"namespace",
Expand Down Expand Up @@ -176,15 +169,13 @@ def generate_launch_description():
{"frame_prefix": namespace_ext},
],
namespace=namespace,
arguments=["--ros-args", "--log-level", log_level, "--log-level", "rcl:=INFO"],
emulate_tty=True,
)

joint_state_publisher_node = Node(
package="joint_state_publisher",
executable="joint_state_publisher",
namespace=namespace,
arguments=["--ros-args", "--log-level", log_level, "--log-level", "rcl:=INFO"],
emulate_tty=True,
condition=IfCondition(add_wheel_joints),
)
Expand All @@ -195,7 +186,6 @@ def generate_launch_description():
declare_components_config_path_arg,
declare_wheel_type_arg, # wheel_type is used by controller_config_path
declare_controller_config_path_arg,
declare_log_level_arg,
declare_namespace_arg,
declare_use_sim_arg,
declare_wheel_config_path_arg,
Expand Down

0 comments on commit 5512d6c

Please sign in to comment.