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

Improving nebula std::cout logs #122

Closed
ahmeddesokyebrahim opened this issue Feb 26, 2024 · 5 comments
Closed

Improving nebula std::cout logs #122

ahmeddesokyebrahim opened this issue Feb 26, 2024 · 5 comments
Assignees

Comments

@ahmeddesokyebrahim
Copy link
Contributor

Description

This issue is open out of the running activities in Autoware issue for reducing excessive log messages.

As Autoware uses nebula, we are creating this issue to handle some logs coming from nebula while using Rosbag replay simulation.

While using Rosbag replay simulation, there are some logging messages coming from nebula classes that are not ROS nodes so the log uses std::cout.
This and this are examples of source code for the intended logs.

The output in terminal looks very noisy specially in cases laser ring number is bigger ...

  • example 1
[component_container-33] laser_ring[0] =0, angle = -0.261799
[component_container-33] laser_ring[2] =1, angle = -0.226893
[component_container-33] laser_ring[4] =2, angle = -0.191986
[component_container-33] laser_ring[6] =3, angle = -0.15708
[component_container-33] laser_ring[8] =4, angle = -0.122173
[component_container-33] laser_ring[10] =5, angle = -0.0872665
[component_container-33] laser_ring[12] =6, angle = -0.0523599
[component_container-33] laser_ring[14] =7, angle = -0.0174533
[component_container-33] laser_ring[1] =8, angle = 0.0174533
[component_container-33] laser_ring[3] =9, angle = 0.0523599
[component_container-33] laser_ring[5] =10, angle = 0.0872665
[component_container-33] laser_ring[7] =11, angle = 0.122173
[component_container-33] laser_ring[9] =12, angle = 0.15708
[component_container-33] laser_ring[11] =13, angle = 0.191986
[component_container-33] laser_ring[13] =14, angle = 0.226893
[component_container-33] laser_ring[15] =15, angle = 0.261799

[component_container-33] sensor_configuration->sensor_model=VLP16
  • example 2
[component_container_mt-30] laser_ring[36] =0, angle = -0.436332
[component_container_mt-30] laser_ring[69] =1, angle = -0.34177
[component_container_mt-30] laser_ring[54] =2, angle = -0.279986
[component_container_mt-30] laser_ring[87] =3, angle = -0.236754
[component_container_mt-30] laser_ring[0] =4, angle = -0.204937
[component_container_mt-30] laser_ring[97] =5, angle = -0.180572
[component_container_mt-30] laser_ring[18] =6, angle = -0.161338
[component_container_mt-30] laser_ring[115] =7, angle = -0.14577
[component_container_mt-30] laser_ring[44] =8, angle = -0.133518
[component_container_mt-30] laser_ring[77] =9, angle = -0.124791
[component_container_mt-30] laser_ring[62] =10, angle = -0.119555
[component_container_mt-30] laser_ring[95] =11, angle = -0.116064
[component_container_mt-30] laser_ring[8] =12, angle = -0.113446
[component_container_mt-30] laser_ring[105] =13, angle = -0.111527
[component_container_mt-30] laser_ring[26] =14, angle = -0.109607
[component_container_mt-30] laser_ring[123] =15, angle = -0.107687
[component_container_mt-30] laser_ring[100] =16, angle = -0.105767
[component_container_mt-30] laser_ring[21] =17, angle = -0.103847
[component_container_mt-30] laser_ring[118] =18, angle = -0.101927
[component_container_mt-30] laser_ring[39] =19, angle = -0.100007
[component_container_mt-30] laser_ring[64] =20, angle = -0.0980875
[component_container_mt-30] laser_ring[49] =21, angle = -0.0961676
[component_container_mt-30] laser_ring[82] =22, angle = -0.0942478
[component_container_mt-30] laser_ring[3] =23, angle = -0.0923279
[component_container_mt-30] laser_ring[108] =24, angle = -0.0904081
[component_container_mt-30] laser_ring[29] =25, angle = -0.0884882
[component_container_mt-30] laser_ring[126] =26, angle = -0.0865683
[component_container_mt-30] laser_ring[47] =27, angle = -0.0846485
[component_container_mt-30] laser_ring[72] =28, angle = -0.0827286
[component_container_mt-30] laser_ring[57] =29, angle = -0.0808087
[component_container_mt-30] laser_ring[90] =30, angle = -0.0788889
[component_container_mt-30] laser_ring[11] =31, angle = -0.076969
[component_container_mt-30] laser_ring[52] =32, angle = -0.0750492
[component_container_mt-30] laser_ring[85] =33, angle = -0.0731293
[component_container_mt-30] laser_ring[6] =34, angle = -0.0712094
[component_container_mt-30] laser_ring[103] =35, angle = -0.0692896
[component_container_mt-30] laser_ring[16] =36, angle = -0.0673697
[component_container_mt-30] laser_ring[113] =37, angle = -0.0654498
[component_container_mt-30] laser_ring[34] =38, angle = -0.06353
[component_container_mt-30] laser_ring[67] =39, angle = -0.0616101
[component_container_mt-30] laser_ring[60] =40, angle = -0.0596903
[component_container_mt-30] laser_ring[93] =41, angle = -0.0577704
[component_container_mt-30] laser_ring[14] =42, angle = -0.0558505
[component_container_mt-30] laser_ring[111] =43, angle = -0.0539307
[component_container_mt-30] laser_ring[24] =44, angle = -0.0520108
[component_container_mt-30] laser_ring[121] =45, angle = -0.0500909
[component_container_mt-30] laser_ring[42] =46, angle = -0.0481711
[component_container_mt-30] laser_ring[75] =47, angle = -0.0462512
[component_container_mt-30] laser_ring[116] =48, angle = -0.0443314
[component_container_mt-30] laser_ring[37] =49, angle = -0.0424115
[component_container_mt-30] laser_ring[70] =50, angle = -0.0404916
[component_container_mt-30] laser_ring[55] =51, angle = -0.0385718
[component_container_mt-30] laser_ring[80] =52, angle = -0.0366519
[component_container_mt-30] laser_ring[1] =53, angle = -0.0347321
[component_container_mt-30] laser_ring[98] =54, angle = -0.0328122
[component_container_mt-30] laser_ring[19] =55, angle = -0.0308923
[component_container_mt-30] laser_ring[124] =56, angle = -0.0289725
[component_container_mt-30] laser_ring[45] =57, angle = -0.0270526
[component_container_mt-30] laser_ring[78] =58, angle = -0.0251327
[component_container_mt-30] laser_ring[63] =59, angle = -0.0232129
[component_container_mt-30] laser_ring[88] =60, angle = -0.021293
[component_container_mt-30] laser_ring[9] =61, angle = -0.0193732
[component_container_mt-30] laser_ring[106] =62, angle = -0.0174533
[component_container_mt-30] laser_ring[27] =63, angle = -0.0155334
[component_container_mt-30] laser_ring[4] =64, angle = -0.0136136
[component_container_mt-30] laser_ring[101] =65, angle = -0.0116937
[component_container_mt-30] laser_ring[22] =66, angle = -0.00977384
[component_container_mt-30] laser_ring[119] =67, angle = -0.00785398
[component_container_mt-30] laser_ring[32] =68, angle = -0.00593412
[component_container_mt-30] laser_ring[65] =69, angle = -0.00401426
[component_container_mt-30] laser_ring[50] =70, angle = -0.00209439
[component_container_mt-30] laser_ring[83] =71, angle = -0.000174533
[component_container_mt-30] laser_ring[12] =72, angle = 0.00174533
[component_container_mt-30] laser_ring[109] =73, angle = 0.00366519
[component_container_mt-30] laser_ring[30] =74, angle = 0.00558505
[component_container_mt-30] laser_ring[127] =75, angle = 0.00750492
[component_container_mt-30] laser_ring[40] =76, angle = 0.00942478
[component_container_mt-30] laser_ring[73] =77, angle = 0.0113446
[component_container_mt-30] laser_ring[58] =78, angle = 0.0132645
[component_container_mt-30] laser_ring[91] =79, angle = 0.0151844
[component_container_mt-30] laser_ring[68] =80, angle = 0.0171042
[component_container_mt-30] laser_ring[53] =81, angle = 0.0190241
[component_container_mt-30] laser_ring[86] =82, angle = 0.020944
[component_container_mt-30] laser_ring[7] =83, angle = 0.0228638
[component_container_mt-30] laser_ring[96] =84, angle = 0.0247837
[component_container_mt-30] laser_ring[17] =85, angle = 0.0267035
[component_container_mt-30] laser_ring[114] =86, angle = 0.0286234
[component_container_mt-30] laser_ring[35] =87, angle = 0.0305433
[component_container_mt-30] laser_ring[76] =88, angle = 0.0324631
[component_container_mt-30] laser_ring[61] =89, angle = 0.034383
[component_container_mt-30] laser_ring[94] =90, angle = 0.0363028
[component_container_mt-30] laser_ring[15] =91, angle = 0.0382227
[component_container_mt-30] laser_ring[104] =92, angle = 0.0401426
[component_container_mt-30] laser_ring[25] =93, angle = 0.0420624
[component_container_mt-30] laser_ring[122] =94, angle = 0.0439823
[component_container_mt-30] laser_ring[43] =95, angle = 0.0459022
[component_container_mt-30] laser_ring[20] =96, angle = 0.047822
[component_container_mt-30] laser_ring[117] =97, angle = 0.0497419
[component_container_mt-30] laser_ring[38] =98, angle = 0.0516617
[component_container_mt-30] laser_ring[71] =99, angle = 0.0535816
[component_container_mt-30] laser_ring[48] =100, angle = 0.0555015
[component_container_mt-30] laser_ring[81] =101, angle = 0.0574213
[component_container_mt-30] laser_ring[2] =102, angle = 0.0593412
[component_container_mt-30] laser_ring[99] =103, angle = 0.0612611
[component_container_mt-30] laser_ring[28] =104, angle = 0.0631809
[component_container_mt-30] laser_ring[125] =105, angle = 0.0651008
[component_container_mt-30] laser_ring[46] =106, angle = 0.0670206
[component_container_mt-30] laser_ring[79] =107, angle = 0.0689405
[component_container_mt-30] laser_ring[56] =108, angle = 0.0708604
[component_container_mt-30] laser_ring[89] =109, angle = 0.0727802
[component_container_mt-30] laser_ring[10] =110, angle = 0.0747001
[component_container_mt-30] laser_ring[107] =111, angle = 0.07662
[component_container_mt-30] laser_ring[84] =112, angle = 0.0785398
[component_container_mt-30] laser_ring[5] =113, angle = 0.0804597
[component_container_mt-30] laser_ring[102] =114, angle = 0.0823795
[component_container_mt-30] laser_ring[23] =115, angle = 0.0842994
[component_container_mt-30] laser_ring[112] =116, angle = 0.0869174
[component_container_mt-30] laser_ring[33] =117, angle = 0.0904081
[component_container_mt-30] laser_ring[66] =118, angle = 0.0947714
[component_container_mt-30] laser_ring[51] =119, angle = 0.100007
[component_container_mt-30] laser_ring[92] =120, angle = 0.106116
[component_container_mt-30] laser_ring[13] =121, angle = 0.113097
[component_container_mt-30] laser_ring[110] =122, angle = 0.121824
[component_container_mt-30] laser_ring[31] =123, angle = 0.132296
[component_container_mt-30] laser_ring[120] =124, angle = 0.147131
[component_container_mt-30] laser_ring[41] =125, angle = 0.169297
[component_container_mt-30] laser_ring[74] =126, angle = 0.205076
[component_container_mt-30] laser_ring[59] =127, angle = 0.261799

[component_container_mt-30] sensor_configuration->sensor_model=VLS128

These log messages are printed by default and can't be configured to a level to be visible while debug only for example.

The intention of this issue is to feature of configuring the level of log messages that are coming from nebula classes that do not inherit from rclcpp::Node so that we can have these messages as ERROR, WARN, INFO, and DEBUG similar to ROS2 log levels.

Expected behavior

Being able to configure level of nebula log messages

Actual behavior

Log level configuration does not exist for messages that are coming from classes that do not inherit from rclcpp::Node

Steps to reproduce

  1. Follow the steps for Rosbag replay simulation
  2. You can find the intended logs in terminal as explained in the description
@mitsudome-r
Copy link
Collaborator

@drwnz Could you answer the following questions?

  • Are there reasons for not using ROS loggers for some of stdout messages? (e.g., you don't want to have ROS dependency for these files)
  • At least for the above example, it seems the code expects calibration.ros_info to be used as a parameter to configure the output information. However, there seems to be no ROS Parameter (or any other means) to modify this parameter at runtime. Is this intentional?

@drwnz
Copy link
Collaborator

drwnz commented Feb 26, 2024

@amc-nu I believe this is just a leftover from the original Velodyne implementation? We can safely remove the stdout output, right?

@amc-nu
Copy link
Contributor

amc-nu commented Feb 28, 2024

Several internal libraries are ROS-independent, so these instead use std::cout.
Some of the output is intended as info, so these can be safely removed.

@ahmeddesokyebrahim
Copy link
Contributor Author

Thanks @drwnz & @amc-nu for your replies.
I have cleaned these leftover std::cout logs as you recommended and included this implementation in this PR.
I will mark it as ready for review very soon once I do not find any further changes in that task relevant to nebula

cc: @mitsudome-r @xmfcx

@ahmeddesokyebrahim
Copy link
Contributor Author

Closing this issue after merging PR #118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants