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

sick_generic_laser: leaving main loop...[Info]: SickThread TcpRecvThread finished (flags: threadShouldRun=0, endThread=0). #449

Open
Abdulhadiasa opened this issue Feb 18, 2025 · 4 comments

Comments

@Abdulhadiasa
Copy link

I am running the API (no ROS) and I added a deep copy (using copy.deepcopy) of the cloud points before any external processing, yet I keep getting the following error after running for a while

sick_generic_laser: leaving main loop...[Info]: SickThread TcpRecvThread finished (flags: threadShouldRun=0, endThread=0).
SickScanCommon closed.
[Info]: Caught signal 2

[Info]: good bye

[Info]: You are leaving the following version of this node:

[Info]: sick_scan_api V. 3.6.0 githash:"7cab14fb4e3ec05fb59eea19039823510abfc688" gitinfo:"2024-10-23 14:46:37 +0200	Alexander Weinmann	Merge branch 'release/3.6.0'"

[Info]: sick_generic_laser: stop and exit (line 218)
[Info]: sick_generic_laser: exit (line 221)
sick_generic_laser: exit (line 223)
sick_generic_laser: exit (line 225)

How can I debug this?

here are my run parameters:

[Info]: sick_scan_api V. 3.6.0 githash:"7cab14fb4e3ec05fb59eea19039823510abfc688" gitinfo:"2024-10-23 14:46:37 +0200	Alexander Weinmann	Merge branch 'release/3.6.0'"
[Info]: SickScanApiInitByLaunchfile: launchfile_args = "sick_mrs_1xxx.launch hostname:=192.168.5.53"
[Info]: SickScanApiInitByCli:  sick_mrs_1xxx.launch hostname:=192.168.5.53
[Info]: Try loading launchfile : sick_mrs_1xxx.launch
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["hostname"]="192.168.0.1"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["cloud_topic"]="cloud"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["laserscan_topic"]="scan"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["frame_id"]="cloud"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["sw_pll_only_publish"]="true"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["imu_enable"]="true"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["imu_topic"]="imu"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["imu_frame_id"]="imu_link"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["nodename"]="sick_mrs_1xxx"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["add_transform_xyz_rpy"]="0,0,0,0,0,0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["add_transform_check_dynamic_updates"]="false"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["ang_res"]="0.0625"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["scan_freq"]="50"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["scan_layer_filter"]="4 1 1 1 1"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): default_args["tf_publish_rate"]="10.0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="scanner_type", type="string", value="sick_mrs_1xxx"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="min_ang", type="double", value="-1.570796327"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="max_ang", type="double", value="+0.872664626"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="intensity_resolution_16bit", type="bool", value="false"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="hostname", type="string", value="$(arg hostname)" overwritten by default value "192.168.0.1"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="hostname", type="string", value="192.168.0.1"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="port", type="string", value="2112"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="timelimit", type="int", value="5"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="cloud_topic", type="string", value="$(arg cloud_topic)" overwritten by default value "cloud"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="cloud_topic", type="string", value="cloud"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="laserscan_topic", type="string", value="$(arg laserscan_topic)" overwritten by default value "scan"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="laserscan_topic", type="string", value="scan"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="frame_id", type="str", value="$(arg frame_id)" overwritten by default value "cloud"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="frame_id", type="str", value="cloud"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="sw_pll_only_publish", type="bool", value="$(arg sw_pll_only_publish)" overwritten by default value "true"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="sw_pll_only_publish", type="bool", value="true"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="use_generation_timestamp", type="bool", value="false"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="min_intensity", type="double", value="0.0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="scandatacfg_timingflag", type="int", value="-1"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="scandatacfg_azimuth_table", type="int", value="0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="imu_enable", type="bool", value="$(arg imu_enable)" overwritten by default value "true"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="imu_enable", type="bool", value="true"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="imu_enable_additional_info", type="bool", value="True"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="imu_topic", type="string", value="$(arg imu_topic)" overwritten by default value "imu"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="imu_topic", type="string", value="imu"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="range_min", type="double", value="0.05"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="range_max", type="double", value="100.0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="range_filter_handling", type="int", value="0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="ang_res", type="double", value="$(arg ang_res)" overwritten by default value "0.0625"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="ang_res", type="double", value="0.0625"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="scan_freq", type="double", value="$(arg scan_freq)" overwritten by default value "50"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="scan_freq", type="double", value="50"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="scan_layer_filter", type="string", value="$(arg scan_layer_filter)" overwritten by default value "4 1 1 1 1"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="scan_layer_filter", type="string", value="4 1 1 1 1"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="add_transform_xyz_rpy", type="string", value="$(arg add_transform_xyz_rpy)" overwritten by default value "0,0,0,0,0,0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="add_transform_xyz_rpy", type="string", value="0,0,0,0,0,0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="add_transform_check_dynamic_updates", type="bool", value="$(arg add_transform_check_dynamic_updates)" overwritten by default value "false"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="add_transform_check_dynamic_updates", type="bool", value="false"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="start_services", type="bool", value="True"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="message_monitoring_enabled", type="bool", value="False"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="read_timeout_millisec_default", type="int", value="2147483647"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="read_timeout_millisec_startup", type="int", value="2147483647"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="read_timeout_millisec_kill_node", type="int", value="2147483647"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="client_authorization_pw", type="string", value="F4724744"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="lfp_meanfilter", type="int", value="-1"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="lfp_medianfilter", type="int", value="-1"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="ros_qos", type="int", value="-1"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="tf_base_frame_id", type="string", value="map"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="tf_base_lidar_xyz_rpy", type="string", value="0,0,0,0,0,0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="tf_publish_rate", type="double", value="$(arg tf_publish_rate)" overwritten by default value "10.0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="tf_publish_rate", type="double", value="10.0"
[Info]: LaunchParser::parseFile(sick_mrs_1xxx.launch): name="tick_to_timestamp_mode", type="int", value="0"
scanner_type                   string     sick_mrs_1xxx       
min_ang                        double     -1.570796327        
max_ang                        double     +0.872664626        
intensity_resolution_16bit     bool       false               
hostname                       string     192.168.0.1         
port                           string     2112                
timelimit                      int        5                   
cloud_topic                    string     cloud               
laserscan_topic                string     scan                
frame_id                       str        cloud               
sw_pll_only_publish            bool       true                
use_generation_timestamp       bool       false               
min_intensity                  double     0.0                 
scandatacfg_timingflag         int        -1                  
scandatacfg_azimuth_table      int        0                   
imu_enable                     bool       true                
imu_enable_additional_info     bool       True                
imu_topic                      string     imu                 
range_min                      double     0.05                
range_max                      double     100.0               
range_filter_handling          int        0                   
ang_res                        double     0.0625              
scan_freq                      double     50                  
scan_layer_filter              string     4 1 1 1 1           
add_transform_xyz_rpy          string     0,0,0,0,0,0         
add_transform_check_dynamic_updates bool       false               
start_services                 bool       True                
message_monitoring_enabled     bool       False               
read_timeout_millisec_default  int        2147483647          
read_timeout_millisec_startup  int        2147483647          
read_timeout_millisec_kill_node int        2147483647          
client_authorization_pw        string     F4724744            
lfp_meanfilter                 int        -1                  
lfp_medianfilter               int        -1                  
ros_qos                        int        -1                  
tf_base_frame_id               string     map                 
tf_base_lidar_xyz_rpy          string     0,0,0,0,0,0         
tf_publish_rate                double     10.0                
tick_to_timestamp_mode         int        0                   
[Info]: Range filter configuration: range_min=0.05, range_max=100, range_filter_handling=0
[Info]: Start initialising scanner [Ip: 192.168.5.53] [Port:2112]
[Info]: ScanLayerFilterCfg: filter_settings="4 1 1 1 1", 4 layers, layer_activation=[1,1,1,1], first_active_layer=0, last_active_layer=3
[Info]: use_generation_timestamp:=0, using lidar send timestamp instead of generation timestamp for software pll converted message timestamp.
[Info]: Publishing lidar pointcloud2 to cloud
[Info]: Publishing on topic "/cloud", qos=10
[Info]: Publishing on topic "/imu", qos=10
[Info]: Publishing on topic "/encoder", qos=10
[Info]: Publishing on topic "/scan", qos=10
[Info]: SickCloudTransform: add_transform_xyz_rpy = (0,0,0,0,0,0)
[Info]: SickCloudTransform: azimuth_offset = 0 [deg]
[Info]: SickCloudTransform: additional 3x3 rotation matrix = { (1,0,0), (0,1,0), (0,0,1) }
[Info]: SickCloudTransform: apply 3x3 rotation = false
[Info]: SickCloudTransform: additional translation = (0,0,0)
[Info]: SickCloudTransform: check_dynamic_updates = false
[Info]: sick_scan_xd: Tcp::open: connecting to 192.168.5.53:2112 ...
[Info]: sick_scan_xd Tcp::open: connected to 192.168.5.53:2112
[Info]: [Info]SickThread TcpRecvThread started.: 
Parameter setting for <active_echo: 0>
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x01<ETX>
[Info]: checkColaDialect: lidar response in configured Cola-dialect Cola-B
[Info]: Sending  : <STX><STX><STX><STX><Len=0023>sMN SetAccessMode 0x03 0xf4 0x72 0x47 0x44 CRC:<0xb3>
[Info]: Receiving: <STX>sAN SetAccessMode \x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0015>sWN EIHstCola 0x01 CRC:<0x09>
[Info]: Receiving: <STX>sWA EIHstCola <ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0015>sMN LMCstopmeas CRC:<0x10>
[Info]: Receiving: <STX>sAN LMCstopmeas \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0025>sRN SetActiveApplications CRC:<0x08>
[Info]: Receiving: <STX>sRA SetActiveApplications \x00\x02\x46\x45\x56\x4c\x00\x52\x41\x4e\x47\x01<ETX>
[Info]: response to "sRN SetActiveApplications": \x02\x02\x02\x02\x00\x00\x00\x26sRA SetActiveApplications \x00\x02FEVL\x00RANG\x01\x27
[Info]: FieldEvaluationActive = false
[Info]: Sending  : <STX><STX><STX><STX><Len=0015>sRN DeviceIdent CRC:<0x25>
[Info]: Receiving: <STX>sRA DeviceIdent \x00\x08\x4d\x52\x53\x31\x78\x78\x78\x43\x00\x08\x32\x2e\x32\x2e\x31\x2e\x3...
[Info]: Deviceinfo MRS1xxxC V2.2.1.0R found and supported by this driver.
[Info]: MRS1xxx firmware version 2.2.1
[Info]: Sending  : <STX><STX><STX><STX><Len=0038>sWN SetActiveApplications 0x00 0x02 0x46 0x45 0x56 0x4c 0x00 0x52 0x41 0x4e 0x47 0x01 CRC:<0x2d>
[Info]: Receiving: <STX>sWA SetActiveApplications <ETX>
[Info]: MRS1xxx firmware version 2.2.1
[Info]: Sending  : <STX><STX><STX><STX><Len=0038>sWN SetActiveApplications 0x00 0x02 0x46 0x45 0x56 0x4c 0x00 0x52 0x41 0x4e 0x47 0x01 CRC:<0x2d>
[Info]: Receiving: <STX>sWA SetActiveApplications <ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0016>sRN SerialNumber CRC:<0x4c>
[Info]: Receiving: <STX>sRA SerialNumber \x00\x08\x32\x33\x31\x36\x30\x30\x31\x37<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0019>sRN FirmwareVersion CRC:<0x24>
[Info]: Receiving: <STX>sRA FirmwareVersion \x00\x09\x56\x20\x32\x2e\x32\x2e\x31\x2e\x30<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0010>sRN ODoprh CRC:<0x41>
[Info]: Receiving: <STX>sRA ODoprh \x00\x00\x6a\x1c<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0010>sRN ODpwrc CRC:<0x52>
[Info]: Receiving: <STX>sRA ODpwrc \x00\x00\x00\x18<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0016>sRN LocationName CRC:<0x55>
[Info]: Receiving: <STX>sRA LocationName \x00\x0b\x53\x4e\x20\x32\x33\x31\x36\x30\x30\x31\x37<ETX>
[Info]: ScanLayerFilterCfg: filter_settings=" 4 1 1 1 1", 4 layers, layer_activation=[1,1,1,1], first_active_layer=0, last_active_layer=3
[Info]: Sending  : <STX><STX><STX><STX><Len=0026>sWN ScanLayerFilter 0x00 0x04 0x01 0x01 0x01 0x01 CRC:<0x32>
[Info]: Receiving: <STX>sWA ScanLayerFilter <ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0007>sMN Run CRC:<0x19>
[Info]: Receiving: <STX>sAN Run \x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0023>sMN SetAccessMode 0x03 0xf4 0x72 0x47 0x44 CRC:<0xb3>
[Info]: Receiving: <STX>sAN SetAccessMode \x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMPoutputRange CRC:<0x5e>
[Info]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x09\xc4\x00\x00\x00\x00\x00\x15\x5c\xc0<ETX>
[Info]: Angle resolution of scanner is 0.25 [deg]  (in 1/10000th deg: 2500)
[Info]: [From:To] 0 [deg] to 140 [deg] (in 1/10000th deg: from 0 to 1400000)
[Info]: MIN_ANG: -1.5708 [rad] -90 [deg]
[Info]: MAX_ANG: 0.872665 [rad] 50 [deg]
[Info]: Sending  : <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 0x00 0x09 0xc4 0x00 0x00 0x00 0x00 0x00 0x15 0x5c 0xc0 CRC:<0x3e>
[Info]: Receiving: <STX>sWA LMPoutputRange <ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMPoutputRange CRC:<0x5e>
[Info]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x09\xc4\x00\x00\x00\x00\x00\x15\x5c\xc0<ETX>
[Info]: Angle resolution of scanner is 0.25 [deg]  (in 1/10000th deg: 2500)
[Info]: MIN_ANG (after command verification): -1.5708 [rad] -90 [deg]
[Info]: MAX_ANG (after command verification): 0.872665 [rad] 50 [deg]
[Info]: MRS1xxx scandatacfg_azimuth_table=0, rssi_flag=0, azimuth table not activated
[Info]: Sending  : <STX><STX><STX><STX><Len=0032>sWN LMDscandatacfg 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x01 CRC:<0x45>
[Info]: Receiving: <STX>sWA LMDscandatacfg <ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMDscandatacfg CRC:<0x67>
[Info]: Receiving: <STX>sRA LMDscandatacfg \x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0007>sMN Run CRC:<0x19>
[Info]: Receiving: <STX>sAN Run \x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0023>sMN SetAccessMode 0x03 0xf4 0x72 0x47 0x44 CRC:<0xb3>
[Info]: Receiving: <STX>sAN SetAccessMode \x01<ETX>
[Info]: Sending mLMPsetscancfg request: { scan_frequency=5000, active_sector_cnt=1, angular_resolution[0]=625, start_angle[0]=-475000, stop_angle[0]=2275000 }
[Info]: Sending  : <STX><STX><STX><STX><Len=0037>sMN mLMPsetscancfg 0x00 0x00 0x13 0x88 0x00 0x01 0x00 0x00 0x02 0x71 0xff 0xf8 0xc0 0x88 0x00 0x22 0xb6 0xb8 CRC:<0xd9>
[Info]: Receiving: <STX>sAN mLMPsetscancfg \x02\x00\x00\x13\x88\x00\x01\x00\x00\x02\x71\xff\xf8\xc0\x88\x00\x22\xb6...
[Warn]: SickScanParseUtil::SopasToLMPscancfg(): status code 2 in reply: "sAN mLMPsetscancfg \x02\x00\x00\x13\x88\x00\x01\x00\x00\x02\x71\xff\xf8\xc0\x88\x00\x22\xb6\xb8" indicates an ERROR
[Info]: LMPscancfg reply: "sAN mLMPsetscancfg \x02\x00\x00\x13\x88\x00\x01\x00\x00\x02\x71\xff\xf8\xc0\x88\x00\x22\xb6\xb8"
[Info]: LMPscancfg: { scan_frequency=5000, active_sector_cnt=1, angular_resolution[0]=625, start_angle[0]=-475000, stop_angle[0]=2275000 }
[Info]: sAN mLMPsetscancfg: scan frequency = 50 Hz, angular resolution = 0.0625 deg.
[Info]: Sending  : <STX><STX><STX><STX><Len=0014>sRN LMPscancfg CRC:<0x63>
[Info]: Receiving: <STX>sRA LMPscancfg \x00\x00\x13\x88\x00\x01\x00\x00\x09\xc4\xff\xf8\xc0\x88\x00\x22\xb6\xb8<ETX...
[Info]: LMPscancfg reply: "sRA LMPscancfg \x00\x00\x13\x88\x00\x01\x00\x00\x09\xc4\xff\xf8\xc0\x88\x00\x22\xb6\xb8"
[Info]: LMPscancfg: { scan_frequency=5000, active_sector_cnt=1, angular_resolution[0]=2500, start_angle[0]=-475000, stop_angle[0]=2275000 }
[Info]: sRA LMPscancfg: scan frequency = 50 Hz, angular resolution = 0.25 deg.
[Info]: Sending  : <STX><STX><STX><STX><Len=0018>sWN FREchoFilter 0x02 CRC:<0x7d>
[Info]: Receiving: <STX>sWA FREchoFilter <ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0016>sMN LMCstartmeas CRC:<0x68>
[Info]: Receiving: <STX>sAN LMCstartmeas \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0007>sMN Run CRC:<0x19>
[Info]: Receiving: <STX>sAN Run \x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 0 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 1 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 2 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 3 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 4 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 5 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 6 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 7 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 8 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 9 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 10 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 11 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 12 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 13 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[Info]: Waiting for scanner ready state since 14 secs
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x01<ETX>
[Info]: Scanner ready for measurement after 15 [sec]
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sEN LMDscandata 0x01 CRC:<0x33>
[Info]: Receiving: <STX>sEA LMDscandata \x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0029>sEN InertialMeasurementUnit 0x01 CRC:<0x35>
[Info]: Receiving: <STX>sEA InertialMeasurementUnit \x01<ETX>
[Info]: 1 / 6 packets dropped. Software PLL not yet locked.
[Info]: 2 / 6 packets dropped. Software PLL not yet locked.
[Info]: 3 / 6 packets dropped. Software PLL not yet locked.
[Info]: 4 / 6 packets dropped. Software PLL not yet locked.
[Info]: 5 / 6 packets dropped. Software PLL not yet locked.
@rostest
Copy link
Collaborator

rostest commented Feb 18, 2025

Hello @Abdulhadiasa,

Thank you for reporting this issue and providing detailed information.

The message [Info]: Caught signal 2 indicates that the application received an interrupt signal (SIGINT), which typically corresponds to a manual interruption (e.g., pressing Ctrl+C) or an external process sending this signal.

Given that you're running the API without ROS and have implemented a deep copy of the point cloud data before external processing, it's possible that the interruption is due to one of the following reasons:

  • Manual Interruption: Ensure that there isn't an inadvertent Ctrl+C input or another process intentionally sending a SIGINT to your application.

  • Resource Constraints: Intensive processing of point cloud data can lead to high CPU or memory usage. If the system becomes resource-starved, it might terminate processes. Monitor your system's resource usage to identify any potential bottlenecks.

  • Unhandled Exceptions: If an exception occurs during the processing of the point cloud data and isn't properly handled, it could cause the application to exit unexpectedly. Ensure that all potential exceptions are caught and managed appropriately.

To effectively debug the issue you're encountering with the sick_scan_xd API, consider the following steps:

1. Compile with Debug Information

  • Modify Compiler Flags:
    By default, sick_scan_xd builds with the -O3 optimization flag. For debugging, it's beneficial to include debug symbols and reduce optimization levels. Adjust your build configuration to use -g for debug information and -O0 to disable optimizations.
  • Rebuild the Project:
    After modifying the compiler flags, perform a clean rebuild of the project to ensure all components include the necessary debug information.

2. Utilize Debugging Tools

  • GDB (GNU Debugger):
    Run your application within GDB to capture the state at the time of the signal.

    • Start GDB:
      gdb --args ./your_application [arguments]
    • Run the Application:
      Within GDB, type run to start the program.
    • Capture Backtrace on Signal:
      If the program exits due to a signal (e.g., SIGINT), GDB will pause execution. Type bt to obtain a backtrace, which can help identify where the signal was raised.
  • Signal Handling:
    Ensure that your application or any linked libraries aren't inadvertently sending SIGINT signals. Review the code for any raise(SIGINT) or similar calls.

3. Review Signal Handling in sick_scan_xd

  • Signal Setup:
    The sick_scan_xd driver sets up signal handlers for SIGINT and SIGTERM to manage graceful shutdowns. This setup is located in the sick_generic_caller.cpp file:
    signal(SIGINT, rosSignalHandler); // SIGINT = 2, Ctrl-C or kill -2
    signal(SIGTERM, rosSignalHandler); // SIGTERM = 15, default kill level

Custom Signal Handling:
If your application modifies signal handling, ensure it doesn't conflict with the driver's handlers. Conflicting handlers might lead to unexpected terminations.

@rostest
Copy link
Collaborator

rostest commented Feb 18, 2025

For the most recent updates, please refer to the latest branch:
🔗 SICK Scan XD - feature/issue_update_2412xx

BTW: the startup sequence looks good.

@Abdulhadiasa
Copy link
Author

I did not mention this before, I am using python in my application.
regarding your points:

Manual Interruption: Ensure that there isn't an inadvertent Ctrl+C input or another process intentionally sending a SIGINT to your application.

There was no manual interruption

Resource Constraints: Intensive processing of point cloud data can lead to high CPU or memory usage. If the system becomes resource-starved, it might terminate processes. Monitor your system's resource usage to identify any potential bottlenecks.

My CPU was under 50% utilization and there was more than enough RAM on my PC (unless you mean Lidar resources, let me know how I can check this)

Unhandled Exceptions: If an exception occurs during the processing of the point cloud data and isn't properly handled, it could cause the application to exit unexpectedly. Ensure that all potential exceptions are caught and managed appropriately.

my application was still running after the Lidar socket was disconnected and just to be sure I surrounded my code with a general try/except but no exceptions were caught

Compile with Debug Information

I compiled with cmake -DROS_VERSION=0 -DLDMRS=0 -DSCANSEGMENT_XD=0 -g -O0 -G "Unix Makefiles" ../sick_scan_xd but no new debug messages were added when the Lidar stopped providing data (output will be added in the gdb section bellow)

Here is the output from gdb:

...
[Info]: 1 / 6 packets dropped. Software PLL not yet locked.
[Info]: 2 / 6 packets dropped. Software PLL not yet locked.
[Info]: 3 / 6 packets dropped. Software PLL not yet locked.
[Info]: 4 / 6 packets dropped. Software PLL not yet locked.
[Info]: 5 / 6 packets dropped. Software PLL not yet locked.

up to this point, I was receiving Lidar readings

sick_generic_laser: leaving main loop...[Info]: SickThread TcpRecvThread finished (flags: threadShouldRun=0, endThread=0).
SickScanCommon closed.
[Thread 0x7fffc124a700 (LWP 1599052) exited]
[Thread 0x7fffc1b3d700 (LWP 1599051) exited]

after the above, my application was still running but the Lidar readings stopped, when i closed my application and called

SickScanApiUnloadLibrary(self.api_lib)
SickScanApiDeregisterCartesianPointCloudMsg(self.api_lib, self.api_handler, self.cartesian_pointcloud_callback)
SickScanApiClose(self.api_lib, self.api_handler)
SickScanApiRelease(self.api_lib, self.api_handler)

then the signal 2 was caught

[Info]: Caught signal 2

[Info]: good bye

[Info]: You are leaving the following version of this node:

[Info]: sick_scan_api V. 3.6.0 githash:"7cab14fb4e3ec05fb59eea19039823510abfc688" gitinfo:"2024-10-23 14:46:37 +0200	Alexander Weinmann	Merge branch 'release/3.6.0'"

[Info]: sick_generic_laser: stop and exit (line 218)
[Info]: sick_generic_laser: exit (line 221)
sick_generic_laser: exit (line 223)
sick_generic_laser: exit (line 225)
[Thread 0x7fffd386c700 (LWP 1599050) exited]
[Thread 0x7fffd606d700 (LWP 1599049) exited]
[Thread 0x7fffd686e700 (LWP 1599048) exited]
...

and bt gave No stack.

@Abdulhadiasa
Copy link
Author

I tried running the API while simply opening camera stream (once using gstreamer, and another using opencv) without doing any processing on the cloud points except for the deep copy operation and got the same result

sick_generic_laser: leaving main loop...[Info]: SickThread TcpRecvThread finished (flags: threadShouldRun=0, endThread=0).
SickScanCommon closed.

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

2 participants