Skip to content

Prefix cmd's name becomes the name of the launch output logger #938

@Volksfest

Description

@Volksfest

Generated by Generative AI

No response

Operating System:

Linux

ROS version or commit hash:

jazzy

RMW implementation (if applicable):

Default. I assume FastDDS?

RMW Configuration (if applicable):

Nothing

Client library (if applicable):

irrelevant

'ros2 doctor --report' output

ros2 doctor --report
   NETWORK CONFIGURATION
inet         : 127.0.0.1
inet4        : ['127.0.0.1']
inet6        : ['::1']
netmask      : 255.0.0.0
device       : lo
flags        : 73<UP,LOOPBACK,RUNNING>
mtu          : 65536
inet         : 192.168.1.30
inet4        : ['192.168.1.30']
ether        : c8:4b:d6:be:e6:93
inet6        : ['fe80::792f:bcf9:248f:a5f4%enxc84bd6bee693']
netmask      : 255.255.255.0
device       : enxc84bd6bee693
flags        : 4163<UP,BROADCAST,MULTICAST,RUNNING>
mtu          : 1500
broadcast    : 192.168.1.255
inet         : 192.168.122.1
inet4        : ['192.168.122.1']
ether        : 52:54:00:bb:55:0d
netmask      : 255.255.255.0
device       : virbr0
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 192.168.122.255
inet         : 100.116.48.17
inet4        : ['100.116.48.17']
inet6        : ['fd7a:115c:a1e0::b201:3015', 'fe80::c153:270:988f:b157%tailscale0']
netmask      : 255.255.255.255
device       : tailscale0
flags        : 4305<NOARP,UP,PTP,RUNNING,MULTICAST>
mtu          : 1280
inet         : 192.168.1.239
inet4        : ['192.168.1.239']
ether        : 04:7b:cb:c1:83:0e
inet6        : ['fe80::51a1:5761:e430:d00f%wlp1s0']
netmask      : 255.255.255.0
device       : wlp1s0
flags        : 4163<UP,BROADCAST,MULTICAST,RUNNING>
mtu          : 1500
broadcast    : 192.168.1.255
inet         : 172.21.0.1
inet4        : ['172.21.0.1']
ether        : ae:5b:8f:4e:40:30
netmask      : 255.255.0.0
device       : br-c65c679998bf
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 172.21.255.255
inet         : 192.168.56.1
inet4        : ['192.168.56.1']
ether        : 92:b9:44:44:0e:cc
netmask      : 255.255.255.0
device       : br-f2cb5252c6c8
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 192.168.56.255
inet         : 172.24.0.1
inet4        : ['172.24.0.1']
ether        : b6:f2:70:f3:f5:35
netmask      : 255.255.0.0
device       : br-02f583edb822
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 172.24.255.255
inet         : 172.20.0.1
inet4        : ['172.20.0.1']
ether        : be:c0:96:f0:93:29
netmask      : 255.255.0.0
device       : br-1c135950f1db
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 172.20.255.255
inet         : 172.18.0.1
inet4        : ['172.18.0.1']
ether        : 2e:2c:ad:51:b7:79
netmask      : 255.255.0.0
device       : br-1d8a73cef68b
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 172.18.255.255
inet         : 172.17.0.1
inet4        : ['172.17.0.1']
ether        : d6:bd:4b:7a:70:af
netmask      : 255.255.0.0
device       : docker0
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 172.17.255.255
inet         : 172.25.0.1
inet4        : ['172.25.0.1']
ether        : 1a:0b:4a:7d:89:6d
netmask      : 255.255.0.0
device       : br-723b77ff3c52
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 172.25.255.255
inet         : 172.23.0.1
inet4        : ['172.23.0.1']
ether        : 56:97:e8:ec:c3:8d
netmask      : 255.255.0.0
device       : br-a1ab01223af6
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 172.23.255.255
inet         : 172.22.0.1
inet4        : ['172.22.0.1']
ether        : aa:dd:4b:45:d0:0f
netmask      : 255.255.0.0
device       : br-a5fe8a03e60f
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 172.22.255.255
inet         : 172.19.0.1
inet4        : ['172.19.0.1']
ether        : 3e:c7:f8:e1:64:83
netmask      : 255.255.0.0
device       : br-b528c16831e0
flags        : 4099<UP,BROADCAST,MULTICAST>
mtu          : 1500
broadcast    : 172.19.255.255
ether        : 16:61:ef:18:68:21
device       : wwan0
flags        : 4226<NOARP,BROADCAST,MULTICAST>
mtu          : 1500

   PACKAGE VERSIONS
some_example                              : latest=N/A, local=0.0.0
ament_cmake_gmock                         : latest=2.5.5, local=2.5.3
rclpy                                     : latest=7.1.8, local=7.1.3
ament_cmake_pep257                        : latest=0.17.3, local=0.17.1
rosidl_typesupport_c                      : latest=3.2.2, local=3.2.2
ament_cpplint                             : latest=0.17.3, local=0.17.1
ament_flake8                              : latest=0.17.3, local=0.17.1
rosidl_core_runtime                       : latest=0.2.0, local=0.2.0
examples_rclcpp_minimal_publisher         : latest=0.19.7, local=0.19.4
ament_clang_format                        : latest=0.17.3, local=0.17.1
lifecycle_msgs                            : latest=2.0.3, local=2.0.2
ament_lint                                : latest=0.17.3, local=0.17.1
spdlog_vendor                             : latest=1.6.1, local=1.6.1
ament_cmake_export_libraries              : latest=2.5.5, local=2.5.3
rosidl_adapter                            : latest=4.6.7, local=4.6.5
python_cmake_module                       : latest=0.11.1, local=0.11.1
rclcpp_action                             : latest=28.1.15, local=28.1.6
ament_xmllint                             : latest=0.17.3, local=0.17.1
ament_cmake_lint_cmake                    : latest=0.17.3, local=0.17.1
rosidl_generator_type_description         : latest=4.6.7, local=4.6.5
launch_testing                            : latest=3.4.10, local=3.4.3
ament_cmake_python                        : latest=2.5.5, local=2.5.3
rcl_lifecycle                             : latest=9.2.8, local=9.2.4
sros2                                     : latest=0.13.5, local=0.13.2
ament_pep257                              : latest=0.17.3, local=0.17.1
rpyutils                                  : latest=0.4.2, local=0.4.1
rclcpp_components                         : latest=28.1.15, local=28.1.6
rosidl_generator_cpp                      : latest=4.6.7, local=4.6.5
rosgraph_msgs                             : latest=2.0.3, local=2.0.2
stereo_msgs                               : latest=5.3.6, local=5.3.5
rosidl_cmake                              : latest=4.6.7, local=4.6.5
rosidl_default_generators                 : latest=1.6.0, local=1.6.0
action_msgs                               : latest=2.0.3, local=2.0.2
ros2multicast                             : latest=0.32.7, local=0.32.2
ament_cmake_target_dependencies           : latest=2.5.5, local=2.5.3
ament_cmake_pytest                        : latest=2.5.5, local=2.5.3
rcutils                                   : latest=6.7.5, local=6.7.2
rosidl_runtime_py                         : latest=0.13.1, local=0.13.1
class_loader                              : latest=2.7.0, local=2.7.0
ament_cmake_uncrustify                    : latest=0.17.3, local=0.17.1
rosidl_cli                                : latest=4.6.7, local=4.6.5
ros_environment                           : latest=4.2.1, local=4.2.1
ros2action                                : latest=0.32.7, local=0.32.2
rosidl_runtime_c                          : latest=4.6.7, local=4.6.5
trajectory_msgs                           : latest=5.3.6, local=5.3.5
pluginlib                                 : latest=5.4.4, local=5.4.2
rmw_fastrtps_shared_cpp                   : latest=8.4.3, local=8.4.1
fastrtps_cmake_module                     : latest=3.6.3, local=3.6.1
launch_yaml                               : latest=3.4.10, local=3.4.3
type_description_interfaces               : latest=2.0.3, local=2.0.2
sros2_cmake                               : latest=0.13.5, local=0.13.2
ament_cmake_export_dependencies           : latest=2.5.5, local=2.5.3
rosidl_typesupport_fastrtps_c             : latest=3.6.3, local=3.6.1
osrf_pycommon                             : latest=2.1.7, local=2.1.5
ros2node                                  : latest=0.32.7, local=0.32.2
launch_ros                                : latest=0.26.11, local=0.26.6
rclcpp                                    : latest=28.1.15, local=28.1.6
ament_cmake_clang_tidy                    : latest=0.17.3, local=0.17.1
ros2lifecycle                             : latest=0.32.7, local=0.32.2
ament_cmake_ros                           : latest=0.12.0, local=0.12.0
composition_interfaces                    : latest=2.0.3, local=2.0.2
ros2param                                 : latest=0.32.7, local=0.32.2
ament_cmake_clang_format                  : latest=0.17.3, local=0.17.1
ament_cmake                               : latest=2.5.5, local=2.5.3
ament_cmake_core                          : latest=2.5.5, local=2.5.3
rmw_implementation_cmake                  : latest=7.3.2, local=7.3.1
ament_cppcheck                            : latest=0.17.3, local=0.17.1
ros2run                                   : latest=0.32.7, local=0.32.2
ament_lint_common                         : latest=0.17.3, local=0.17.1
geometry_msgs                             : latest=5.3.6, local=5.3.5
rcl_action                                : latest=9.2.8, local=9.2.4
rosidl_generator_py                       : latest=0.22.2, local=0.22.0
rosidl_parser                             : latest=4.6.7, local=4.6.5
sensor_msgs                               : latest=5.3.6, local=5.3.5
rcl                                       : latest=9.2.8, local=9.2.4
launch_testing_ament_cmake                : latest=3.4.10, local=3.4.3
tinyxml2_vendor                           : latest=0.9.2, local=0.9.1
unique_identifier_msgs                    : latest=2.5.0, local=2.5.0
builtin_interfaces                        : latest=2.0.3, local=2.0.2
ament_cmake_export_definitions            : latest=2.5.5, local=2.5.3
rosidl_typesupport_cpp                    : latest=3.2.2, local=3.2.2
rcpputils                                 : latest=2.11.2, local=2.11.1
ros2interface                             : latest=0.32.7, local=0.32.2
ament_cmake_gtest                         : latest=2.5.5, local=2.5.3
rcl_yaml_param_parser                     : latest=9.2.8, local=9.2.4
rosidl_runtime_cpp                        : latest=4.6.7, local=4.6.5
service_msgs                              : latest=2.0.3, local=2.0.2
ament_clang_tidy                          : latest=0.17.3, local=0.17.1
ros2component                             : latest=0.32.7, local=0.32.2
ros2doctor                                : latest=0.32.7, local=0.32.2
rosidl_pycommon                           : latest=4.6.7, local=4.6.5
rosidl_dynamic_typesupport                : latest=0.1.2, local=0.1.2
ros2launch                                : latest=0.26.11, local=0.26.6
ament_lint_auto                           : latest=0.17.3, local=0.17.1
ament_uncrustify                          : latest=0.17.3, local=0.17.1
ament_cmake_export_targets                : latest=2.5.5, local=2.5.3
ament_cmake_test                          : latest=2.5.5, local=2.5.3
ament_cmake_flake8                        : latest=0.17.3, local=0.17.1
launch                                    : latest=3.4.10, local=3.4.3
shape_msgs                                : latest=5.3.6, local=5.3.5
domain_coordinator                        : latest=0.12.0, local=0.12.0
diagnostic_msgs                           : latest=5.3.6, local=5.3.5
ament_cmake_xmllint                       : latest=0.17.3, local=0.17.1
ament_cmake_copyright                     : latest=0.17.3, local=0.17.1
rmw_fastrtps_cpp                          : latest=8.4.3, local=8.4.1
ros2service                               : latest=0.32.7, local=0.32.2
statistics_msgs                           : latest=2.0.3, local=2.0.2
ament_cmake_version                       : latest=2.5.5, local=2.5.3
ament_cmake_include_directories           : latest=2.5.5, local=2.5.3
ament_package                             : latest=0.16.4, local=0.16.3
rcl_interfaces                            : latest=2.0.3, local=2.0.2
ament_cmake_export_link_flags             : latest=2.5.5, local=2.5.3
rosidl_typesupport_introspection_c        : latest=4.6.7, local=4.6.5
rmw                                       : latest=7.3.2, local=7.3.1
console_bridge_vendor                     : latest=1.7.1, local=1.7.1
libyaml_vendor                            : latest=1.6.3, local=1.6.3
rosidl_dynamic_typesupport_fastrtps       : latest=0.1.0, local=0.1.0
rcl_logging_interface                     : latest=3.1.1, local=3.1.1
ros2topic                                 : latest=0.32.7, local=0.32.2
ament_lint_cmake                          : latest=0.17.3, local=0.17.1
ros2cli                                   : latest=0.32.7, local=0.32.2
ros_core                                  : latest=0.11.0, local=0.11.0
launch_xml                                : latest=3.4.10, local=3.4.3
ament_cmake_libraries                     : latest=2.5.5, local=2.5.3
ament_index_cpp                           : latest=1.8.2, local=1.8.1
libstatistics_collector                   : latest=1.7.4, local=1.7.4
std_srvs                                  : latest=5.3.6, local=5.3.5
nav_msgs                                  : latest=5.3.6, local=5.3.5
rosidl_typesupport_interface              : latest=4.6.7, local=4.6.5
rosidl_typesupport_fastrtps_cpp           : latest=3.6.3, local=3.6.1
ament_cmake_export_include_directories    : latest=2.5.5, local=2.5.3
tracetools                                : latest=8.2.4, local=8.2.3
rosidl_generator_c                        : latest=4.6.7, local=4.6.5
rosidl_default_runtime                    : latest=1.6.0, local=1.6.0
actionlib_msgs                            : latest=5.3.6, local=5.3.5
std_msgs                                  : latest=5.3.6, local=5.3.5
ament_cmake_export_interfaces             : latest=2.5.5, local=2.5.3
ros2cli_common_extensions                 : latest=0.3.1, local=0.3.0
rmw_dds_common                            : latest=3.1.1, local=3.1.0
rcl_logging_spdlog                        : latest=3.1.1, local=3.1.1
rmw_implementation                        : latest=2.15.6, local=2.15.4
ament_cmake_cppcheck                      : latest=0.17.3, local=0.17.1
ament_cmake_auto                          : latest=2.5.5, local=2.5.3
rosidl_core_generators                    : latest=0.2.0, local=0.2.0
ament_copyright                           : latest=0.17.3, local=0.17.1
rosidl_typesupport_introspection_cpp      : latest=4.6.7, local=4.6.5
ament_cmake_cpplint                       : latest=0.17.3, local=0.17.1
ros2pkg                                   : latest=0.32.7, local=0.32.2
rclcpp_lifecycle                          : latest=28.1.15, local=28.1.6
uncrustify_vendor                         : latest=3.0.1, local=3.0.0
ament_index_python                        : latest=1.8.2, local=1.8.1
launch_testing_ros                        : latest=0.26.11, local=0.26.6
ament_cmake_gen_version_h                 : latest=2.5.5, local=2.5.3
common_interfaces                         : latest=5.3.6, local=5.3.5
visualization_msgs                        : latest=5.3.6, local=5.3.5

   PLATFORM INFORMATION
system           : Linux
platform info    : Linux-6.8.0-90-generic-x86_64-with-glibc2.40
release          : 6.8.0-90-generic
processor        : 

   QOS COMPATIBILITY LIST
compatibility status    : No publisher/subscriber pairs found

   RMW MIDDLEWARE
middleware name    : rmw_fastrtps_cpp

   ROS 2 INFORMATION
distribution name      : jazzy
distribution type      : ros2
distribution status    : active
release platforms      : {'debian': ['bookworm'], 'rhel': ['9'], 'ubuntu': ['noble']}

   TOPIC LIST
topic               : none
publisher count     : 0
subscriber count    : 0

Steps to reproduce issue

Simple scripts to use:

  1. The launch file to reproduce (called example.launch.py in a package called some_example):
from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch_ros.actions import Node


def generate_launch_description():

    return LaunchDescription(
        [
            Node(
                package="examples_rclcpp_minimal_publisher",
                executable="publisher_member_function",
                prefix="just_forward"
            ),
            ExecuteProcess(
                cmd=["just_talk"],
                prefix="just_forward",
                output="screen"
            )
        ]
    )
  1. The mentioned script for the prefix "just_forward"
#!/bin/bash

exec "$@"
  1. Simple script to give some pulse to check also the ExecuteProcess "just_talk"
#!/bin/bash

# Define the message
MESSAGE="System pulse: Everything is running fine..."

echo "Script started. Press [CTRL+C] to stop."

# Loop indefinitely
while true; do
    echo "$(date '+%H:%M:%S') - $MESSAGE"
    sleep 1
done

Put the launch file in any arbitrary package (here some_example) and the bash scripts somewhere in the $PATH.

Just execute simply:

ros2 launch some_example example.launch.py

Expected behavior

The ros2 launch output logger still uses the names which shows obviously what generated the output, i.e. "publisher_member_function" and "just_talk".

E.g. by removing the "prefixes" in the launch:

[INFO] [publisher_member_function-1]: process started with pid [38545]
[INFO] [just_talk-2]: process started with pid [38546]
[just_talk-2] Script started. Press [CTRL+C] to stop.
[just_talk-2] 16:12:57 - System pulse: Everything is running fine...
[publisher_member_function-1] [INFO] [1768921977.726699041] [minimal_publisher]: Publishing: 'Hello, world! 0'
[just_talk-2] 16:12:58 - System pulse: Everything is running fine...
[publisher_member_function-1] [INFO] [1768921978.226756063] [minimal_publisher]: Publishing: 'Hello, world! 1'
[publisher_member_function-1] [INFO] [1768921978.726687978] [minimal_publisher]: Publishing: 'Hello, world! 2'
[just_talk-2] 16:12:59 - System pulse: Everything is running fine...
[publisher_member_function-1] [INFO] [1768921979.226766489] [minimal_publisher]: Publishing: 'Hello, world! 3'
[publisher_member_function-1] [INFO] [1768921979.726733370] [minimal_publisher]: Publishing: 'Hello, world! 4'
[just_talk-2] 16:13:00 - System pulse: Everything is running fine...

Actual behavior

The prefixes become the name of the executable:

[INFO] [just_forward-1]: process started with pid [38606]
[INFO] [just_forward-2]: process started with pid [38607]
[just_forward-2] Script started. Press [CTRL+C] to stop.
[just_forward-2] 16:13:38 - System pulse: Everything is running fine...
[just_forward-1] [INFO] [1768922018.574352928] [minimal_publisher]: Publishing: 'Hello, world! 0'
[just_forward-2] 16:13:39 - System pulse: Everything is running fine...
[just_forward-1] [INFO] [1768922019.074424427] [minimal_publisher]: Publishing: 'Hello, world! 1'
[just_forward-1] [INFO] [1768922019.574344769] [minimal_publisher]: Publishing: 'Hello, world! 2'
[just_forward-2] 16:13:40 - System pulse: Everything is running fine...
[just_forward-1] [INFO] [1768922020.074298004] [minimal_publisher]: Publishing: 'Hello, world! 3'

Additional information

I would interpret the "prefix" as some kind of a prefix and not the concrete executable. If I have multiple executables needing the same prefix, I have in the end the same name for everything gaining absolutely nothing. The prefix should not be part of the name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions