Skip to content

Hotfix/improve logs - #14

Merged
PastorD merged 13 commits into
mainfrom
hotfix/improve-logs
Sep 1, 2026
Merged

Hotfix/improve logs#14
PastorD merged 13 commits into
mainfrom
hotfix/improve-logs

Conversation

@PastorD

@PastorD PastorD commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

bump:minor

elevate c prints from jsd to ros2 logs, so

  • they are saved in /rosout
  • they are saved in corresponding file log
  • severity can be controlled before launch, and at runtime (with a gate to compile out severity for logs in hot path)
  • logs can be throttled. Without it, any error becomes a waterfall of red text. Default config is to throttle at 1Hz.

@willreid-jpl @JosephBowkett @preston-rogers @kwehage This recovers fcat-casah capability to show jsd logs as ros logs, but without making them EVRs

Example what it showed before in log file:

[INFO] [1788287906.148899198] [fcat.fcat]: loading Yaml from /home/tnet/astrobud-testbed/install/astrobud_bringup/share/astrobud_bringup/config/fcat_offline.yaml
[INFO] [1788287906.155357073] [fcat.fcat]: Populating device_name_state_map_[arm_joint_1]
[INFO] [1788287906.155377901] [fcat.fcat]: counts[9] = 1
[INFO] [1788287906.155382315] [fcat.fcat]: Populating device_name_state_map_[arm_joint_2]
[INFO] [1788287906.155386869] [fcat.fcat]: counts[9] = 2
[INFO] [1788287906.155389938] [fcat.fcat]: Populating device_name_state_map_[arm_joint_3]
[INFO] [1788287906.155392848] [fcat.fcat]: counts[9] = 3
[INFO] [1788287906.155395717] [fcat.fcat]: Populating device_name_state_map_[arm_joint_4]
[INFO] [1788287906.155398544] [fcat.fcat]: counts[9] = 4
[INFO] [1788287906.155401419] [fcat.fcat]: Populating device_name_state_map_[arm_joint_5]
[INFO] [1788287906.155404939] [fcat.fcat]: counts[9] = 5
[INFO] [1788287906.155408438] [fcat.fcat]: Populating device_name_state_map_[arm_joint_6]
[INFO] [1788287906.155411342] [fcat.fcat]: counts[9] = 6
[INFO] [1788287906.155414277] [fcat.fcat]: Populating device_name_state_map_[arm_joint_7]
[INFO] [1788287906.155417128] [fcat.fcat]: counts[9] = 7
[INFO] [1788287906.155420063] [fcat.fcat]: Populating device_name_state_map_[fts_1]
[INFO] [1788287906.155423330] [fcat.fcat]: counts[8] = 1
[INFO] [1788287906.155426244] [fcat.fcat]: Populating device_name_state_map_[fun_1]
[INFO] [1788287906.155429237] [fcat.fcat]: counts[2] = 1
[INFO] [1788287906.155432172] [fcat.fcat]: Populating device_name_state_map_[fun_2]
[INFO] [1788287906.155436694] [fcat.fcat]: counts[2] = 2
[INFO] [1788287906.155439639] [fcat.fcat]: Populating device_name_state_map_[sig_gen_1]
[INFO] [1788287906.155442780] [fcat.fcat]: counts[1] = 1
[INFO] [1788287906.155445657] [fcat.fcat]: Populating device_name_state_map_[sig_gen_2]

It does not show all jsd initialization.

Example what it shows now now in both terminal and log file

tnet@astrobud-ops:~/astrobud-testbed$ ros2 launch astrobud_bringup fcat.launch.py online:=False                                                                         
[INFO] [launch]: All log files can be found below /home/tnet/.ros/log/2026-09-01-14-39-19-817640-astrobud-ops-3441644                                                   
[INFO] [launch]: Default logging verbosity is set to INFO                                                                                                               
[INFO] [fcat_node-1]: process started with pid [3441647]                                                                                                                
[INFO] [fcat_services-2]: process started with pid [3441648]                                                                                                            
[INFO] [relay-3]: process started with pid [3441649]                                                                                                                    
[fcat_node-1] [INFO] [1788298759.880831965] [fcat.fcat]: loading Yaml from /home/tnet/astrobud-testbed/install/astrobud_bringup/share/astrobud_bringup/config/fcat_offli
ne.yaml                                                                                                                                                                 
[fcat_node-1] [INFO] [1788298759.883703135] [fcat.fcat]: (jsd_device_base.cc:41) Setting JSD device  to offline-mode                                                    
[fcat_node-1] [INFO] [1788298759.883817569] [fcat.fcat]: (actuator.cc:213) Overall Reduction: 3972507.379574                                                            
[fcat_node-1] [INFO] [1788298759.883835555] [fcat.fcat]: (jsd_device_base.cc:41) Setting JSD device  to offline-mode                                                    
[fcat_node-1] [INFO] [1788298759.883927564] [fcat.fcat]: (actuator.cc:213) Overall Reduction: 3972507.379574                                                            
[fcat_node-1] [INFO] [1788298759.883942640] [fcat.fcat]: (jsd_device_base.cc:41) Setting JSD device  to offline-mode                                                    
[fcat_node-1] [INFO] [1788298759.884033282] [fcat.fcat]: (actuator.cc:213) Overall Reduction: 3972507.379574                                                            
[fcat_node-1] [INFO] [1788298759.884046100] [fcat.fcat]: (jsd_device_base.cc:41) Setting JSD device  to offline-mode                                                    
[fcat_node-1] [INFO] [1788298759.884140335] [fcat.fcat]: (actuator.cc:213) Overall Reduction: 3972507.379574                                                            
[fcat_node-1] [INFO] [1788298759.884152292] [fcat.fcat]: (jsd_device_base.cc:41) Setting JSD device  to offline-mode                                                    
[fcat_node-1] [INFO] [1788298759.884243183] [fcat.fcat]: (actuator.cc:213) Overall Reduction: 3972507.379574                                                            
[fcat_node-1] [INFO] [1788298759.884255515] [fcat.fcat]: (jsd_device_base.cc:41) Setting JSD device  to offline-mode                                                    
[fcat_node-1] [INFO] [1788298759.884346105] [fcat.fcat]: (actuator.cc:213) Overall Reduction: 3972507.379574                                                            
[fcat_node-1] [INFO] [1788298759.884359062] [fcat.fcat]: (jsd_device_base.cc:41) Setting JSD device  to offline-mode                                                    
[fcat_node-1] [INFO] [1788298759.884450032] [fcat.fcat]: (actuator.cc:213) Overall Reduction: 1304866.369578                                                            
[fcat_node-1] [INFO] [1788298759.884462280] [fcat.fcat]: (jsd_device_base.cc:41) Setting JSD device  to offline-mode                                                    
[fcat_node-1] [INFO] [1788298759.884554876] [fcat.fcat]: (actuator.cc:213) Overall Reduction: 1148031.504000                                                            
[fcat_node-1] [INFO] [1788298759.884562487] [fcat.fcat]: (manager.cc:241) SUCCESS: Added 15 devices to map                                                              
[fcat_node-1] [INFO] [1788298759.884567534] [fcat.fcat]: (manager.cc:243) JSD device list entries:                                                                      
[fcat_node-1] [INFO] [1788298759.884571889] [fcat.fcat]: (manager.cc:245)      arm_joint_1                                                                              
[fcat_node-1] [INFO] [1788298759.884577200] [fcat.fcat]: (manager.cc:245)      arm_joint_2                                                                              
[fcat_node-1] [INFO] [1788298759.884581462] [fcat.fcat]: (manager.cc:245)      arm_joint_3                                                                              
[fcat_node-1] [INFO] [1788298759.884585647] [fcat.fcat]: (manager.cc:245)      arm_joint_4                                                                              
[fcat_node-1] [INFO] [1788298759.884589934] [fcat.fcat]: (manager.cc:245)      arm_joint_5                                                                              
[fcat_node-1] [INFO] [1788298759.884595527] [fcat.fcat]: (manager.cc:245)      arm_joint_6                                                                              
[fcat_node-1] [INFO] [1788298759.884599717] [fcat.fcat]: (manager.cc:245)      arm_joint_7                                                                              
[fcat_node-1] [INFO] [1788298759.884603841] [fcat.fcat]: (manager.cc:245)      tga          

See side by side in an online run in astrobud, showing this PR shows jsd logs to both terminal and logs
image

@PastorD PastorD self-assigned this Sep 1, 2026
@PastorD
PastorD requested a review from a team September 1, 2026 21:58

@JosephBowkett JosephBowkett left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, definitely want to be mapping print statements to the rclcpp functions

@PastorD
PastorD merged commit 406f7ac into main Sep 1, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants