Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(map_loader): add log output #7203

Merged

Conversation

a-maumau
Copy link
Contributor

@a-maumau a-maumau commented May 31, 2024

Description

Add log output to launch file in map/map_loader.
It is set to "both", which outputs to both the terminal and the log file.

Tests performed

I checked that both the terminal and the log file will receive the log output.

The log file when the running process get killed (launched individually):

...
1717147605.4659960 [lanelet2_map_visualization-3] [INFO] [1717147605.465805143] [rclcpp]: signal_handler(signum=15)
1717147605.4661055 [lanelet2_map_visualization-3] *** Aborted at 1717147605 (unix time) try "date -d @1717147605" if you are using GNU date ***
1717147605.4665687 [lanelet2_map_visualization-3] PC: @                0x0 (unknown)
1717147605.4667759 [lanelet2_map_visualization-3] *** SIGTERM (@0x3e8000e1b20) received by PID 3223579 (TID 0x7ff9e32ca680) from PID 924448; stack trace: ***
1717147605.4672272 [lanelet2_map_visualization-3]     @     0x7ff9e3b664d6 google::(anonymous namespace)::FailureSignalHandler()
1717147605.4676359 [lanelet2_map_visualization-3]     @     0x7ff9e3a19ded rclcpp::SignalHandler::signal_handler()
1717147605.4678733 [lanelet2_map_visualization-3]     @     0x7ff9e3042520 (unknown)
1717147605.4680552 [lanelet2_map_visualization-3]     @     0x7ff9e3091117 (unknown)
1717147605.4682143 [lanelet2_map_visualization-3]     @     0x7ff9e3093a41 pthread_cond_wait
1717147605.4683957 [lanelet2_map_visualization-3]     @     0x7ff9e2f84a8d ddsrt_cond_wait
1717147605.4685516 [lanelet2_map_visualization-3]     @     0x7ff9e2f84b55 ddsrt_cond_waituntil
1717147605.4687283 [lanelet2_map_visualization-3]     @     0x7ff9e2f6b45d (unknown)
1717147605.4689677 [lanelet2_map_visualization-3]     @     0x7ff9e327374f rmw_wait
1717147605.4692674 [lanelet2_map_visualization-3]     @     0x7ff9e37a7848 rcl_wait
1717147605.4696777 [lanelet2_map_visualization-3]     @     0x7ff9e39611b6 rclcpp::Executor::wait_for_work()
1717147605.4700472 [lanelet2_map_visualization-3]     @     0x7ff9e39616d3 rclcpp::Executor::get_next_executable()
1717147605.4704914 [lanelet2_map_visualization-3]     @     0x7ff9e3965c81 rclcpp::executors::SingleThreadedExecutor::spin()
1717147605.4705842 [lanelet2_map_visualization-3]     @     0x5630db0d9486 main
1717147605.4707685 [lanelet2_map_visualization-3]     @     0x7ff9e3029d90 (unknown)
1717147605.4710116 [lanelet2_map_visualization-3]     @     0x7ff9e3029e40 __libc_start_main
1717147605.4711015 [lanelet2_map_visualization-3]     @     0x5630db0d9e35 _start
1717147605.4722123 [ERROR] [lanelet2_map_visualization-3]: process has died ...
(other omitted)

Within container (throwing std::runtime_error):
(this will not get logged in log file because map_container is logging with screen)

[component_container_mt-28] terminate called after throwing an instance of 'std::runtime_error'
[component_container_mt-28]   what():  THROWING RUNTIME ERROR
[component_container_mt-28] *** Aborted at 1717388510 (unix time) try "date -d @1717388510" if you are using GNU date ***
[component_container_mt-28] PC: @                0x0 (unknown)
[component_container_mt-28] *** SIGABRT (@0x3e80032d72f) received by PID 3331887 (TID 0x7f2c2a7fc640) from PID 3331887; stack trace: ***
[aggregator_node-23] [WARN] [1717388510.938254681] [Aggregator]: No timestamp set for diagnostic message. Message names: external_cmd_converter: remote_control_topic_status
[component_container-33] [INFO] [1717388510.940525959] [sensing.lidar.right.pointcloud_preprocessor.pointcloud_container]: Load Library: /home/masakibaba/autoware/install/pointcloud_preprocessor/lib/libpointcloud_preprocessor_filter.so
[component_container_mt-28]     @     0x7f2c550b14d6 google::(anonymous namespace)::FailureSignalHandler()
[component_container_mt-28]     @     0x7f2c54442520 (unknown)
[component_container_mt-28]     @     0x7f2c544969fc pthread_kill
[component_container_mt-28]     @     0x7f2c54442476 raise
[component_container_mt-28]     @     0x7f2c544287f3 abort
[component_container_mt-28]     @     0x7f2c548a2b9e (unknown)
[component_container_mt-28]     @     0x7f2c548ae20c (unknown)
[component_container_mt-28]     @     0x7f2c548ae277 std::terminate()
[component_container_mt-28]     @     0x7f2c548ae4d8 __cxa_throw
[component_container_mt-28]     @     0x7f2c0c476c94 _ZN21Lanelet2MapLoaderNode18create_map_bin_msgESt10shared_ptrIN7lanelet10LaneletMapEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN6rclcpp4TimeE.cold
[component_container_mt-28]     @     0x7f2c0c481959 Lanelet2MapLoaderNode::on_map_projector_info()
[component_container_mt-28]     @     0x7f2c0c4821d3 _ZNSt17_Function_handlerIFvSt10shared_ptrIKN14tier4_map_msgs3msg17MapProjectorInfo_ISaIvEEEEEZN21Lanelet2MapLoaderNodeC4ERKN6rclcpp11NodeOptionsEEUlS7_E_E9_M_invokeERKSt9_Any_dataOS7_
[component_container_mt-28]     @     0x7f2c0c492587 _ZNSt8__detail9__variant17__gen_vtable_implINS0_12_Multi_arrayIPFNS0_21__deduce_visit_resultIvEEOZN6rclcpp23AnySubscriptionCallbackIN14tier4_map_msgs3msg17MapProjectorInfo_ISaIvEEESA_E8dispatchESt10shared_ptrISB_ERKNS5_11MessageInfoEEUlOT_E_RSt7variantIJSt8functionIFvRKSB_EESN_IFvSP_SH_EESN_IFvRKNS5_17SerializedMessageEEESN_IFvSW_SH_EESN_IFvSt10unique_ptrISB_St14default_deleteISB_EEEESN_IFvS14_SH_EESN_IFvS11_ISU_S12_ISU_EEEESN_IFvS1A_SH_EESN_IFvSD_ISO_EEESN_IFvS1F_SH_EESN_IFvSD_ISV_EEESN_IFvS1K_SH_EESN_IFvRKS1F_EESN_IFvS1Q_SH_EESN_IFvRKS1K_EESN_IFvS1W_SH_EESN_IFvSE_EESN_IFvSE_SH_EESN_IFvSD_ISU_EEESN_IFvS25_SH_EEEEEJEEESt16integer_sequenceImJLm8EEEE14__visit_invokeESL_S2B_
[component_container_mt-28]     @     0x7f2c0c4a4e45 rclcpp::Subscription<>::handle_message()
[component_container_mt-28]     @     0x7f2c54d5dba0 rclcpp::Executor::execute_subscription()
[component_container_mt-28]     @     0x7f2c54d5f10e rclcpp::Executor::execute_any_executable()
[component_container_mt-28]     @     0x7f2c54d65432 rclcpp::executors::MultiThreadedExecutor::run()
[component_container_mt-28]     @     0x7f2c548dc253 (unknown)
[component_container_mt-28]     @     0x7f2c54494ac3 (unknown)
[component_container_mt-28]     @     0x7f2c54526850 (unknown)

Effects on system behavior

Not applicable.

Interface changes

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: a-maumau <[email protected]>
@github-actions github-actions bot added the component:map Map creation, storage, and loading. (auto-assigned) label May 31, 2024
@KYabuuchi KYabuuchi added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 3, 2024
Copy link
Contributor

@KYabuuchi KYabuuchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR.
I have confirmed that it works correctly with following command:

ros2 launch map_loader lanelet2_map_loader.launch.xml lanelet2_map_path:=...
ros2 launch map_loader pointcloud_map_loader.launch.xml pointcloud_map_path:=...

@a-maumau
Copy link
Contributor Author

a-maumau commented Jun 3, 2024

I update the PR comment and add a composable node case.
I terminated the node with throwing the runtime error by the code.

It seems it will not output log in log file because map_container's output is set to "screen":

<node_container pkg="rclcpp_components" exec="$(var container_type)" name="map_container" namespace="" output="screen">

@SakodaShintaro SakodaShintaro enabled auto-merge (squash) June 6, 2024 00:39
@SakodaShintaro SakodaShintaro merged commit 42a6340 into autowarefoundation:main Jun 6, 2024
24 of 25 checks passed
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request Jun 6, 2024
add log output

Signed-off-by: a-maumau <[email protected]>
Co-authored-by: SakodaShintaro <[email protected]>
a-maumau added a commit to a-maumau/autoware.universe that referenced this pull request Jun 7, 2024
add log output

Signed-off-by: a-maumau <[email protected]>
Co-authored-by: SakodaShintaro <[email protected]>
KhalilSelyan pushed a commit that referenced this pull request Jul 22, 2024
add log output

Signed-off-by: a-maumau <[email protected]>
Co-authored-by: SakodaShintaro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:map Map creation, storage, and loading. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants