Skip to content

Number checker aborts after completion #8

@threent2

Description

@threent2

After resolving a few inconsistencies of PublishResult vs PublishedResult between the code and xml (I standardised on PublishResult) the program runs and appears to run to SUCCESS but then aborts.

Screen output

brian@HP-laptop:~/master_ros2_ws$ ros2 launch first_bts number_checker.launch.py
[INFO] [launch]: All log files can be found below /home/brian/.ros/log/2025-09-27-14-42-07-478976-HP-laptop-19181
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [number_checker-1]: process started with pid [19184]
[number_checker-1] [INFO] [1758980528.061331937] [rclcpp]: QUI!.
[number_checker-1] Generated number: 79 - Threshold: 30 - Failure!
[number_checker-1] Generated number: 9 - Threshold: 50 - Success!
[number_checker-1] terminate called after throwing an instance of 'rclcpp::exceptions::InvalidTopicNameError'
[number_checker-1] what(): Invalid topic name: topic name must not be empty string:
[number_checker-1] ''
[number_checker-1] ^
[number_checker-1]
[ERROR] [number_checker-1]: process has died [pid 19184, exit code -6, cmd '/home/brian/master_ros2_ws/install/lib/first_bts/number_checker --ros-args -r __node:=number_checker --params-file /tmp/launch_params_f4xnhmgz'].

I tried looking at the error using gdb but my C++ knowledge is not up to the task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions