活动介绍

shutdown -s now

时间: 2025-07-20 10:18:39 浏览: 19
<think>我们正在处理用户的问题:用户想执行立即关机命令,询问Linux shutdown -s now的用法。 根据提供的引用,特别是引用[1]和引用[2],我们知道在Linux中,立即关机的命令是`shutdown -h now`。 注意:用户提到了`shutdown -s now`,这是Windows系统中的关机命令(如引用[1]中提到的Windows用户注意事项),但在Linux中,我们使用`-h`(halt)选项。 因此,我们需要告诉用户在Linux中正确的立即关机命令是: shutdown -h now 另外,引用[1]中给出了一个示例: [root@db-server ~]# shutdown -h now 同时,引用[2]也提到了halt、reboot、poweroff等命令,但用户明确询问shutdown命令。 所以,回答应该包括: 1. 指出Linux中正确的立即关机命令。 2. 说明需要超级用户权限(通常使用sudo)。 3. 给出示例命令。 另外,根据引用[4],我们知道关机时会发送SIGTERM信号,然后在一段时间后发送SIGKILL信号。因此,我们也可以提到这个命令会优雅地关闭系统。 注意:用户的问题中提到了“shutdown -s now”,这在Linux中是不正确的,因为Linux的shutdown命令没有-s选项。 因此,我们这样回答: 在Linux系统中,立即关机的正确命令是: sudo shutdown -h now 其中: - `sudo`:因为关机需要管理员权限(如果当前是root用户则不需要)。 - `-h`:表示停止系统(halt),即关机。 - `now`:表示立即执行。 执行此命令后,系统会向所有登录用户广播关机消息(如引用[1]所示),并开始优雅地关闭进程,最后关闭电源。 如果您想使用其他命令关机,还可以使用: sudo poweroff # 直接关闭电源 sudo halt # 停止系统运行(通常也需要关闭电源,但取决于系统) 但最常用且最安全的方式是使用`shutdown -h now`。 注意:在Windows系统中,立即关机的命令是`shutdown -s -t 0`,但在Linux中,我们使用上述命令。 相关问题: 1. 如何设置Linux系统在指定时间关机? 2. 如何取消已经计划的关机? 3. Linux关机命令与重启命令有何区别?</think>在Linux系统中,立即关机的正确命令是: **`sudo shutdown -h now`** ### 详细说明: 1. **命令结构**: ```bash sudo shutdown -h now ``` - `sudo`:获取管理员权限(必需) - `-h`:**halt**(停止系统运行) - `now`:**立即执行**(可替换为具体时间如 `+5` 表示5分钟后关机) 2. **执行效果**: - 系统会向所有登录用户广播关机通知(如引用[1]示例) - 所有进程收到 `SIGTERM` 信号,允许程序保存数据并退出 - 若进程未响应,稍后发送 `SIGKILL` 强制终止(引用[4]) - 最终关闭电源 3. **替代命令**(效果相同): ```bash sudo poweroff # 直接关闭电源 sudo halt -p # -p 表示关闭电源 sudo init 0 # 切换到运行级别0(关机) ``` ### 注意事项: 1. **权限要求**: 普通用户必须使用 `sudo`,否则会报错: `shutdown: Need to be root` 2. **取消关机**: 若误操作可紧急终止关机进程: ```bash sudo shutdown -c # --cancel 的简写 ``` 3. **安全警告**: - ❌ 避免直接断电源,可能导致数据损坏 - ❌ 不要使用 `shutdown -s`(Windows语法,Linux无效) > 广播消息示例(如引用[1]): > `Broadcast message from root... The system is going down for system halt NOW!` > 此消息会发送给所有已登录用户终端[^1]。 --- ### 相关问题: 1. 如何设置Linux系统在指定时间自动关机(例如23:00)? 2. `shutdown -h now` 和 `poweroff` 命令有何本质区别? 3. 服务器关机前如何确保所有服务已安全停止?
阅读全文

相关推荐

import java.util.Scanner; import java.util.Timer; import java.util.TimerTask; public class AutoShutdown { private static Timer shutdownTimer; private static boolean isCancelled = false; public static void main(String[] args) { System.out.println("=== 定时关机程序 ==="); System.out.print("请输入关机倒计时(秒): "); Scanner scanner = new Scanner(System.in); int seconds = scanner.nextInt(); // 启动关机倒计时 startShutdownCountdown(seconds); // 监听用户取消输入 monitorCancelOption(scanner); scanner.close(); } private static void startShutdownCountdown(int seconds) { shutdownTimer = new Timer(); final int[] remaining = {seconds}; shutdownTimer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { if (isCancelled) { cancelShutdown(); return; } System.out.printf("系统将在 %d 秒后关机...\n", remaining[0]); // 倒计时结束执行关机 if (remaining[0] <= 0) { try { Runtime.getRuntime().exec("shutdown -s -t 0"); System.out.println("正在执行关机..."); shutdownTimer.cancel(); } catch (Exception e) { System.err.println("关机命令执行失败: " + e.getMessage()); } return; } // 倒计时最后10秒特殊提示 if (remaining[0] <= 10) { System.out.println(">>> 即将关机! 输入 'cancel' 取消 <<<"); } remaining[0]--; } }, 0, 1000); // 每秒执行一次 } private static void monitorCancelOption(Scanner scanner) { new Thread(() -> { while (true) { String input = scanner.nextLine().trim(); if ("cancel".equalsIgnoreCase(input)) { isCancelled = true; break; } } }).start(); } private static void cancelShutdown() { try { Runtime.getRuntime().exec("shutdown -a"); System.out.println("关机已取消"); shutdownTimer.cancel(); } catch (Exception e) { System.err.println("取消关机失败: " + e.getMessage()); } } } 这是源代码报错注: AutoShutdown.java使用或覆盖了已过时的 API。 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。将修改后的完整代码发我

#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import tf import threading import rospy import sys import math from sensor_msgs.msg import LaserScan import actionlib from actionlib_msgs.msg import * from geometry_msgs.msg import Pose, PoseWithCovarianceStamped, Point, Quaternion, Twist from std_msgs.msg import Int32 from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal import roslib import tf2_ros from geometry_msgs.msg import TransformStamped import numpy as np from std_msgs.msg import String, Float32MultiArray import ctypes from ctypes.util import find_library import os from playsound import playsound from ar_track_alvar_msgs.msg import AlvarMarkers #from robot_voice.msg import Targettt # 自定义消息类型 key = 0 F_list = [] global xy global task_xy global qtn_list_xy global qtn_list_task_xy global pose_num_xy global pose_num_task_xy global yaw global now_pose_X global now_pose_Y #xy =[[0.16,-0.30,3.14], [3.0,-0.32,0], [3.03,-3.02,-0], [0.01, -2.95, 3.14],[0.5, -2.55, 3.14]] xy = [[0.21,-0.81,3.12],[0.82,-0.28,1.54], [0.821,-0.80,1.491], [2.95,-2.44,0.02],[2.37,-3.15,-1.574]] #task_xy =[[0.17,-1.22,3.14],[1.08,-0.25,3.14],[2.17,-0.27,0], [2.93,-1.14,0], [2.96,-2.15,0],[2.10,-3.04,0],[1.09,-3.0,3.14],[0.23,-2.10,3.14]] task_xy=[[0.821,-0.80,1.491],[2.55,-0.17,1.54], [2.99,-0.85,0.05], [2.95,-2.44,0.02],[2.37,-3.15,-1.574]] pid_stop_xy =[[0.395,-1.06,0],[0.416,-0.856,-90],[-0.99,-0.826,90], [0.52,-0.49,180], [0.52,0.50,180],[-0.54,-0.49,180],[-0.50,0.49,0],[0.51,-0.49,0]] qtn_list_xy = [] #四元数列表 qtn_list_task_xy = [] #任务点四元数列表 pose_num_xy= len(xy) pose_num_task_xy=len(task_xy) yaw = 0 global move_base now_pose_X=0 now_pose_Y=0 # -----------pid函数及其参数------------ # 注: # 1. global w_kp global w_ki global w_kd global w_target global w_e_all global w_last_e w_kp = 2 #2 w_ki = 0.001 w_kd = 0.005 #0 w_e_all = 0 w_last_e = 0 global x_f,x_b,y_l,y_r x_f=0.0 x_b=0.0 y_l=0.0 y_r=0.0 def w_pid_cal(pid_target,dis): global w_kp global w_ki global w_kd global w_e_all global w_last_e e = dis -pid_target #if e>-0.1 and e<0.1: #e = 0 w_e_all = w_e_all+e pid = w_kp*e+w_ki*w_e_all+w_kd*(e-w_last_e) w_last_e = e return pid global p_kp global p_ki global p_kd global p_e_all global p_last_e global p_pid p_kp = -7 p_ki = 0 p_kd = -3 p_e_all = 0 p_last_e = 0 p_pid = 0 def p_pid_cal(pid_target,pose): global p_kp global p_ki global p_kd global p_e_all global p_last_e ture_pose = (pose/3.14159265359*180.0+180.0)%360 if pid_target==0: if ture_pose>0 and ture_pose<180: pid_target=0 if ture_pose>180 and ture_pose<360: pid_target=360 e = ture_pose -pid_target # print(e) p_e_all = p_e_all+e pid = p_kp*e+p_ki*p_e_all+p_kd*(e-p_last_e) #rospy.loginfo("e %f",e) p_last_e = e return pid global point_kp global point_ki global point_kd global point_e_all global point_last_e global point_pid point_kp = -3 point_ki = 0 point_kd = 0 point_e_all = 0 point_last_e = 0 point_pid = 0 def point_pid(pid_target_x,ture): global point_kp global point_ki global point_kd global point_e_all global point_last_e e = ture -pid_target_x point_e_all = point_e_all+e pid = point_kp*e+point_ki*point_e_all+point_kd*(e-point_last_e) point_last_e = e return pid def limt(limt,target): if limt>target: limt=target if limt<-target: limt=-target return limt # ----------pid停车------- def pid_stop2(target_x,target_y,target_yaw): global w_kp,w_ki,w_kd,w_e_all w_kp = 1.5 #1.5 w_ki = 0.005 #0.005 w_kd = 0.006 #0.01 w_e_all=0 count =0 pid_vel_pub = rospy.Publisher('/cmd_vel', Twist, queue_size=7) rate_loop_pid=rospy.Rate(7) speed = Twist() wich_x = 0 wich_y = 0 time = 0 while not rospy.is_shutdown(): rate_loop_pid.sleep() time+=1 if target_x>0: pid_x = w_pid_cal(target_x,x_f) wich_x=x_f if target_x<0: pid_x = w_pid_cal(target_x,-x_b) wich_x=-x_b if target_y>0: pid_y = w_pid_cal(target_y,y_l) wich_y = y_l if target_y<0: pid_y = w_pid_cal(target_y,-y_r) wich_y = -y_r p_pid = p_pid_cal(target_yaw,yaw) #if abs(wich_x)<0.8: #speed.linear.y = 0 #else: speed.linear.y = pid_y speed.linear.x = pid_x speed.angular.z = p_pid/180.0*3.14159265359 w_e_all=limt(w_e_all,5) print("w_e_all:",w_e_all) print("wich_x:",wich_x,"wich_y:",wich_y) if time>=150: w_e_all=0 break #if abs(wich_x-target_x)<=0.05 and abs(wich_y-target_y)<=0.07 and abs(target_yaw-(yaw/3.1415926*180+180))<=5: #w_e_all=5 #w_ki = 0.001 if abs(wich_x-target_x)<=0.03 and abs(wich_y-target_y)<=0.03 and abs(target_yaw-(yaw/3.1415926*180+180))<=3: w_e_all=0 count+=1 if count>=6: speed.linear.x = 0 speed.linear.y = 0 speed.linear.z = 0 pid_vel_pub.publish(speed) #rospy.sleep(0.5) w_e_all=0 break pid_vel_pub.publish(speed) def pid_stop(target_x,target_y,target_yaw): global w_kp,w_ki,w_kd,w_e_all w_kp = 1.5 #1.5 w_ki = 0.005 #0.005 w_kd = 0.006 #0.01 w_e_all=0 count =0 pid_vel_pub = rospy.Publisher('/cmd_vel', Twist, queue_size=7) rate_loop_pid=rospy.Rate(7) speed = Twist() wich_x = 0 wich_y = 0 time = 0 while not rospy.is_shutdown(): rate_loop_pid.sleep() time+=1 if target_x>0: pid_x = w_pid_cal(target_x,x_f) wich_x=x_f if target_x<0: pid_x = w_pid_cal(target_x,-x_b) wich_x=-x_b if target_y>0: pid_y = w_pid_cal(target_y,y_l) wich_y = y_l if target_y<0: pid_y = w_pid_cal(target_y,-y_r) wich_y = -y_r p_pid = p_pid_cal(target_yaw,yaw) #if abs(wich_x)<0.8: #speed.linear.y = 0 #else: speed.linear.y = pid_y speed.linear.x = pid_x speed.angular.z = p_pid/180.0*3.14159265359 w_e_all=limt(w_e_all,5) print("w_e_all:",w_e_all) print("wich_x:",wich_x,"wich_y:",wich_y) if time>=150: w_e_all=0 break #if abs(wich_x-target_x)<=0.05 and abs(wich_y-target_y)<=0.07 and abs(target_yaw-(yaw/3.1415926*180+180))<=5: #w_e_all=5 #w_ki = 0.001 if abs(wich_x-target_x)<=0.08 and abs(wich_y-target_y)<=0.08 and abs(target_yaw-(yaw/3.1415926*180+180))<=5: w_e_all=0 count+=1 if count>=3: speed.linear.x = 0 speed.linear.y = 0 speed.linear.z = 0 pid_vel_pub.publish(speed) #rospy.sleep(0.5) w_e_all=0 break pid_vel_pub.publish(speed) def pid_go(target_x,target_y,target_yaw): global point_kp, vision_result, dis_trun_off,point_ki global w_kp,w_ki,w_kd w_kp = 2 #2 w_ki = 0 w_kd = 0.008#0 count =0 pid_vel_pub = rospy.Publisher('/cmd_vel', Twist, queue_size=7) rate_loop_pid=rospy.Rate(7) speed = Twist() wich_x = 0 wich_y = 0 while not rospy.is_shutdown(): if target_x>0: pid_x = w_pid_cal(target_x,x_f) wich_x=x_f if target_x<0: pid_x = w_pid_cal(target_x,-x_b) wich_x=-x_b if target_y>0: pid_y = w_pid_cal(target_y,y_l) wich_y = y_l if target_y<0: pid_y = w_pid_cal(target_y,-y_r) wich_y = -y_r p_pid = p_pid_cal(target_yaw,yaw) if abs(target_x-wich_x)<0.2 and abs(target_y-wich_y)<0.2: speed.linear.x = 0 speed.linear.y = 0 else: speed.linear.y = pid_y speed.linear.x = pid_x speed.angular.z = p_pid/180.0*3.14159265359 pid_vel_pub.publish(speed) rate_loop_pid.sleep() print("x_f:",x_f,"y_l:",y_l) #print(abs(target_yaw-yaw/3.1415926*180)) if vision_result != 0: # rospy.sleep(0.3) # thread_dis.join() break def pid_go2(target_x,target_y,target_yaw): global vision_result global w_kp,w_ki,w_kd,w_e_all print("--------开始pid_go2--------") w_kp = 2 #2 w_ki = 0 w_kd = 0.01 #0 count =0 w_e_all=0 pid_vel_pub = rospy.Publisher('/cmd_vel', Twist, queue_size=7) rate_loop_pid=rospy.Rate(7) speed = Twist() wich_x = 0 wich_y = 0 while not rospy.is_shutdown(): if target_x>0: pid_x = w_pid_cal(target_x,x_f) wich_x=x_f if target_x<0: pid_x = w_pid_cal(target_x,-x_b) wich_x=-x_b if target_y>0: pid_y = w_pid_cal(target_y,y_l) wich_y = y_l if target_y<0: pid_y = w_pid_cal(target_y,-y_r) wich_y = -y_r p_pid = p_pid_cal(target_yaw,yaw) if abs(target_x-wich_x)<0.2 and abs(target_y-wich_y)<0.2: speed.linear.x = 0 speed.linear.y = 0 else: if abs(wich_x)>0.55: speed.linear.y = 0.03*pid_y else: speed.linear.y = pid_y speed.linear.x = pid_x speed.angular.z = p_pid/180.0*3.14159265359 pid_vel_pub.publish(speed) rate_loop_pid.sleep() if vision_result != 0: w_e_all=0 # rospy.sleep(0.3) # thread_dis.join() break print("--------结束pid_go2--------") def pid_turn(target_x,target_y,target_yaw): global point_kp pid_vel_pub = rospy.Publisher('/cmd_vel', Twist, queue_size=7) rate_loop_pid=rospy.Rate(7.2) speed = Twist() while not rospy.is_shutdown(): map_pid_x = point_pid(target_x,now_pose_X) map_pid_y = point_pid(target_y,now_pose_Y) p_pid = p_pid_cal(target_yaw,yaw) if target_yaw!=180: speed.linear.x = 0 speed.linear.y = 0 else: speed.linear.x = 0 speed.linear.y = 0 speed.angular.z = 1.5*p_pid/180.0*3.14159265359 pid_vel_pub.publish(speed) rate_loop_pid.sleep() # print(abs(target_yaw-yaw/3.1415926*180)) if abs(target_yaw-(yaw/3.1415926*180+180))<=50: #rospy.sleep(0.3) break # -----------pid函数及其参数------------ # -----------获取视觉消息--------------- global object_vision object_vision = 0 def vision_callback(msg): global object_vision if msg.data: print(msg.data) object_vision = msg.data def vision_listen(): rospy.Subscriber('/detected_label',Int32,vision_callback,queue_size=10) #订阅视觉话题 rospy.spin() global ar_sign global task_vision ar_sign = 0 def ar_callback(msg): global object_vision , task_vision ar_sign = 0 if len(msg.markers): print("----------------------------------ar") print(msg.markers[0].id) task_vision = msg.markers[0].id ar_sign = 1 def vision_ar(): rospy.Subscriber('/ar_pose_marker',AlvarMarkers,ar_callback,queue_size=10) #订阅视觉话题 rospy.spin() global ai_vision ai_vision = 0 global ai_sign ai_sign = 0 def ai_callback(msg): global object_vision , task_vision if (msg.data): print("++++++++++++++++++++++++++++++++++++ai") print("ai回复",msg.data) task_vision = msg.data ai_sign = 1 def vision_ai(): rospy.Subscriber('/ai_result',Int32,ai_callback,queue_size=10) #订阅视觉话题 rospy.spin() # -----------获取视觉消息--------------- #------------------- 雷达话题订阅线程 ---------------- global scan_data scan_data = [] def get_valid_distance(scan, start_index, direction, angle_resolution): """ 从指定的起始角度开始,以给定的方向和角度分辨率寻找有效的激光数据, 并计算修正后的距离。 参数: - scan: 激光雷达扫描数据 - start_index: 起始角度索引 - direction: 搜索方向(1 表示顺时针,-1 表示逆时针) - angle_resolution: 角度分辨率(每个索引代表的角度) 返回值: - 修正后的有效距离 """ max_angle = len(scan.ranges) for i in range(max_angle): index = (start_index + i * direction) % max_angle if scan.ranges[index] != float('inf'): distance = scan.ranges[index] angle = np.radians((index - start_index) * angle_resolution) distance_corrected = distance * np.cos(angle) return distance_corrected return float('inf') def get_laserscan(scan): """ 激光雷达回调函数,计算前后左右方向的有效激光距离并进行修正。 参数: - scan: 激光雷达扫描数据 """ global x_f, x_b, y_l, y_r, yaw, scan_data scan_data = scan.ranges front_index = 360 # 前方角度索引 angle_resolution = 0.5 # 每个索引代表的角度(假设为0.5度) # 找到有效距离并进行修正 x_f = get_valid_distance(scan, front_index, 1, angle_resolution) # 从前方开始向右搜索 x_b = get_valid_distance(scan, 0, 1, angle_resolution) # 从后方开始向右搜索 y_l = get_valid_distance(scan, 540, -1, angle_resolution) # 从左侧开始向左搜索 y_r = get_valid_distance(scan, 180, 1, angle_resolution) # 从右侧开始向右搜索 #print("x_f:", x_f, "x_b:", x_b, "y_l:", y_l, "y_r:", y_r) def laser_listen(): rospy.Subscriber('/scan_filtered', LaserScan,get_laserscan,queue_size=7) rospy.spin() #------------------- 雷达话题订阅线程 ---------------- # -----------------------pid回家-------------------------- def pid_loop(): print("---------启动回家--------") global yaw global w_kp,w_ki,w_kd,w_e_all w_e_all=0 w_kp = 0.8 #2 w_ki = 0 w_kd = 0.00 #0 pid_vel_pub = rospy.Publisher('/cmd_vel', Twist, queue_size=7) rate_loop_pid=rospy.Rate(7) speed = Twist() while not rospy.is_shutdown(): pid_x = w_pid_cal(0.155,x_f) #pid_y = w_pid_cal(-0.35,-y_r) pid_y = w_pid_cal(0.155,y_l) p_pid = p_pid_cal(0,yaw) print("x_f",x_f) print("y_l",y_l) print("yaw",yaw) speed.linear.x = pid_x speed.linear.y = pid_y speed.angular.z = p_pid/180.0*3.14159265359 pid_vel_pub.publish(speed) rate_loop_pid.sleep() if abs(x_f-0.1)<0.18 and abs(y_l-0.1)<0.18 and abs(0-(yaw/3.1415926*180+180))<=5: speed.linear.x = 0 speed.linear.y = 0 pid_vel_pub.publish(speed) break print("---------结束回家--------") # -----------------------pid回家-------------------------- # ---------------vioce 语音播报----------------- def play_voice(number): playsound(str(number)+".mp3") def play_voice_begin(numbers): print("获取的任务目标为:"+str(target_point_arr)) numbers=sorted(numbers) playsound(str(numbers[0])+"_"+str(numbers[1])+"_"+str(numbers[2])+".mp3") print("播放文件为:"+str(numbers[0])+"_"+str(numbers[1])+"_"+str(numbers[2])+".mp3") # ---------------vioce 语音播报----------------- # -----------------导航点---------------------- # 1.本区域共三个函数导航实时距离获取,发布导航点,控制导航点发布 # 2.控制导航点发布部分默认是逐一发布点列表中的点,需要请注释并自行更改 # 发布目标点 # 控制导航点发布 global count_dis_times count_dis_times=0 def dis_func(x, y,min_dis): global dis_trun_off,now_pose_X,now_pose_Y,distance, vision_result,target_point_arr,times_voice_play,count_dis_times print("dis_func函数已启动:"+str(count_dis_times)+"次") count_dis_times+=1 # lock = threading.RLock() dis_fun_rate=rospy.Rate(10) while not rospy.is_shutdown(): dis_fun_rate.sleep() car_to_map_x=now_pose_X car_to_map_y=now_pose_Y # 计算小车到目标点的距离 distance = pow(pow( car_to_map_x - x, 2) + pow(car_to_map_y - y, 2), 0.5) #print("distance:"+str(distance)) if distance<min_dis: print("reach_goal") rospy.sleep(1) break def goals(x, y, i): min_dis=0.07 global qtn_list_xy,move_base,dis_trun_off,now_pose_X,pid_stop_vision_stop_flag,goal_vision_weight_flag target_point = Pose(Point(x, y, 0), Quaternion(qtn_list_xy[i][0], qtn_list_xy[i][1], qtn_list_xy[i][2], qtn_list_xy[i][3])) goal = MoveBaseGoal() goal.target_pose.pose = target_point goal.target_pose.header.frame_id = 'map' goal.target_pose.header.stamp = rospy.Time.now() rospy.loginfo("Going to: " + str(target_point)) print("goal") move_base.send_goal(goal) def goals_task(x, y, i): min_dis=0.07 global qtn_list_task_xy,move_base,dis_trun_off,now_pose_X target_point = Pose(Point(x, y, 0), Quaternion(qtn_list_task_xy[i][0], qtn_list_task_xy[i][1], qtn_list_task_xy[i][2], qtn_list_task_xy[i][3])) goal = MoveBaseGoal() goal.target_pose.pose = target_point goal.target_pose.header.frame_id = 'map' goal.target_pose.header.stamp = rospy.Time.now() rospy.loginfo("Going to: " + str(target_point)) print("goal") move_base.send_goal(goal) def send_None_goal(): global move_base goal = MoveBaseGoal() move_base.send_goal(goal) # ---------------vioce 语音播报----------------- global times_voice_play times_voice_play=0 def play_voice(number): global times_voice_play playsound(str(number)+".mp3") # ---------------vioce 语音播报----------------- # ----------------- init --------------------- # 1.处理点列表的四元数并放在新的列表 # 2.连接move_base # -------------- def now_pose_xy(): global now_pose_X,now_pose_Y,yaw now_pose=rospy.Rate(10) listener = tf.TransformListener() while not rospy.is_shutdown(): now_pose.sleep() try: (trans, rot) = listener.lookupTransform("map", "base_link", rospy.Time(0)) # 小车坐标 now_pose_X=trans[0] now_pose_Y=trans[1] euler = tf.transformations.euler_from_quaternion(rot) yaw = euler[2] # 第三个元素是yaw角 # print("x",now_pose_X,"y",now_pose_Y,"yaw",yaw) except Exception as e: print(".........") # -------------- def init_fun(): #转换点 global qtn_list_xy,qtn_list_task_xy,pose_num_xy,pose_num_task_xy,move_base for i in range(pose_num_xy): qtn = tf.transformations.quaternion_from_euler(0,0,xy[i][2]) qtn_list_xy.append(qtn) i=0 for i in range(pose_num_task_xy): qtn = tf.transformations.quaternion_from_euler(0,0,task_xy[i][2]) qtn_list_task_xy.append(qtn) #连接move_base—actition move_base = actionlib.SimpleActionClient("move_base", MoveBaseAction) rospy.loginfo("Waiting for move_base action server...") while move_base.wait_for_server(rospy.Duration(5.0)) == 0: rospy.loginfo("Request to connect to move_base server") rospy.loginfo("Be connected successfully") thread_lidar = threading.Thread(target=laser_listen) thread_lidar.start() thread_vision = threading.Thread(target=vision_listen) thread_vision.start() thread_ar = threading.Thread(target=vision_ar) thread_ar.start() thread_ai = threading.Thread(target=vision_ai) thread_ai.start() thread_now_pose = threading.Thread(target=now_pose_xy) thread_now_pose.start() # 初始化 history 变量 history = {"current_value": None, "stable_count": 0, "values": []} required_stable_count = 20 def get_stable_value(new_value, required_stable_count, history, max_history_size=50): # 更新历史记录列表,保留最近的 max_history_size 个值 history["values"].append(new_value) if len(history["values"]) > max_history_size: history["values"].pop(0) # 超过最大限制时移除最早的值 # 检查稳定计数 if new_value == history["current_value"]: history["stable_count"] += 1 else: history["current_value"] = new_value history["stable_count"] = 1 # 如果达到所需的稳定次数,返回稳定的值 if history["stable_count"] >= required_stable_count: return history["current_value"] else: return None def vision_to_get_task(t_long): global object_vision , ar_sign , task_vision,ai_sign task_vision = 0 object_vision = 0 ar_sign=0 ai_sign = 0 t = 0 sure_required = 0 rate_loop_pid=rospy.Rate(10) rospy.set_param('/top_view_shot_node/im_flag', 1) rospy.sleep(3) while not rospy.is_shutdown(): print("find.............",object_vision) if object_vision and not task_vision: sure_required = get_stable_value(object_vision, 50, history) if sure_required is not None: print("sure_required",sure_required) task_vision = sure_required t+=1 if t>=t_long: print("超时") task_vision=999 break if task_vision: print("========",task_vision) oject_vision = 0 break rate_loop_pid.sleep() return task_vision def get_voice(voice): global target_2 global target_3 if (target_2==0 or target_3==0): target_2 = voice.er target_3 = voice.san rospy.loginfo("收到/target话题的反馈: %d %d",target_2, target_3) # 访问自定义消息的字段 def robot_voice(): rospy.Subscriber('/target',Targettt,get_voice,queue_size=1) rospy.spin() def voice_wakeup_publisher(): pub = rospy.Publisher('/voiceWakeup', String, queue_size=10) user_input = input("请输入1开始启动: ") if user_input == "1": msg = String() msg.data = "1" pub.publish(msg) rospy.loginfo("已发布消息: %s", msg.data) # ----------------- init --------------------- if __name__ == '__main__': # 初始化节点 rospy.init_node('move_test', anonymous=True) init_fun() a = input() rospy.loginfo("节点初始化完成,开始执行任务") # 发布唤醒信号 #voice_wakeup_publisher() goals(xy[0][0], xy[0][1], 0) dis_func(xy[0][0], xy[0][1], 0.05) send_None_goal() pid_stop2(pid_stop_xy[0][0], pid_stop_xy[0][1], pid_stop_xy[0][2]) rospy.sleep(5) '''goals(xy[1][0], xy[1][1], 1) dis_func(xy[0][0], xy[0][1], 0.05) send_None_goal() pid_stop2(pid_stop_xy[1][0], pid_stop_xy[1][1], pid_stop_xy[1][2]) #rospy.loginfo("任务2完成") rospy.sleep(5)''' '''goals_task(task_xy[0][0], task_xy[0][1], 0) dis_func(task_xy[0][0], task_xy[0][1], 0.05) # 等待到达目标点附近 send_None_goal() pid_stop2(pid_stop_xy[2][0], pid_stop_xy[2][1], pid_stop_xy[2][2]) rospy.sleep(4)''' rospy.loginfo("任务序列执行完成") 我完整代码是这个应该怎么修改

/* * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.scheduling.quartz; import java.io.IOException; import java.util.Map; import java.util.Properties; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; import javax.sql.DataSource; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.SchedulerFactory; import org.quartz.impl.RemoteScheduler; import org.quartz.impl.SchedulerRepository; import org.quartz.impl.StdSchedulerFactory; import org.quartz.simpl.SimpleThreadPool; import org.quartz.spi.JobFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.context.SmartLifecycle; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.lang.Nullable; import org.springframework.scheduling.SchedulingException; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; /** * {@link FactoryBean} that creates and configures a Quartz {@link org.quartz.Scheduler}, * manages its lifecycle as part of the Spring application context, and exposes the * Scheduler as bean reference for dependency injection. * * Allows registration of JobDetails, Calendars and Triggers, automatically * starting the scheduler on initialization and shutting it down on destruction. * In scenarios that just require static registration of jobs at startup, there * is no need to access the Scheduler instance itself in application code. * * For dynamic registration of jobs at runtime, use a bean reference to * this SchedulerFactoryBean to get direct access to the Quartz Scheduler * ({@code org.quartz.Scheduler}). This allows you to create new jobs * and triggers, and also to control and monitor the entire Scheduler. * * Note that Quartz instantiates a new Job for each execution, in * contrast to Timer which uses a TimerTask instance that is shared * between repeated executions. Just JobDetail descriptors are shared. * * When using persistent jobs, it is strongly recommended to perform all * operations on the Scheduler within Spring-managed (or plain JTA) transactions. * Else, database locking will not properly work and might even break. * (See {@link #setDataSource setDataSource} javadoc for details.) * * The preferred way to achieve transactional execution is to demarcate * declarative transactions at the business facade level, which will * automatically apply to Scheduler operations performed within those scopes. * Alternatively, you may add transactional advice for the Scheduler itself. * * Compatible with Quartz 2.1.4 and higher, as of Spring 4.1. * * @author Juergen Hoeller * @since 18.02.2004 * @see #setDataSource * @see org.quartz.Scheduler * @see org.quartz.SchedulerFactory * @see org.quartz.impl.StdSchedulerFactory * @see org.springframework.transaction.interceptor.TransactionProxyFactoryBean */ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBean<Scheduler>, BeanNameAware, ApplicationContextAware, InitializingBean, DisposableBean, SmartLifecycle { /** * The thread count property. */ public static final String PROP_THREAD_COUNT = "org.quartz.threadPool.threadCount"; /** * The default thread count. */ public static final int DEFAULT_THREAD_COUNT = 10; private static final ThreadLocal<ResourceLoader> configTimeResourceLoaderHolder = new ThreadLocal<>(); private static final ThreadLocal<Executor> configTimeTaskExecutorHolder = new ThreadLocal<>(); private static final ThreadLocal<DataSource> configTimeDataSourceHolder = new ThreadLocal<>(); private static final ThreadLocal<DataSource> configTimeNonTransactionalDataSourceHolder = new ThreadLocal<>(); /** * Return the {@link ResourceLoader} for the currently configured Quartz Scheduler, * to be used by {@link ResourceLoaderClassLoadHelper}. * This instance will be set before initialization of the corresponding Scheduler, * and reset immediately afterwards. It is thus only available during configuration. * @see #setApplicationContext * @see ResourceLoaderClassLoadHelper */ @Nullable public static ResourceLoader getConfigTimeResourceLoader() { return configTimeResourceLoaderHolder.get(); } /** * Return the {@link Executor} for the currently configured Quartz Scheduler, * to be used by {@link LocalTaskExecutorThreadPool}. * This instance will be set before initialization of the corresponding Scheduler, * and reset immediately afterwards. It is thus only available during configuration. * @since 2.0 * @see #setTaskExecutor * @see LocalTaskExecutorThreadPool */ @Nullable public static Executor getConfigTimeTaskExecutor() { return configTimeTaskExecutorHolder.get(); } /** * Return the {@link DataSource} for the currently configured Quartz Scheduler, * to be used by {@link LocalDataSourceJobStore}. * This instance will be set before initialization of the corresponding Scheduler, * and reset immediately afterwards. It is thus only available during configuration. * @since 1.1 * @see #setDataSource * @see LocalDataSourceJobStore */ @Nullable public static DataSource getConfigTimeDataSource() { return configTimeDataSourceHolder.get(); } /** * Return the non-transactional {@link DataSource} for the currently configured * Quartz Scheduler, to be used by {@link LocalDataSourceJobStore}. * This instance will be set before initialization of the corresponding Scheduler, * and reset immediately afterwards. It is thus only available during configuration. * @since 1.1 * @see #setNonTransactionalDataSource * @see LocalDataSourceJobStore */ @Nullable public static DataSource getConfigTimeNonTransactionalDataSource() { return configTimeNonTransactionalDataSourceHolder.get(); } @Nullable private SchedulerFactory schedulerFactory; private Class<? extends SchedulerFactory> schedulerFactoryClass = StdSchedulerFactory.class; @Nullable private String schedulerName; @Nullable private Resource configLocation; @Nullable private Properties quartzProperties; @Nullable private Executor taskExecutor; @Nullable private DataSource dataSource; @Nullable private DataSource nonTransactionalDataSource; @Nullable private Map<String, ?> schedulerContextMap; @Nullable private String applicationContextSchedulerContextKey; @Nullable private JobFactory jobFactory; private boolean jobFactorySet = false; private boolean autoStartup = true; private int startupDelay = 0; private int phase = DEFAULT_PHASE; private boolean exposeSchedulerInRepository = false; private boolean waitForJobsToCompleteOnShutdown = false; @Nullable private String beanName; @Nullable private ApplicationContext applicationContext; @Nullable private Scheduler scheduler; /** * Set an external Quartz {@link SchedulerFactory} instance to use. * Default is an internal {@link StdSchedulerFactory} instance. If this method is * called, it overrides any class specified through {@link #setSchedulerFactoryClass} * as well as any settings specified through {@link #setConfigLocation}, * {@link #setQuartzProperties}, {@link #setTaskExecutor} or {@link #setDataSource}. * NOTE: With an externally provided {@code SchedulerFactory} instance, * local settings such as {@link #setConfigLocation} or {@link #setQuartzProperties} * will be ignored here in {@code SchedulerFactoryBean}, expecting the external * {@code SchedulerFactory} instance to get initialized on its own. * @since 4.3.15 * @see #setSchedulerFactoryClass */ public void setSchedulerFactory(SchedulerFactory schedulerFactory) { this.schedulerFactory = schedulerFactory; } /** * Set the Quartz {@link SchedulerFactory} implementation to use. * Default is the {@link StdSchedulerFactory} class, reading in the standard * {@code quartz.properties} from {@code quartz.jar}. For applying custom Quartz * properties, specify {@link #setConfigLocation "configLocation"} and/or * {@link #setQuartzProperties "quartzProperties"} etc on this local * {@code SchedulerFactoryBean} instance. * @see org.quartz.impl.StdSchedulerFactory * @see #setConfigLocation * @see #setQuartzProperties * @see #setTaskExecutor * @see #setDataSource */ public void setSchedulerFactoryClass(Class<? extends SchedulerFactory> schedulerFactoryClass) { this.schedulerFactoryClass = schedulerFactoryClass; } /** * Set the name of the Scheduler to create via the SchedulerFactory, as an * alternative to the {@code org.quartz.scheduler.instanceName} property. * If not specified, the name will be taken from Quartz properties * ({@code org.quartz.scheduler.instanceName}), or from the declared * {@code SchedulerFactoryBean} bean name as a fallback. * @see #setBeanName * @see StdSchedulerFactory#PROP_SCHED_INSTANCE_NAME * @see org.quartz.SchedulerFactory#getScheduler() * @see org.quartz.SchedulerFactory#getScheduler(String) */ public void setSchedulerName(String schedulerName) { this.schedulerName = schedulerName; } /** * Set the location of the Quartz properties config file, for example * as classpath resource "classpath:quartz.properties". * Note: Can be omitted when all necessary properties are specified * locally via this bean, or when relying on Quartz' default configuration. * @see #setQuartzProperties */ public void setConfigLocation(Resource configLocation) { this.configLocation = configLocation; } /** * Set Quartz properties, like "org.quartz.threadPool.class". * Can be used to override values in a Quartz properties config file, * or to specify all necessary properties locally. * @see #setConfigLocation */ public void setQuartzProperties(Properties quartzProperties) { this.quartzProperties = quartzProperties; } /** * Set a Spring-managed {@link Executor} to use as Quartz backend. * Exposed as thread pool through the Quartz SPI. * Can be used to assign a local JDK ThreadPoolExecutor or a CommonJ * WorkManager as Quartz backend, to avoid Quartz's manual thread creation. * By default, a Quartz SimpleThreadPool will be used, configured through * the corresponding Quartz properties. * @since 2.0 * @see #setQuartzProperties * @see LocalTaskExecutorThreadPool * @see org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor * @see org.springframework.scheduling.concurrent.DefaultManagedTaskExecutor */ public void setTaskExecutor(Executor taskExecutor) { this.taskExecutor = taskExecutor; } /** * Set the default {@link DataSource} to be used by the Scheduler. * Note: If this is set, the Quartz settings should not define * a job store "dataSource" to avoid meaningless double configuration. * Also, do not define a "org.quartz.jobStore.class" property at all. * (You may explicitly define Spring's {@link LocalDataSourceJobStore} * but that's the default when using this method anyway.) * A Spring-specific subclass of Quartz' JobStoreCMT will be used. * It is therefore strongly recommended to perform all operations on * the Scheduler within Spring-managed (or plain JTA) transactions. * Else, database locking will not properly work and might even break * (for example, if trying to obtain a lock on Oracle without a transaction). * Supports both transactional and non-transactional DataSource access. * With a non-XA DataSource and local Spring transactions, a single DataSource * argument is sufficient. In case of an XA DataSource and global JTA transactions, * SchedulerFactoryBean's "nonTransactionalDataSource" property should be set, * passing in a non-XA DataSource that will not participate in global transactions. * @since 1.1 * @see #setNonTransactionalDataSource * @see #setQuartzProperties * @see #setTransactionManager * @see LocalDataSourceJobStore */ public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; } /** * Set the {@link DataSource} to be used for non-transactional access. * This is only necessary if the default DataSource is an XA DataSource that will * always participate in transactions: A non-XA version of that DataSource should * be specified as "nonTransactionalDataSource" in such a scenario. * This is not relevant with a local DataSource instance and Spring transactions. * Specifying a single default DataSource as "dataSource" is sufficient there. * @since 1.1 * @see #setDataSource * @see LocalDataSourceJobStore */ public void setNonTransactionalDataSource(DataSource nonTransactionalDataSource) { this.nonTransactionalDataSource = nonTransactionalDataSource; } /** * Register objects in the Scheduler context via a given Map. * These objects will be available to any Job that runs in this Scheduler. * Note: When using persistent Jobs whose JobDetail will be kept in the * database, do not put Spring-managed beans or an ApplicationContext * reference into the JobDataMap but rather into the SchedulerContext. * @param schedulerContextAsMap a Map with String keys and any objects as * values (for example Spring-managed beans) * @see JobDetailFactoryBean#setJobDataAsMap */ public void setSchedulerContextAsMap(Map<String, ?> schedulerContextAsMap) { this.schedulerContextMap = schedulerContextAsMap; } /** * Set the key of an {@link ApplicationContext} reference to expose in the * SchedulerContext, for example "applicationContext". Default is none. * Only applicable when running in a Spring ApplicationContext. * Note: When using persistent Jobs whose JobDetail will be kept in the * database, do not put an ApplicationContext reference into the JobDataMap * but rather into the SchedulerContext. * In case of a QuartzJobBean, the reference will be applied to the Job * instance as bean property. An "applicationContext" attribute will * correspond to a "setApplicationContext" method in that scenario. * Note that BeanFactory callback interfaces like ApplicationContextAware * are not automatically applied to Quartz Job instances, because Quartz * itself is responsible for the lifecycle of its Jobs. * @see JobDetailFactoryBean#setApplicationContextJobDataKey * @see org.springframework.context.ApplicationContext */ public void setApplicationContextSchedulerContextKey(String applicationContextSchedulerContextKey) { this.applicationContextSchedulerContextKey = applicationContextSchedulerContextKey; } /** * Set the Quartz {@link JobFactory} to use for this Scheduler. * Default is Spring's {@link AdaptableJobFactory}, which supports * {@link java.lang.Runnable} objects as well as standard Quartz * {@link org.quartz.Job} instances. Note that this default only applies * to a local Scheduler, not to a RemoteScheduler (where setting * a custom JobFactory is not supported by Quartz). * Specify an instance of Spring's {@link SpringBeanJobFactory} here * (typically as an inner bean definition) to automatically populate a job's * bean properties from the specified job data map and scheduler context. * @since 2.0 * @see AdaptableJobFactory * @see SpringBeanJobFactory */ public void setJobFactory(JobFactory jobFactory) { this.jobFactory = jobFactory; this.jobFactorySet = true; } /** * Set whether to automatically start the scheduler after initialization. * Default is "true"; set this to "false" to allow for manual startup. */ public void setAutoStartup(boolean autoStartup) { this.autoStartup = autoStartup; } /** * Return whether this scheduler is configured for auto-startup. If "true", * the scheduler will start after the context is refreshed and after the * start delay, if any. */ @Override public boolean isAutoStartup() { return this.autoStartup; } /** * Specify the phase in which this scheduler should be started and stopped. * The startup order proceeds from lowest to highest, and the shutdown order * is the reverse of that. By default this value is {@code Integer.MAX_VALUE} * meaning that this scheduler starts as late as possible and stops as soon * as possible. * @since 3.0 */ public void setPhase(int phase) { this.phase = phase; } /** * Return the phase in which this scheduler will be started and stopped. */ @Override public int getPhase() { return this.phase; } /** * Set the number of seconds to wait after initialization before * starting the scheduler asynchronously. Default is 0, meaning * immediate synchronous startup on initialization of this bean. * Setting this to 10 or 20 seconds makes sense if no jobs * should be run before the entire application has started up. */ public void setStartupDelay(int startupDelay) { this.startupDelay = startupDelay; } /** * Set whether to expose the Spring-managed {@link Scheduler} instance in the * Quartz {@link SchedulerRepository}. Default is "false", since the Spring-managed * Scheduler is usually exclusively intended for access within the Spring context. * Switch this flag to "true" in order to expose the Scheduler globally. * This is not recommended unless you have an existing Spring application that * relies on this behavior. Note that such global exposure was the accidental * default in earlier Spring versions; this has been fixed as of Spring 2.5.6. */ public void setExposeSchedulerInRepository(boolean exposeSchedulerInRepository) { this.exposeSchedulerInRepository = exposeSchedulerInRepository; } /** * Set whether to wait for running jobs to complete on shutdown. * Default is "false". Switch this to "true" if you prefer * fully completed jobs at the expense of a longer shutdown phase. * @see org.quartz.Scheduler#shutdown(boolean) */ public void setWaitForJobsToCompleteOnShutdown(boolean waitForJobsToCompleteOnShutdown) { this.waitForJobsToCompleteOnShutdown = waitForJobsToCompleteOnShutdown; } @Override public void setBeanName(String name) { this.beanName = name; } @Override public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } //--------------------------------------------------------------------- // Implementation of InitializingBean interface //--------------------------------------------------------------------- @Override public void afterPropertiesSet() throws Exception { if (this.dataSource == null && this.nonTransactionalDataSource != null) { this.dataSource = this.nonTransactionalDataSource; } if (this.applicationContext != null && this.resourceLoader == null) { this.resourceLoader = this.applicationContext; } // Initialize the Scheduler instance... this.scheduler = prepareScheduler(prepareSchedulerFactory()); try { registerListeners(); registerJobsAndTriggers(); } catch (Exception ex) { try { this.scheduler.shutdown(true); } catch (Exception ex2) { logger.debug("Scheduler shutdown exception after registration failure", ex2); } throw ex; } } /** * Create a SchedulerFactory if necessary and apply locally defined Quartz properties to it. * @return the initialized SchedulerFactory */ private SchedulerFactory prepareSchedulerFactory() throws SchedulerException, IOException { SchedulerFactory schedulerFactory = this.schedulerFactory; if (schedulerFactory == null) { // Create local SchedulerFactory instance (typically a StdSchedulerFactory) schedulerFactory = BeanUtils.instantiateClass(this.schedulerFactoryClass); if (schedulerFactory instanceof StdSchedulerFactory stdSchedulerFactory) { initSchedulerFactory(stdSchedulerFactory); } else if (this.configLocation != null || this.quartzProperties != null || this.taskExecutor != null || this.dataSource != null) { throw new IllegalArgumentException( "StdSchedulerFactory required for applying Quartz properties: " + schedulerFactory); } // Otherwise, no local settings to be applied via StdSchedulerFactory.initialize(Properties) } // Otherwise, assume that externally provided factory has been initialized with appropriate settings return schedulerFactory; } /** * Initialize the given SchedulerFactory, applying locally defined Quartz properties to it. * @param schedulerFactory the SchedulerFactory to initialize */ private void initSchedulerFactory(StdSchedulerFactory schedulerFactory) throws SchedulerException, IOException { Properties mergedProps = new Properties(); if (this.resourceLoader != null) { mergedProps.setProperty(StdSchedulerFactory.PROP_SCHED_CLASS_LOAD_HELPER_CLASS, ResourceLoaderClassLoadHelper.class.getName()); } if (this.taskExecutor != null) { mergedProps.setProperty(StdSchedulerFactory.PROP_THREAD_POOL_CLASS, LocalTaskExecutorThreadPool.class.getName()); } else { // Set necessary default properties here, as Quartz will not apply // its default configuration when explicitly given properties. mergedProps.setProperty(StdSchedulerFactory.PROP_THREAD_POOL_CLASS, SimpleThreadPool.class.getName()); mergedProps.setProperty(PROP_THREAD_COUNT, Integer.toString(DEFAULT_THREAD_COUNT)); } if (this.configLocation != null) { if (logger.isDebugEnabled()) { logger.debug("Loading Quartz config from [" + this.configLocation + "]"); } PropertiesLoaderUtils.fillProperties(mergedProps, this.configLocation); } CollectionUtils.mergePropertiesIntoMap(this.quartzProperties, mergedProps); if (this.dataSource != null) { mergedProps.putIfAbsent(StdSchedulerFactory.PROP_JOB_STORE_CLASS, LocalDataSourceJobStore.class.getName()); } // Determine scheduler name across local settings and Quartz properties... if (this.schedulerName != null) { mergedProps.setProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME, this.schedulerName); } else { String nameProp = mergedProps.getProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME); if (nameProp != null) { this.schedulerName = nameProp; } else if (this.beanName != null) { mergedProps.setProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME, this.beanName); this.schedulerName = this.beanName; } } schedulerFactory.initialize(mergedProps); } private Scheduler prepareScheduler(SchedulerFactory schedulerFactory) throws SchedulerException { if (this.resourceLoader != null) { // Make given ResourceLoader available for SchedulerFactory configuration. configTimeResourceLoaderHolder.set(this.resourceLoader); } if (this.taskExecutor != null) { // Make given TaskExecutor available for SchedulerFactory configuration. configTimeTaskExecutorHolder.set(this.taskExecutor); } if (this.dataSource != null) { // Make given DataSource available for SchedulerFactory configuration. configTimeDataSourceHolder.set(this.dataSource); } if (this.nonTransactionalDataSource != null) { // Make given non-transactional DataSource available for SchedulerFactory configuration. configTimeNonTransactionalDataSourceHolder.set(this.nonTransactionalDataSource); } // Get Scheduler instance from SchedulerFactory. try { Scheduler scheduler = createScheduler(schedulerFactory, this.schedulerName); populateSchedulerContext(scheduler); if (!this.jobFactorySet && !(scheduler instanceof RemoteScheduler)) { // Use AdaptableJobFactory as default for a local Scheduler, unless when // explicitly given a null value through the "jobFactory" bean property. this.jobFactory = new AdaptableJobFactory(); } if (this.jobFactory != null) { if (this.applicationContext != null && this.jobFactory instanceof ApplicationContextAware applicationContextAware) { applicationContextAware.setApplicationContext(this.applicationContext); } if (this.jobFactory instanceof SchedulerContextAware schedulerContextAware) { schedulerContextAware.setSchedulerContext(scheduler.getContext()); } scheduler.setJobFactory(this.jobFactory); } return scheduler; } finally { if (this.resourceLoader != null) { configTimeResourceLoaderHolder.remove(); } if (this.taskExecutor != null) { configTimeTaskExecutorHolder.remove(); } if (this.dataSource != null) { configTimeDataSourceHolder.remove(); } if (this.nonTransactionalDataSource != null) { configTimeNonTransactionalDataSourceHolder.remove(); } } } /** * Create the Scheduler instance for the given factory and scheduler name. * Called by {@link #afterPropertiesSet}. * The default implementation invokes SchedulerFactory's {@code getScheduler} * method. Can be overridden for custom Scheduler creation. * @param schedulerFactory the factory to create the Scheduler with * @param schedulerName the name of the scheduler to create * @return the Scheduler instance * @throws SchedulerException if thrown by Quartz methods * @see #afterPropertiesSet * @see org.quartz.SchedulerFactory#getScheduler */ @SuppressWarnings("NullAway") protected Scheduler createScheduler(SchedulerFactory schedulerFactory, @Nullable String schedulerName) throws SchedulerException { // Override thread context ClassLoader to work around naive Quartz ClassLoadHelper loading. Thread currentThread = Thread.currentThread(); ClassLoader threadContextClassLoader = currentThread.getContextClassLoader(); boolean overrideClassLoader = (this.resourceLoader != null && this.resourceLoader.getClassLoader() != threadContextClassLoader); if (overrideClassLoader) { currentThread.setContextClassLoader(this.resourceLoader.getClassLoader()); } try { SchedulerRepository repository = SchedulerRepository.getInstance(); synchronized (repository) { Scheduler existingScheduler = (schedulerName != null ? repository.lookup(schedulerName) : null); Scheduler newScheduler = schedulerFactory.getScheduler(); if (newScheduler == existingScheduler) { throw new IllegalStateException("Active Scheduler of name '" + schedulerName + "' already registered " + "in Quartz SchedulerRepository. Cannot create a new Spring-managed Scheduler of the same name!"); } if (!this.exposeSchedulerInRepository) { // Need to remove it in this case, since Quartz shares the Scheduler instance by default! SchedulerRepository.getInstance().remove(newScheduler.getSchedulerName()); } return newScheduler; } } finally { if (overrideClassLoader) { // Reset original thread context ClassLoader. currentThread.setContextClassLoader(threadContextClassLoader); } } } /** * Expose the specified context attributes and/or the current * ApplicationContext in the Quartz SchedulerContext. */ private void populateSchedulerContext(Scheduler scheduler) throws SchedulerException { // Put specified objects into Scheduler context. if (this.schedulerContextMap != null) { scheduler.getContext().putAll(this.schedulerContextMap); } // Register ApplicationContext in Scheduler context. if (this.applicationContextSchedulerContextKey != null) { if (this.applicationContext == null) { throw new IllegalStateException( "SchedulerFactoryBean needs to be set up in an ApplicationContext " + "to be able to handle an 'applicationContextSchedulerContextKey'"); } scheduler.getContext().put(this.applicationContextSchedulerContextKey, this.applicationContext); } } /** * Start the Quartz Scheduler, respecting the "startupDelay" setting. * @param scheduler the Scheduler to start * @param startupDelay the number of seconds to wait before starting * the Scheduler asynchronously */ protected void startScheduler(final Scheduler scheduler, final int startupDelay) throws SchedulerException { if (startupDelay <= 0) { logger.info("Starting Quartz Scheduler now"); scheduler.start(); } else { if (logger.isInfoEnabled()) { logger.info("Will start Quartz Scheduler [" + scheduler.getSchedulerName() + "] in " + startupDelay + " seconds"); } // Not using the Quartz startDelayed method since we explicitly want a daemon // thread here, not keeping the JVM alive in case of all other threads ending. Thread schedulerThread = new Thread(() -> { try { TimeUnit.SECONDS.sleep(startupDelay); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); // simply proceed } if (logger.isInfoEnabled()) { logger.info("Starting Quartz Scheduler now, after delay of " + startupDelay + " seconds"); } try { scheduler.start(); } catch (SchedulerException ex) { throw new SchedulingException("Could not start Quartz Scheduler after delay", ex); } }); schedulerThread.setName("Quartz Scheduler [" + scheduler.getSchedulerName() + "]"); schedulerThread.setDaemon(true); schedulerThread.start(); } } //--------------------------------------------------------------------- // Implementation of FactoryBean interface //--------------------------------------------------------------------- @Override public Scheduler getScheduler() { Assert.state(this.scheduler != null, "No Scheduler set"); return this.scheduler; } @Override @Nullable public Scheduler getObject() { return this.scheduler; } @Override public Class<? extends Scheduler> getObjectType() { return (this.scheduler != null ? this.scheduler.getClass() : Scheduler.class); } @Override public boolean isSingleton() { return true; } //--------------------------------------------------------------------- // Implementation of SmartLifecycle interface //--------------------------------------------------------------------- @Override public void start() throws SchedulingException { if (this.scheduler != null) { try { startScheduler(this.scheduler, this.startupDelay); } catch (SchedulerException ex) { throw new SchedulingException("Could not start Quartz Scheduler", ex); } } } @Override public void stop() throws SchedulingException { if (this.scheduler != null) { try { this.scheduler.standby(); } catch (SchedulerException ex) { throw new SchedulingException("Could not stop Quartz Scheduler", ex); } } } @Override public boolean isRunning() throws SchedulingException { if (this.scheduler != null) { try { return !this.scheduler.isInStandbyMode(); } catch (SchedulerException ex) { return false; } } return false; } //--------------------------------------------------------------------- // Implementation of DisposableBean interface //--------------------------------------------------------------------- /** * Shut down the Quartz scheduler on bean factory shutdown, * stopping all scheduled jobs. */ @Override public void destroy() throws SchedulerException { if (this.scheduler != null) { logger.info("Shutting down Quartz Scheduler"); this.scheduler.shutdown(this.waitForJobsToCompleteOnShutdown); } } } 我看到的start和你的不一样

io.seata.config.exception.ConfigNotFoundException: service.vgroupMapping.default_tx_group configuration item is required at io.seata.discovery.registry.FileRegistryServiceImpl.lookup(FileRegistryServiceImpl.java:85) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.core.rpc.netty.NettyClientChannelManager.getAvailServerList(NettyClientChannelManager.java:277) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.core.rpc.netty.NettyClientChannelManager.reconnect(NettyClientChannelManager.java:213) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.core.rpc.netty.TmNettyRemotingClient.initConnection(TmNettyRemotingClient.java:288) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.core.rpc.netty.TmNettyRemotingClient.init(TmNettyRemotingClient.java:196) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.tm.TMClient.init(TMClient.java:47) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.spring.annotation.GlobalTransactionScanner.initClient(GlobalTransactionScanner.java:224) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.spring.annotation.GlobalTransactionScanner.afterPropertiesSet(GlobalTransactionScanner.java:470) ~[seata-all-2.0.0.jar!/:2.0.0] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1859) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1808) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:346) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:265) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:808) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:611) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.4.3.jar!/:3.4.3] at com.mall4j.cloud.auth.AuthApplication.main(AuthApplication.java:16) ~[!/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:102) ~[mall4cloud-auth.jar:na] at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) ~[mall4cloud-auth.jar:na] at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) ~[mall4cloud-auth.jar:na] 2025-06-06T12:31:09.447Z INFO 1 --- [mall4cloud-auth] [ main] i.s.s.a.GlobalTransactionScanner : Transaction Manager Client is initialized. applicationId[mall4cloud-auth] txServiceGroup[default_tx_group] 2025-06-06T12:31:09.459Z INFO 1 --- [mall4cloud-auth] [ main] io.seata.rm.datasource.AsyncWorker : Async Commit Buffer Limit: 10000 2025-06-06T12:31:09.460Z INFO 1 --- [mall4cloud-auth] [ main] i.s.rm.datasource.xa.ResourceManagerXA : ResourceManagerXA init ... 2025-06-06T12:31:09.470Z INFO 1 --- [mall4cloud-auth] [ main] i.s.core.rpc.netty.NettyClientBootstrap : NettyClientBootstrap has started 2025-06-06T12:31:09.471Z INFO 1 --- [mall4cloud-auth] [ main] i.s.s.a.GlobalTransactionScanner : Resource Manager is initialized. applicationId[mall4cloud-auth] txServiceGroup[default_tx_group] 2025-06-06T12:31:09.471Z INFO 1 --- [mall4cloud-auth] [ main] i.s.s.a.GlobalTransactionScanner : Global Transaction Clients are initialized. 2025-06-06T12:31:10.390Z INFO 1 --- [mall4cloud-auth] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 9101 (http) 2025-06-06T12:31:10.405Z INFO 1 --- [mall4cloud-auth] [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2025-06-06T12:31:10.406Z INFO 1 --- [mall4cloud-auth] [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.36] 2025-06-06T12:31:10.508Z INFO 1 --- [mall4cloud-auth] [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2025-06-06T12:31:10.512Z INFO 1 --- [mall4cloud-auth] [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 4034 ms 2025-06-06T12:31:10.519Z INFO 1 --- [mall4cloud-auth] [ main] c.m.c.c.s.a.DefaultAuthConfigAdapter : not implement other AuthConfigAdapter, use DefaultAuthConfigAdapter... all url need auth... 2025-06-06T12:31:10.847Z INFO 1 --- [mall4cloud-auth] [ main] o.s.c.openfeign.FeignClientFactoryBean : For 'mall4cloud-auth' URL not provided. Will try picking an instance via load-balancing. 2025-06-06T12:31:10.947Z INFO 1 --- [mall4cloud-auth] [ main] o.s.c.openfeign.FeignClientFactoryBean : For 'mall4cloud-rbac' URL not provided. Will try picking an instance via load-balancing. 2025-06-06T12:31:11.515Z INFO 1 --- [mall4cloud-auth] [ main] c.a.c.s.impl.CaptchaServiceFactory : supported-captchaCache-service:[local, redis] 2025-06-06T12:31:11.520Z INFO 1 --- [mall4cloud-auth] [ main] c.a.c.s.impl.CaptchaServiceFactory : supported-captchaTypes-service:[clickWord, default, blockPuzzle] 2025-06-06T12:31:11.558Z INFO 1 --- [mall4cloud-auth] [ main] com.anji.captcha.util.ImageUtils : 初始化底图:[SLIDING_BLOCK=[Ljava.lang.String;@5d414943, ORIGINAL=[Ljava.lang.String;@5481001f, PIC_CLICK=[Ljava.lang.String;@5581e273] 2025-06-06T12:31:11.559Z INFO 1 --- [mall4cloud-auth] [ main] c.a.c.s.i.BlockPuzzleCaptchaServiceImpl : --->>>初始化验证码底图<<<---blockPuzzle 2025-06-06T12:31:11.643Z ERROR 1 --- [mall4cloud-auth] [ main] c.a.c.s.i.BlockPuzzleCaptchaServiceImpl : load font error:{} java.io.IOException: Problem reading font data. at java.desktop/java.awt.Font.createFont0(Font.java:1206) ~[na:na] at java.desktop/java.awt.Font.createFont(Font.java:1075) ~[na:na] at com.anji.captcha.service.impl.AbstractCaptchaService.loadWaterMarkFont(AbstractCaptchaService.java:199) ~[captcha-1.3.0.jar!/:na] at com.anji.captcha.service.impl.AbstractCaptchaService.init(AbstractCaptchaService.java:89) ~[captcha-1.3.0.jar!/:na] at com.anji.captcha.service.impl.BlockPuzzleCaptchaServiceImpl.init(BlockPuzzleCaptchaServiceImpl.java:34) ~[captcha-1.3.0.jar!/:na] at com.anji.captcha.service.impl.CaptchaServiceFactory.getInstance(CaptchaServiceFactory.java:36) ~[captcha-1.3.0.jar!/:na] at com.mall4j.cloud.auth.config.CaptchaConfig.captchaService(CaptchaConfig.java:28) ~[!/:na] at com.mall4j.cloud.auth.config.CaptchaConfig$$SpringCGLIB$$0.CGLIB$captchaService$0(<generated>) ~[!/:na] at com.mall4j.cloud.auth.config.CaptchaConfig$$SpringCGLIB$$FastClass$$1.invoke(<generated>) ~[!/:na] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258) ~[spring-core-6.2.3.jar!/:6.2.3] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:372) ~[spring-context-6.2.3.jar!/:6.2.3] at com.mall4j.cloud.auth.config.CaptchaConfig$$SpringCGLIB$$0.captchaService(<generated>) ~[!/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:171) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiateWithFactoryMethod(SimpleInstantiationStrategy.java:88) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:168) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:489) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1361) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:346) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1606) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1552) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:240) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1381) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1218) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:346) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1155) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1121) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1056) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.4.3.jar!/:3.4.3] at com.mall4j.cloud.auth.AuthApplication.main(AuthApplication.java:16) ~[!/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:102) ~[mall4cloud-auth.jar:na] at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) ~[mall4cloud-auth.jar:na] at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) ~[mall4cloud-auth.jar:na] 2025-06-06T12:31:11.704Z INFO 1 --- [mall4cloud-auth] [ main] o.s.c.openfeign.FeignClientFactoryBean : For 'mall4cloud-leaf' URL not provided. Will try picking an instance via load-balancing. 2025-06-06T12:31:11.813Z INFO 1 --- [mall4cloud-auth] [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2025-06-06T12:31:12.068Z INFO 1 --- [mall4cloud-auth] [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@3fe70a2d 2025-06-06T12:31:12.071Z INFO 1 --- [mall4cloud-auth] [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2025-06-06T12:31:12.158Z ERROR 1 --- [mall4cloud-auth] [ main] i.s.c.r.netty.NettyClientChannelManager : Failed to get available servers: service.vgroupMapping.default_tx_group configuration item is required io.seata.config.exception.ConfigNotFoundException: service.vgroupMapping.default_tx_group configuration item is required at io.seata.discovery.registry.FileRegistryServiceImpl.lookup(FileRegistryServiceImpl.java:85) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.core.rpc.netty.NettyClientChannelManager.getAvailServerList(NettyClientChannelManager.java:277) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.core.rpc.netty.NettyClientChannelManager.reconnect(NettyClientChannelManager.java:213) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.core.rpc.netty.RmNettyRemotingClient.registerResource(RmNettyRemotingClient.java:219) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.rm.AbstractResourceManager.registerResource(AbstractResourceManager.java:128) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.rm.datasource.DataSourceManager.registerResource(DataSourceManager.java:90) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.rm.DefaultResourceManager.registerResource(DefaultResourceManager.java:114) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.rm.datasource.DataSourceProxy.init(DataSourceProxy.java:112) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.rm.datasource.DataSourceProxy.<init>(DataSourceProxy.java:90) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.rm.datasource.DataSourceProxy.<init>(DataSourceProxy.java:75) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.spring.annotation.datasource.SeataAutoDataSourceProxyCreator.buildProxy(SeataAutoDataSourceProxyCreator.java:115) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.spring.annotation.datasource.SeataAutoDataSourceProxyCreator.wrapIfNecessary(SeataAutoDataSourceProxyCreator.java:89) ~[seata-all-2.0.0.jar!/:2.0.0] at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:319) ~[spring-aop-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:439) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1815) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:346) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1606) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1552) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:546) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1361) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:346) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1664) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1552) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1527) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1436) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:346) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:462) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:606) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:577) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:739) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:272) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:369) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1445) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:346) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1664) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1552) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:785) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:768) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:509) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1445) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:346) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1155) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1121) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1056) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.4.3.jar!/:3.4.3] at com.mall4j.cloud.auth.AuthApplication.main(AuthApplication.java:16) ~[!/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:102) ~[mall4cloud-auth.jar:na] at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) ~[mall4cloud-auth.jar:na] at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) ~[mall4cloud-auth.jar:na] 2025-06-06T12:31:12.163Z INFO 1 --- [mall4cloud-auth] [ main] .s.s.a.d.SeataAutoDataSourceProxyCreator : Auto proxy data source 'dataSource' by 'AT' mode. 2025-06-06T12:31:15.127Z INFO 1 --- [mall4cloud-auth] [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint beneath base path '/actuator' 2025-06-06T12:31:15.375Z INFO 1 --- [mall4cloud-auth] [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel 2025-06-06T12:31:15.376Z INFO 1 --- [mall4cloud-auth] [ main] o.s.i.channel.PublishSubscribeChannel : Channel 'mall4cloud-auth-1.errorChannel' has 1 subscriber(s). 2025-06-06T12:31:15.377Z INFO 1 --- [mall4cloud-auth] [ main] o.s.i.endpoint.EventDrivenConsumer : started bean '_org.springframework.integration.errorLogger' 2025-06-06T12:31:15.398Z INFO 1 --- [mall4cloud-auth] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 9101 (http) with context path '/' 2025-06-06T12:31:15.403Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : initializer namespace from ans.namespace attribute : null 2025-06-06T12:31:15.404Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : initializer namespace from ALIBABA_ALIWARE_NAMESPACE attribute :null 2025-06-06T12:31:15.404Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : initializer namespace from namespace attribute :null 2025-06-06T12:31:15.409Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : FailoverDataSource type is class com.alibaba.nacos.client.naming.backups.datasource.DiskFailoverDataSource 2025-06-06T12:31:15.413Z INFO 1 --- [mall4cloud-auth] [ main] c.a.n.p.a.s.c.ClientAuthPluginManager : [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl success. 2025-06-06T12:31:15.413Z INFO 1 --- [mall4cloud-auth] [ main] c.a.n.p.a.s.c.ClientAuthPluginManager : [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.ram.RamClientAuthServiceImpl success. 2025-06-06T12:31:15.488Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : [RpcClientFactory] create a new rpc client of 421c6e7f-fe14-4903-9588-03e8f3d957c1 2025-06-06T12:31:15.490Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : Create naming rpc client for uuid->421c6e7f-fe14-4903-9588-03e8f3d957c1 2025-06-06T12:31:15.490Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : [421c6e7f-fe14-4903-9588-03e8f3d957c1] RpcClient init, ServerListFactory = com.alibaba.nacos.client.naming.core.ServerListManager 2025-06-06T12:31:15.490Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : [421c6e7f-fe14-4903-9588-03e8f3d957c1] Registry connection listener to current client:com.alibaba.nacos.client.naming.remote.gprc.redo.NamingGrpcRedoService 2025-06-06T12:31:15.491Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : [421c6e7f-fe14-4903-9588-03e8f3d957c1] Register server push request handler:com.alibaba.nacos.client.naming.remote.gprc.NamingPushRequestHandler 2025-06-06T12:31:15.492Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : [421c6e7f-fe14-4903-9588-03e8f3d957c1] Try to connect to server on start up, server: {serverIp = 'nacos-svc.car', server main port = 8848} 2025-06-06T12:31:15.492Z INFO 1 --- [mall4cloud-auth] [ main] c.a.n.c.remote.client.grpc.GrpcClient : grpc client connection server:nacos-svc.car ip,serverPort:9848,grpcTslConfig:{"sslProvider":"","enableTls":false,"mutualAuthEnable":false,"trustAll":false} 2025-06-06T12:31:15.502Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : [421c6e7f-fe14-4903-9588-03e8f3d957c1] Success to connect to server [nacos-svc.car:8848] on start up, connectionId = 1749213075496_10.244.2.147_51108 2025-06-06T12:31:15.502Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : [421c6e7f-fe14-4903-9588-03e8f3d957c1] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler 2025-06-06T12:31:15.502Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : [421c6e7f-fe14-4903-9588-03e8f3d957c1] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda$334/0x0000000800f747a0 2025-06-06T12:31:15.502Z INFO 1 --- [mall4cloud-auth] [remote.worker.0] com.alibaba.nacos.common.remote.client : [421c6e7f-fe14-4903-9588-03e8f3d957c1] Notify connected event to listeners. 2025-06-06T12:31:15.503Z INFO 1 --- [mall4cloud-auth] [remote.worker.0] com.alibaba.nacos.client.naming : Grpc connection connect 2025-06-06T12:31:15.503Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : [REGISTER-SERVICE] public registering service mall4cloud-auth with instance Instance{instanceId='null', ip='10.244.2.147', port=9101, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='', serviceName='null', metadata={IPv6=null, preserved.register.source=SPRING_CLOUD}} 2025-06-06T12:31:15.513Z INFO 1 --- [mall4cloud-auth] [ main] c.a.c.n.registry.NacosServiceRegistry : nacos registry, DEFAULT_GROUP mall4cloud-auth 10.244.2.147:9101 register finished 2025-06-06T12:31:15.525Z WARN 1 --- [mall4cloud-auth] [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.feignInsideAuthConfig': Injection of autowired dependencies failed 2025-06-06T12:31:15.526Z INFO 1 --- [mall4cloud-auth] [ main] o.s.i.endpoint.EventDrivenConsumer : Removing {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel 2025-06-06T12:31:15.526Z INFO 1 --- [mall4cloud-auth] [ main] o.s.i.channel.PublishSubscribeChannel : Channel 'mall4cloud-auth-1.errorChannel' has 0 subscriber(s). 2025-06-06T12:31:15.526Z INFO 1 --- [mall4cloud-auth] [ main] o.s.i.endpoint.EventDrivenConsumer : stopped bean '_org.springframework.integration.errorLogger' 2025-06-06T12:31:15.540Z INFO 1 --- [mall4cloud-auth] [ main] c.a.c.n.registry.NacosServiceRegistry : De-registering from Nacos Server now... 2025-06-06T12:31:15.540Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : [DEREGISTER-SERVICE] public deregistering service mall4cloud-auth with instance: Instance{instanceId='null', ip='10.244.2.147', port=9101, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='', serviceName='null', metadata={}} 2025-06-06T12:31:15.545Z INFO 1 --- [mall4cloud-auth] [ main] c.a.c.n.registry.NacosServiceRegistry : De-registration finished. 2025-06-06T12:31:15.546Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.cache.ServiceInfoHolder do shutdown begin 2025-06-06T12:31:15.547Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.backups.FailoverReactor do shutdown begin 2025-06-06T12:31:15.547Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.backups.FailoverReactor do shutdown stop 2025-06-06T12:31:15.547Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.cache.ServiceInfoHolder do shutdown stop 2025-06-06T12:31:15.547Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate do shutdown begin 2025-06-06T12:31:15.547Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.core.ServiceInfoUpdateService do shutdown begin 2025-06-06T12:31:15.547Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.core.ServiceInfoUpdateService do shutdown stop 2025-06-06T12:31:15.547Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.core.ServerListManager do shutdown begin 2025-06-06T12:31:15.548Z WARN 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : [NamingHttpClientManager] Start destroying NacosRestTemplate 2025-06-06T12:31:15.548Z WARN 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : [NamingHttpClientManager] Destruction of the end 2025-06-06T12:31:15.548Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.core.ServerListManager do shutdown stop 2025-06-06T12:31:15.548Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.remote.http.NamingHttpClientProxy do shutdown begin 2025-06-06T12:31:15.548Z WARN 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : [NamingHttpClientManager] Start destroying NacosRestTemplate 2025-06-06T12:31:15.548Z WARN 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : [NamingHttpClientManager] Destruction of the end 2025-06-06T12:31:15.548Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.remote.http.NamingHttpClientProxy do shutdown stop 2025-06-06T12:31:15.548Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : Shutdown naming grpc client proxy for uuid->421c6e7f-fe14-4903-9588-03e8f3d957c1 2025-06-06T12:31:15.548Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : Shutdown grpc redo service executor java.util.concurrent.ScheduledThreadPoolExecutor@78171169[Running, pool size = 1, active threads = 0, queued tasks = 1, completed tasks = 0] 2025-06-06T12:31:15.549Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : Shutdown rpc client, set status to shutdown 2025-06-06T12:31:15.549Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : Shutdown client event executor java.util.concurrent.ScheduledThreadPoolExecutor@1c388703[Running, pool size = 2, active threads = 2, queued tasks = 0, completed tasks = 0] 2025-06-06T12:31:15.551Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.common.remote.client : Close current connection 1749213075496_10.244.2.147_51108 2025-06-06T12:31:15.553Z INFO 1 --- [mall4cloud-auth] [nacos-svc.car-1] c.a.n.c.remote.client.grpc.GrpcClient : [1749213075496_10.244.2.147_51108]Ignore complete event,isRunning:false,isAbandon=false 2025-06-06T12:31:15.557Z INFO 1 --- [mall4cloud-auth] [ main] c.a.n.c.remote.client.grpc.GrpcClient : Shutdown grpc executor java.util.concurrent.ThreadPoolExecutor@977a4ce[Running, pool size = 2, active threads = 0, queued tasks = 0, completed tasks = 10] 2025-06-06T12:31:15.558Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : shutdown and remove naming rpc client for uuid ->421c6e7f-fe14-4903-9588-03e8f3d957c1 2025-06-06T12:31:15.558Z INFO 1 --- [mall4cloud-auth] [ main] c.a.n.c.a.r.identify.CredentialWatcher : [null] CredentialWatcher is stopped 2025-06-06T12:31:15.558Z INFO 1 --- [mall4cloud-auth] [ main] c.a.n.c.a.r.identify.CredentialService : [null] CredentialService is freed 2025-06-06T12:31:15.559Z INFO 1 --- [mall4cloud-auth] [ main] com.alibaba.nacos.client.naming : com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate do shutdown stop 2025-06-06T12:31:15.585Z INFO 1 --- [mall4cloud-auth] [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2025-06-06T12:31:15.599Z INFO 1 --- [mall4cloud-auth] [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. 2025-06-06T12:31:15.609Z INFO 1 --- [mall4cloud-auth] [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2025-06-06T12:31:15.721Z INFO 1 --- [mall4cloud-auth] [ main] .s.b.a.l.ConditionEvaluationReportLogger : Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2025-06-06T12:31:15.754Z ERROR 1 --- [mall4cloud-auth] [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.feignInsideAuthConfig': Injection of autowired dependencies failed at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:515) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1445) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:378) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:375) ~[spring-cloud-context-4.2.0.jar!/:4.2.0] at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:179) ~[spring-cloud-context-4.2.0.jar!/:4.2.0] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:375) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1272) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.cloud.context.scope.refresh.RefreshScope.eagerlyInitialize(RefreshScope.java:126) ~[spring-cloud-context-4.2.0.jar!/:4.2.0] at org.springframework.cloud.context.scope.refresh.RefreshScope.start(RefreshScope.java:118) ~[spring-cloud-context-4.2.0.jar!/:4.2.0] at org.springframework.cloud.context.scope.refresh.RefreshScope.onApplicationEvent(RefreshScope.java:113) ~[spring-cloud-context-4.2.0.jar!/:4.2.0] at org.springframework.cloud.context.scope.refresh.RefreshScope.onApplicationEvent(RefreshScope.java:68) ~[spring-cloud-context-4.2.0.jar!/:4.2.0] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:454) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:387) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:1009) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:630) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.4.3.jar!/:3.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.4.3.jar!/:3.4.3] at com.mall4j.cloud.auth.AuthApplication.main(AuthApplication.java:16) ~[!/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:102) ~[mall4cloud-auth.jar:na] at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) ~[mall4cloud-auth.jar:na] at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) ~[mall4cloud-auth.jar:na] Caused by: org.springframework.util.PlaceholderResolutionException: Could not resolve placeholder 'feign.inside.secret' in value "${feign.inside.secret}" at org.springframework.util.PlaceholderResolutionException.withValue(PlaceholderResolutionException.java:81) ~[spring-core-6.2.3.jar!/:6.2.3] at org.springframework.util.PlaceholderParser$ParsedValue.resolve(PlaceholderParser.java:423) ~[spring-core-6.2.3.jar!/:6.2.3] at org.springframework.util.PlaceholderParser.replacePlaceholders(PlaceholderParser.java:128) ~[spring-core-6.2.3.jar!/:6.2.3] at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:118) ~[spring-core-6.2.3.jar!/:6.2.3] at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:114) ~[spring-core-6.2.3.jar!/:6.2.3] at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:255) ~[spring-core-6.2.3.jar!/:6.2.3] at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:226) ~[spring-core-6.2.3.jar!/:6.2.3] at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.lambda$processProperties$0(PropertySourcesPlaceholderConfigurer.java:201) ~[spring-context-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:971) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1574) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1552) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:785) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:768) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) ~[spring-beans-6.2.3.jar!/:6.2.3] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:509) ~[spring-beans-6.2.3.jar!/:6.2.3] ... 34 common frames omitted 2025-06-06T12:31:16.585Z WARN 1 --- [mall4cloud-auth] [ Thread-3] c.a.nacos.common.notify.NotifyCenter : [NotifyCenter] Start destroying Publisher 2025-06-06T12:31:16.586Z WARN 1 --- [mall4cloud-auth] [ Thread-3] c.a.nacos.common.notify.NotifyCenter : [NotifyCenter] Destruction of the end 2025-06-06T12:31:16.586Z WARN 1 --- [mall4cloud-auth] [ Thread-1] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Start destroying common HttpClient

#include <rclcpp/rclcpp.hpp> #include <geometry_msgs/msg/twist_stamped.hpp> #include <mavros_msgs/srv/command_bool.hpp> #include <mavros_msgs/srv/set_mode.hpp> #include #include <tf2/LinearMath/Quaternion.h> #include <tf2/LinearMath/Matrix3x3.h> #include <chrono> using namespace std::chrono_literals; class OffboardController : public rclcpp::Node { public: OffboardController() : Node("offboard_controller"), current_state(State::INIT) { // 创建发布者和客户端 cmd_vel_pub = this->create_publisher<geometry_msgs::msg::TwistStamped>("/mavros/setpoint_velocity/cmd_vel", 10); odom_sub = this->create_subscription( "/mavros/odometry/in", 10, std::bind(&OffboardController::odom_cb, this, std::placeholders::_1)); arming_client = this->create_client<mavros_msgs::srv::CommandBool>("/mavros/cmd/arming"); set_mode_client = this->create_client<mavros_msgs::srv::SetMode>("/mavros/set_mode"); // 主控制定时器 (20Hz) timer = this->create_wall_timer(50ms, std::bind(&OffboardController::control_loop, this)); } private: // 飞行状态枚举 enum class State { INIT, // 初始化 ARMING, // 解锁 TAKEOFF, // 起飞 HOVER_PRE, // 起飞后悬停 FORWARD, // 向前飞行 TURNING, // 转向 HEADING_FLIGHT, // 机头方向飞行 HOVER_POST, // 飞行后悬停 LANDING, // 降落 DISARM // 上锁 }; // 状态变量 State current_state; rclcpp::Time state_start_time; double start_yaw = 0.0; double current_x = 0.0, current_y = 0.0, current_z = 0.0, current_yaw = 0.0; bool odom_received = false; // ROS 接口 rclcpp::Publisher<geometry_msgs::msg::TwistStamped>::SharedPtr cmd_vel_pub; rclcpp::Subscription::SharedPtr odom_sub; rclcpp::Client<mavros_msgs::srv::CommandBool>::SharedPtr arming_client; rclcpp::Client<mavros_msgs::srv::SetMode>::SharedPtr set_mode_client; rclcpp::TimerBase::SharedPtr timer; // 位置和姿态回调 void odom_cb(const nav_msgs::msg::Odometry::SharedPtr msg) { current_x = msg->pose.pose.position.x; current_y = msg->pose.pose.position.y; current_z = msg->pose.pose.position.z; // 从四元数提取偏航角 tf2::Quaternion q( msg->pose.pose.orientation.x, msg->pose.pose.orientation.y, msg->pose.pose.orientation.z, msg->pose.pose.orientation.w); tf2::Matrix3x3 m(q); double roll, pitch; m.getRPY(roll, pitch, current_yaw); odom_received = true; } // 主控制循环 void control_loop() { if (!odom_received) { RCLCPP_INFO(this->get_logger(), "等待位置信息..."); return; } auto twist_msg = geometry_msgs::msg::TwistStamped(); twist_msg.header.stamp = this->now(); twist_msg.header.frame_id = "map"; // 使用地图坐标系 switch (current_state) { case State::INIT: RCLCPP_INFO(this->get_logger(), "初始化..."); send_velocity(0, 0, 0.5, 0); // 持续发送设定点 if (set_flight_mode("OFFBOARD")) { transition_to(State::ARMING); } break; case State::ARMING: RCLCPP_INFO(this->get_logger(), "解锁中..."); if (arm_drone(true)) { transition_to(State::TAKEOFF); } break; case State::TAKEOFF: RCLCPP_INFO(this->get_logger(), "起飞中..."); send_velocity(0, 0, 0.5, 0); // 以0.5m/s上升 if (current_z > 2.5) { // 达到目标高度 start_yaw = current_yaw; // 记录初始偏航角 transition_to(State::HOVER_PRE); } break; case State::HOVER_PRE: RCLCPP_INFO(this->get_logger(), "悬停中(3秒)..."); send_velocity(0, 0, 0, 0); if ((this->now() - state_start_time) > 3s) { transition_to(State::FORWARD); } break; case State::FORWARD: RCLCPP_INFO(this->get_logger(), "向前飞行..."); send_velocity(5, 0, 0, 0); // 5m/s向前 if (current_x > 10.0) { // 飞行10米 transition_to(State::TURNING); } break; case State::TURNING: RCLCPP_INFO(this->get_logger(), "右转30度..."); send_velocity(0, 0, 0, 0.5); // 0.5rad/s右转 if (fabs(current_yaw - start_yaw) > 0.5236) { // 30度≈0.5236弧度 transition_to(State::HEADING_FLIGHT); } break; case State::HEADING_FLIGHT: RCLCPP_INFO(this->get_logger(), "机头方向飞行..."); send_velocity(5, 0, 0, 0); // 5m/s沿新方向 if (current_x > 16.0) { // 飞行6米 transition_to(State::HOVER_POST); } break; case State::HOVER_POST: RCLCPP_INFO(this->get_logger(), "悬停中(4秒)..."); send_velocity(0, 0, 0, 0); if ((this->now() - state_start_time) > 4s) { transition_to(State::LANDING); } break; case State::LANDING: RCLCPP_INFO(this->get_logger(), "降落地中..."); send_velocity(0, 0, -0.5, 0); // 0.5m/s下降 if (current_z < 0.3) { // 接近地面 transition_to(State::DISARM); } break; case State::DISARM: RCLCPP_INFO(this->get_logger(), "上锁中..."); send_velocity(0, 0, 0, 0); arm_drone(false); // 上锁 rclcpp::shutdown(); break; } } // 状态转换函数 void transition_to(State new_state) { RCLCPP_INFO(this->get_logger(), "状态转换: %d -> %d", static_cast<int>(current_state), static_cast<int>(new_state)); current_state = new_state; state_start_time = this->now(); } // 发送速度指令 void send_velocity(double vx, double vy, double vz, double yaw_rate) { auto twist_msg = geometry_msgs::msg::TwistStamped(); twist_msg.header.stamp = this->now(); twist_msg.header.frame_id = "map"; twist_msg.twist.linear.x = vx; twist_msg.twist.linear.y = vy; twist_msg.twist.linear.z = vz; twist_msg.twist.angular.z = yaw_rate; cmd_vel_pub->publish(twist_msg); } // 设置飞行模式 bool set_flight_mode(const std::string& mode) { auto request = std::make_shared<mavros_msgs::srv::SetMode::Request>(); request->custom_mode = mode; while (!set_mode_client->wait_for_service(1s)) { if (!rclcpp::ok()) return false; RCLCPP_WARN(this->get_logger(), "等待set_mode服务..."); } auto result = set_mode_client->async_send_request(request); if (rclcpp::spin_until_future_complete(this->get_node_base_interface(), result) == rclcpp::FutureReturnCode::SUCCESS) { return result.get()->mode_sent; } return false; } // 解锁/上锁无人机 bool arm_drone(bool arm) { auto request = std::make_shared<mavros_msgs::srv::CommandBool::Request>(); request->value = arm; while (!arming_client->wait_for_service(1s)) { if (!rclcpp::ok()) return false; RCLCPP_WARN(this->get_logger(), "等待arming服务..."); } auto result = arming_client->async_send_request(request); if (rclcpp::spin_until_future_complete(this->get_node_base_interface(), result) == rclcpp::FutureReturnCode::SUCCESS) { return result.get()->success; } return false; } }; int main(int argc, char** argv) { rclcpp::init(argc, argv); auto node = std::make_shared<OffboardController>(); rclcpp::spin(node); rclcpp::shutdown(); return 0; } 将上面的代码改成ROS1代码

2025-08-09 04:57:47,757 [main/] INFO [traceId ] o.s.o.j.LocalContainerEntityManagerFactoryBean[447] - Initialized JPA EntityManagerFactory for persistence unit 'firstPersistenceUnit' 2025-08-09 04:57:48,458 [main/] INFO [traceId ] o.s.d.j.r.q.QueryEnhancerFactory[126] - JSqlParser is in classpath; If applicable, JSqlParser will be used. 2025-08-09 04:57:48,458 [main/] INFO [traceId ] o.s.d.j.r.q.QueryEnhancerFactory[49] - Hibernate is in classpath; If applicable, HQL parser will be used. 2025-08-09 04:57:51,428 [main/] WARN [traceId ] o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration[241] - spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2025-08-09 04:57:54,541 [main/] INFO [traceId ] o.s.b.a.e.w.EndpointLinksResolver[60] - Exposing 1 endpoint beneath base path '/actuator' 2025-08-09 04:57:54,677 [main/] INFO [traceId ] o.a.c.h.Http11NioProtocol[173] - Starting ProtocolHandler ["https-jsse-nio-8888"] 2025-08-09 04:57:54,808 [main/] INFO [traceId ] o.a.t.u.n.N.certificate[173] - Connector [https-jsse-nio-8888], TLS virtual host [_default_], certificate type [UNDEFINED] configured from key store [/home/g.ratan.001/.keystore] using alias [uklvapapp290p.gdc.standardchartered.com] with trust store [null] 2025-08-09 04:57:54,834 [main/] INFO [traceId ] o.s.b.w.e.t.TomcatWebServer[243] - Tomcat started on port 8888 (https) with context path '/' 2025-08-09 04:57:54,869 [main/] INFO [traceId ] c.s.r.e.Application[59] - Started Application in 18.879 seconds (process running for 21.277) 2025-08-09 04:57:54,883 [main/] INFO [traceId ] o.s.b.a.b.JobLauncherApplicationRunner[168] - Running default command line with: [] 2025-08-09 04:57:56,443 [scheduling-1/] WARN [traceId ] o.a.h.u.NativeCodeLoader[60] - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 2025-08-09 04:57:56,560 [scheduling-1/] INFO [traceId ] o.a.h.s.UserGroupInformation[1132] - Login successful for user [email protected] using keytab file g.ratan.001.keytab. Keytab auto renewal enabled : false 2025-08-09 04:57:56,561 [scheduling-1/] INFO [traceId ] c.s.r.e.c.HiveDruidConfig[73] - Login Kerberos Job Success. 2025-08-09 04:57:58,349 [https-jsse-nio-8888-exec-3/] INFO [traceId ] o.a.c.c.C.[.[.[/][173] - Initializing Spring DispatcherServlet 'dispatcherServlet' 2025-08-09 04:57:58,350 [https-jsse-nio-8888-exec-3/] INFO [traceId ] o.s.w.s.DispatcherServlet[532] - Initializing Servlet 'dispatcherServlet' 2025-08-09 04:57:58,352 [https-jsse-nio-8888-exec-3/] INFO [traceId ] o.s.w.s.DispatcherServlet[554] - Completed initialization in 2 ms 2025-08-09 04:58:59,985 [SpringApplicationShutdownHook/] INFO [traceId ] o.s.b.w.e.t.GracefulShutdown[54] - Commencing graceful shutdown. Waiting for active requests to complete 2025-08-09 04:58:59,990 [tomcat-shutdown/] INFO [traceId ] o.s.b.w.e.t.GracefulShutdown[76] - Graceful shutdown complete 2025-08-09 04:59:00,009 [SpringApplicationShutdownHook/] INFO [traceId ] c.a.d.p.DruidDataSource[2174] - {dataSource-0} closing ... 2025-08-09 04:59:00,011 [SpringApplicationShutdownHook/] INFO [traceId ] o.s.o.j.LocalContainerEntityManagerFactoryBean[660] - Closing JPA EntityManagerFactory for persistence unit 'firstPer sistenceUnit' 2025-08-09 04:59:00,015 [SpringApplicationShutdownHook/] INFO [traceId ] c.z.h.HikariDataSource[349] - PostgreSQLConnectHikariCP - Shutdown initiated... 2025-08-09 04:59:00,051 [SpringApplicationShutdownHook/] INFO [traceId ] c.z.h.HikariDataSource[351] - PostgreSQLConnectHikariCP - Shutdown completed. 分析为什么程序会关闭

Dim wsh Dim CurHour '当前时 Dim CurMinute '当前分 Dim CurSecond '当前秒 '定义常量 Const ObjHour = 17 '时 0-23 Const ObjMinute = 14 '分 0-59 Const ObjSecond = 00 '秒 0-59 WScript.Sleep 20000 ' 延时 20 秒 set wshshell=CreateObject("wscript.shell") ' 创建并设置运行界面窗口 Set objWnd = wshshell.Exec("mshta.exe ""about:<title>running</title><body bgcolor=white>
RunningAutomatically press the TAB key every 3 minutes.
Please Close window to stop running
<script>window.resizeTo(800,400);window.moveTo((screen.width-800)/2,(screen.height-400)/2);</script>""") set wshshell=CreateObject("wscript.shell") browserPath = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" ' 浏览器的绝对路径 url1 = "http://192.168.10.81/decision/view/form?viewlet=%25E5%2588%25B6%25E9%2580%25A02%25E9%2583%25A8%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%25E4%25BA%25BA%25E5%2591%2598%25E7%25AE%25A1%25E7%2590%2586%25E6%259D%25BF%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%25E4%25BA%25BA%25E5%2591%2598%25E7%25AE%25A1%25E7%2590%2586%25E6%259D%25BF.frm&ref_t=design&ref_c=aa9c72db-5215-48d4-b36f-a5841c32c7c6" ' 生产日报页面 url2 = "http://192.168.154.11:4000/gridWebAndon/revoAssembly_Allparts" ' #12总装安东页面 url3 = "http://192.168.154.11:5000/gridWebAndon/revoAllparts" ' #12加工安东页面 wshshell.Run Chr(34) & browserPath & Chr(34)& " " & Chr(34)& url1 & Chr(34) wshshell.Run Chr(34) & browserPath & Chr(34)& " " & Chr(34)& url2 & Chr(34) wshshell.Run Chr(34) & browserPath & Chr(34)& " " & Chr(34)& url3 & Chr(34) WScript.Sleep 10000 ' 延时 10 秒 i = 5 do while(i>0) windowTitle = wshShell.AppActivate("Microsoft Edge") wScript.Sleep 200 wshShell.SendKeys "% " i = i-1 loop 'MsgBox windowTitle WScript.Sleep 100 ' 延时 0.1 秒 wshShell.SendKeys "{esc}" WScript.Sleep 100 ' 延时 0.1 秒 wshshell.SendKeys "{F11}" WScript.Sleep 5000 ' 延时 5 秒 wshshell.SendKeys "{F5}" ' 当窗口关闭时退出循环 do While (objWnd.Status = 0) CurHour = Hour(Now) CurMinute = Minute(Now) CurSecond = Second(Now) WScript.Sleep 60000 ' 切换延时60秒 if CurHour = ObjHour and CurMinute >= ObjMinute then CreateObject("Wscript.Shell").run "cmd.exe /c shutdown -s -f" end if wshshell.SendKeys "^{TAB}" Loop ' 退出脚本 WScript.Quit 删除关机代码

请帮我分析并解决这个错误: .ConsumerCoordinator : [Consumer clientId=consumer-dangerball-3, groupId=dangerball] Successfully joined group with generation Generation{generationId=3, memberId='consumer-dangerball-3-f10230bd-6cb2-4f81-ad18-e66470f27018', protocol='range'} 2025-07-31T20:51:25.364+08:00 ERROR 93468 --- [sportsbook-transaction] [-StreamThread-1] org.apache.kafka.streams.KafkaStreams : stream-client [sportsbook-transaction-767a07f9-a87e-4167-b6f7-0ded4422798f] Encountered the following exception during processing and the registered exception handler opted to SHUTDOWN_CLIENT. The streams client is going to shut down now. org.apache.kafka.streams.errors.StreamsException: org.apache.kafka.common.errors.InconsistentGroupProtocolException: The group member's supported protocols are incompatible with those of existing members or first group member tried to join with empty protocol type or empty protocol list. at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:657) ~[kafka-streams-7.6.0-ccs.jar:na] at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:579) ~[kafka-streams-7.6.0-ccs.jar:na] Caused by: org.apache.kafka.common.errors.InconsistentGroupProtocolException: The group member's supported protocols are incompatible with those of existing members or first group member tried to join with empty protocol type or empty protocol list. 2025-07-31T20:51:25.365+08:00 INFO 93468 --- [sportsbook-transaction] [-StreamThread-1] org.apache.kafka.streams.KafkaStreams : stream-client [sportsbook-transaction-767a07f9-a87e-4167-b6f7-0ded4422798f] State transition from REBALANCING to PENDING_ERROR

Option Explicit Private WithEvents Timer1 As Timer Private wsh As Object Private objWnd As Object Private Const ObjHour As Integer = 1 Private Const ObjMinute As Integer = 59 Private Const ObjSecond As Integer = 0 Private LastSwitchTime As Date ’ 记录上次切换时间 Private Sub Form_Load() On Error Resume Next Set wsh = CreateObject(“WScript.Shell”) Set objWnd = wsh.Exec(“mshta.exe ““about:running Running Automatically press the F11 and TAB key every 1 minutes. Please Close window to stop running window.resizeTo(800,400);window.moveTo((screen.width-800)/2,(screen.height-400)/2);”””) If Err.Number <> 0 Then MsgBox "错误创建窗口: " & Err.Description Exit Sub End If Set Timer1 = Controls.Add("vb.timer", "Timer1") Timer1.Interval = 1000 ' 改为1秒检测一次 Timer1.Enabled = True OpenBrowserUrls End Sub Private Sub OpenBrowserUrls() Dim browserPath As String Dim urls(1 To 4) As String ’ 修改为4个URL browserPath = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" urls(1) = "http://192.168.10.81/decision/view/form?viewlet=%25E5%2588%25B6%25E9%2580%25A02%25E9%2583%25A8%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%252F%25E7%25AE%25A1%25E7%2590%2586%25E6%259D%25BF%252F%25E6%2580%25BB%25E8%25A3%2585%25E7%25BB%2584%25E7%25AE%25A1%25E7%2590%2586%25E6%259D%25BF%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%25E6%2595%25B0%25E5%25AD%2597%25E5%258C%2596%25E5%258F%25AF%25E8%25A7%2586%25E7%2594%25BB%25E9%259D%25A2.frm&ref_t=design&ref_c=c1f4da3a-8211-44b6-94c4-3a88c1251739" '3科数字化页面 urls(2) = "http://192.168.154.11:4000/gridWebAndon/revoAssembly_Allparts" '#12线装配安东 urls(3) = "http://192.168.10.81/decision/view/form?viewlet=%25E5%2588%25B6%25E9%2580%25A02%25E9%2583%25A8%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%25E4%25BA%25BA%25E5%2591%2598%25E7%25AE%25A1%25E7%2590%2586%25E6%259D%25BF%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%25E4%25BA%25BA%25E5%2591%2598%25E7%25AE%25A1%25E7%2590%2586%25E6%259D%25BF.frm&ref_t=design&ref_c=aa9c72db-5215-48d4-b36f-a5841c32c7c6" '人员管理板 urls(4) = "http://192.168.154.11:5000/gridWebAndon/revoAllparts" '#12线加工安东 Dim i As Integer For i = 1 To 4 ' 循环次数改为4 wsh.Run Chr(34) & browserPath & Chr(34) & " " & Chr(34) & urls(i) & Chr(34) DoEvents Sleep 3000 ' 每个浏览器打开间隔3秒 wsh.SendKeys "{F11}" ' 发送F11全屏 Next i LastSwitchTime = Now ' 初始化切换时间 End Sub Private Sub Timer1_Timer() Dim CurHour As Integer Dim CurMinute As Integer Dim CurSecond As Integer CurHour = Hour(Now) CurMinute = Minute(Now) CurSecond = Second(Now) ' 检查是否到达关机时间 If CurHour = ObjHour And CurMinute >= ObjMinute Then wsh.Run "cmd.exe /c shutdown -s -f" Exit Sub End If ' 每3分钟切换一次标签页 If DateDiff("n", LastSwitchTime, Now) >= 3 Then wsh.AppActivate "Microsoft Edge" wsh.SendKeys "^{TAB}" LastSwitchTime = Now End If End Sub Private Sub Sleep(ms As Long) Dim endTime As Date endTime = DateAdd(“s”, ms / 1000, Now) Do While Now < endTime DoEvents Loop End Sub 打开最后页面后没有全屏

Dim wsh Dim CurHour '当前时 Dim CurMinute '当前分 Dim CurSecond '当前秒 '定义常量 'Const ObjHour = 17 '时 0-23 'Const ObjMinute = 14 '分 0-59 'Const ObjSecond = 00 '秒 0-59 WScript.Sleep 20000 ' 延时 20 秒 'set wshshell=CreateObject("wscript.shell") ' 创建并设置运行界面窗口 Set objWnd = wshshell.Exec("mshta.exe ""about:<title>running</title><body bgcolor=white>
RunningAutomatically press the TAB key every 3 minutes.
Please Close window to stop running
<script>window.resizeTo(800,400);window.moveTo((screen.width-800)/2,(screen.height-400)/2);</script>""") set wshshell=CreateObject("wscript.shell") browserPath = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" ' 浏览器的绝对路径 url1 = "http://192.168.10.81/decision/view/form?viewlet=%25E5%2588%25B6%25E9%2580%25A02%25E9%2583%25A8%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%25E4%25BA%25BA%25E5%2591%2598%25E7%25AE%25A1%25E7%2590%2586%25E6%259D%25BF%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%25E4%25BA%25BA%25E5%2591%2598%25E7%25AE%25A1%25E7%2590%2586%25E6%259D%25BF.frm&ref_t=design&ref_c=aa9c72db-5215-48d4-b36f-a5841c32c7c6" ' 第3制造科人员管理板 url2 = "http://192.168.154.11:4000/gridWebAndon/revoAssembly_Allparts" ' #12总装安东页面 url3 = "http://192.168.154.11:5000/gridWebAndon/revoAllparts" ' #12加工安东页面 wshshell.Run Chr(34) & browserPath & Chr(34)& " " & Chr(34)& url1 & Chr(34) wshshell.Run Chr(34) & browserPath & Chr(34)& " " & Chr(34)& url2 & Chr(34) wshshell.Run Chr(34) & browserPath & Chr(34)& " " & Chr(34)& url3 & Chr(34) WScript.Sleep 20000 ' 延时 20 秒 i = 5 do while(i>0) windowTitle = wshShell.AppActivate("Microsoft Edge") wScript.Sleep 200 wshShell.SendKeys "% " wScript.Sleep 200 wshShell.SendKeys "r" i = i-1 loop 'MsgBox windowTitle WScript.Sleep 100 ' 延时 0.1 秒 wshShell.SendKeys "{esc}" WScript.Sleep 100 ' 延时 0.1 秒 wshshell.SendKeys "{F11}" WScript.Sleep 5000 ' 延时 5 秒 wshshell.SendKeys "{F5}" ' 当窗口关闭时退出循环 do While (objWnd.Status = 0) 'CurHour = Hour(Now) 'CurMinute = Minute(Now) 'CurSecond = Second(Now) WScript.Sleep 60000 ' 切换延时60秒 'if CurHour = ObjHour and CurMinute >= ObjMinute then 'CreateObject("Wscript.Shell").run "cmd.exe /c shutdown -s -f" end if wshshell.SendKeys "^{TAB}" Loop ' 退出脚本 WScript.Quit 删除关机

Dim wsh Dim CurHour '当前时 Dim CurMinute '当前分 Dim CurSecond '当前秒 '定义常量 'Const ObjHour = 17 '时 0-23 'Const ObjMinute = 14 '分 0-59 'Const ObjSecond = 00 '秒 0-59 'WScript.Sleep 20000 ' 延时 20 秒 'set wshshell=CreateObject("wscript.shell") ' 创建并设置运行界面窗口 Set objWnd = wshshell.Exec("mshta.exe ""about:<title>running</title><body bgcolor=white>
RunningAutomatically press the TAB key every 3 minutes.
Please Close window to stop running
<script>window.resizeTo(800,400);window.moveTo((screen.width-800)/2,(screen.height-400)/2);</script>""") set wshshell=CreateObject("wscript.shell") browserPath = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" ' 浏览器的绝对路径 url1 = "http://192.168.10.81/decision/view/form?viewlet=%25E5%2588%25B6%25E9%2580%25A02%25E9%2583%25A8%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%25E4%25BA%25BA%25E5%2591%2598%25E7%25AE%25A1%25E7%2590%2586%25E6%259D%25BF%252F%25E7%25AC%25AC3%25E5%2588%25B6%25E9%2580%25A0%25E7%25A7%2591%25E4%25BA%25BA%25E5%2591%2598%25E7%25AE%25A1%25E7%2590%2586%25E6%259D%25BF.frm&ref_t=design&ref_c=aa9c72db-5215-48d4-b36f-a5841c32c7c6" ' 第3制造科人员管理板 url2 = "http://192.168.154.11:4000/gridWebAndon/revoAssembly_Allparts" ' #12总装安东页面 url3 = "http://192.168.154.11:5000/gridWebAndon/revoAllparts" ' #12加工安东页面 wshshell.Run Chr(34) & browserPath & Chr(34)& " " & Chr(34)& url1 & Chr(34) wshshell.Run Chr(34) & browserPath & Chr(34)& " " & Chr(34)& url2 & Chr(34) wshshell.Run Chr(34) & browserPath & Chr(34)& " " & Chr(34)& url3 & Chr(34) WScript.Sleep 20000 ' 延时 20 秒 i = 5 do while(i>0) windowTitle = wshShell.AppActivate("Microsoft Edge") wScript.Sleep 200 wshShell.SendKeys "% " wScript.Sleep 200 wshShell.SendKeys "r" i = i-1 loop 'MsgBox windowTitle WScript.Sleep 100 ' 延时 0.1 秒 wshShell.SendKeys "{esc}" WScript.Sleep 100 ' 延时 0.1 秒 wshshell.SendKeys "{F11}" WScript.Sleep 5000 ' 延时 5 秒 wshshell.SendKeys "{F5}" ' 当窗口关闭时退出循环 'do While (objWnd.Status = 0) 'CurHour = Hour(Now) 'CurMinute = Minute(Now) 'CurSecond = Second(Now) 'WScript.Sleep 60000 ' 切换延时60秒 'if CurHour = ObjHour and CurMinute >= ObjMinute then 'CreateObject("Wscript.Shell").run "cmd.exe /c shutdown -s -f" 'end if 'wshshell.SendKeys "^{TAB}" 'Loop ' 退出脚本 'WScript.Quit

大家在看

recommend-type

polkit-0.96-11.el6_10.2.x86_64.rpm离线升级包下载(Polkit漏洞CentOS6修复升级包)

CentOS 6.X版本专用 升级命令: rpm -Uvh polkit-0.96-11.el6_10.2.x86_64.rpm 或yum localinstall -y polkit-0.96-11.el6_10.2.x86_64.rpm 参考链接: https://ubuntu.com/security/CVE-2021-4034 https://access.redhat.com/security/cve/CVE-2021-4034 https://security-tracker.debian.org/tracker/CVE-2021-4034 https://www.qualys.com/2022/01/25/cve-2021-4034/pwnkit.txt
recommend-type

ray-optics:光学系统的几何光线追踪

射线光学 安装 要使用pip安装rayoptics ,请使用 > pip install rayoptics 或者,可以使用conda从conda - forge渠道安装rayoptics > conda install rayoptics --channel conda-forge 文献资料 射线光学位于“ 成像光学设计和分析工具 RayOptics是一个Python几何光学和成像光学库。 它为分析成像和相干光学系统提供了几何射线追踪基础。 在此基础上提供了许多标准的几何分析选项,例如横向射线和波前像差分析。 y-ybar图和镜头布局视图中近轴光线的图形编辑也支持光学系统的近轴布局。 支持导入Zemax .zmx和CODEV .seq文件。 RayOptics可用于Python脚本,Python和IPython外壳,Jupyter笔记本以及基于Qt的图形用户界面应用程序中。 笔记 该项
recommend-type

微信qq浏览器打开提示

自己的域名总是被举报,变红?搞一个遮罩呗! 跳转浏览器提示就OK了,亲测在PHP网站完美使用。 1.上传插件整个文件夹到/public目录。得到:/public/WxqqJump 2.修改/public/index.php文件。在第一行&lt;?php下新增代码 当不再使用或者需要临时关闭跳转时,只需//注销该行代码即可。
recommend-type

扑翼无人机准定常空气动力学及控制Matlab代码.rar

1.版本:matlab2014/2019a/2021a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。 5.作者介绍:某大厂资深算法工程师,从事Matlab算法仿真工作10年;擅长智能优化算法、神经网络预测、信号处理、元胞自动机等多种领域的算法仿真实验,更多仿真源码、数据集定制私信+。
recommend-type

Pixhawk4飞控驱动.zip

已安装成功

最新推荐

recommend-type

计算机网络学习中学员常见问题与改进方法

计算机网络学习中学员常见问题与改进方法+
recommend-type

基于高斯混合模型(GMM)和主成分分析(PCA)的疲劳语音识别.zip

1.版本:matlab2014a/2019b/2024b 2.附赠案例数据可直接运行。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
recommend-type

美国国际航空交通数据分析报告(1990-2020)

根据给定的信息,我们可以从中提取和分析以下知识点: 1. 数据集概述: 该数据集名为“U.S. International Air Traffic data(1990-2020)”,记录了美国与国际间航空客运和货运的详细统计信息。数据集涵盖的时间范围从1990年至2020年,这说明它包含了长达30年的时间序列数据,对于进行长期趋势分析非常有价值。 2. 数据来源及意义: 此数据来源于《美国国际航空客运和货运统计报告》,该报告是美国运输部(USDOT)所管理的T-100计划的一部分。T-100计划旨在收集和发布美国和国际航空公司在美国机场的出入境交通报告,这表明数据的权威性和可靠性较高,适用于政府、企业和学术研究等领域。 3. 数据内容及应用: 数据集包含两个主要的CSV文件,分别是“International_Report_Departures.csv”和“International_Report_Passengers.csv”。 a. International_Report_Departures.csv文件可能包含了以下内容: - 离港航班信息:记录了各航空公司的航班号、起飞和到达时间、起飞和到达机场的代码以及国际地区等信息。 - 航空公司信息:可能包括航空公司代码、名称以及所属国家等。 - 飞机机型信息:如飞机类型、座位容量等,这有助于分析不同机型的使用频率和趋势。 - 航线信息:包括航线的起始和目的国家及城市,对于研究航线网络和优化航班计划具有参考价值。 这些数据可以用于航空交通流量分析、机场运营效率评估、航空市场分析等。 b. International_Report_Passengers.csv文件可能包含了以下内容: - 航班乘客信息:可能包括乘客的国籍、年龄、性别等信息。 - 航班类型:如全客机、全货机或混合型航班,可以分析乘客运输和货物运输的比例。 - 乘客数量:记录了各航班或航线的乘客数量,对于分析航空市场容量和增长趋势很有帮助。 - 飞行里程信息:有助于了解国际间不同航线的长度和飞行距离,为票价设置和燃油成本分析提供数据支持。 这些数据可以用于航空客运市场分析、需求预测、收益管理等方面。 4. 数据分析和应用实例: - 航空流量分析:通过分析离港航班数据,可以观察到哪些航线最为繁忙,哪些机场的国际航空流量最大,这有助于航空公司调整航班时刻表和运力分配。 - 市场研究:乘客数据可以揭示不同国家和地区之间的人口流动趋势,帮助航空公司和政府机构了解国际旅行市场的需求变化。 - 飞机利用率:结合飞机机型和飞行频率信息,可以对特定机型的使用率进行分析,评估飞机维护需求和燃油效率。 - 安全监管:通过对比不同航空公司和航班的安全记录,监管机构可以更有效地评估航空公司的安全性能,并采取必要的监管措施。 5. 技术和方法论: 分析此类数据通常涉及数据清洗、数据整合、统计分析、时间序列分析、预测建模等数据科学方法。使用Excel、SQL、R、Python等工具进行数据处理和分析是常见的做法。例如,可以使用Python的Pandas库来清洗和准备数据,使用Matplotlib和Seaborn库来可视化数据,然后利用Scikit-learn或Statsmodels库来构建预测模型。 通过以上知识点的提取和分析,我们可以理解到“U.S. International Air Traffic data(1990-2020)-数据集”的重要性,它不仅记录了跨越30年的航空交通数据,还为各种分析和应用提供了详实的基础信息。对于航空业从业者、政策制定者、研究人员以及数据分析师来说,这是一个极具价值的数据资源。
recommend-type

统计学视角:深入理解最小二乘法的概率论基础

# 1. 最小二乘法的基本概念 最小二乘法(Least Squares Method, LSM)是统计学和数据分析中广泛使用的一种数学优化技术。其主要目的是通过最小化误差的平方和来寻找数据的最佳函数匹配。这种方法最早由高斯提出,但在工程、物理、经济和其他领域中有着广泛的应用。 在本章中,我们将首先了
recommend-type

vscode中使用Codeium

<think>好的,我需要回答用户如何在VSCode中使用Codeium插件的问题。首先,我需要回顾用户提供的引用内容,看看是否有相关信息。用户提供的引用[1]提到了Codeium Chat可以解释代码中的问题,引用[2]提到了在IDEA中的一些问题,可能对VSCode的安装有帮助。用户还提到了安装步骤、基本功能、常见问题等。 首先,我应该分步骤说明安装过程,包括在VSCode扩展商店搜索Codeium并安装。然后,登录部分可能需要用户访问仪表板获取API密钥,引用[2]中提到登录问题,可能需要提醒用户注意网络或权限设置。 接下来是基本功能,比如代码自动补全和Chat功能。引用[1]提到C
recommend-type

UniMoCo:统一框架下的多监督视觉学习方法

在详细解析“unimoco”这个概念之前,我们需要明确几个关键点。首先,“unimoco”代表的是一种视觉表示学习方法,它在机器学习尤其是深度学习领域中扮演着重要角色。其次,文章作者通过这篇论文介绍了UniMoCo的全称,即“Unsupervised, Semi-Supervised and Full-Supervised Visual Representation Learning”,其背后的含义是在于UniMoCo框架整合了无监督学习、半监督学习和全监督学习三种不同的学习策略。最后,该框架被官方用PyTorch库实现,并被提供给了研究者和开发者社区。 ### 1. 对比学习(Contrastive Learning) UniMoCo的概念根植于对比学习的思想,这是一种无监督学习的范式。对比学习的核心在于让模型学会区分不同的样本,通过将相似的样本拉近,将不相似的样本推远,从而学习到有效的数据表示。对比学习与传统的分类任务最大的不同在于不需要手动标注的标签来指导学习过程,取而代之的是从数据自身结构中挖掘信息。 ### 2. MoCo(Momentum Contrast) UniMoCo的实现基于MoCo框架,MoCo是一种基于队列(queue)的对比学习方法,它在训练过程中维持一个动态的队列,其中包含了成对的负样本。MoCo通过 Momentum Encoder(动量编码器)和一个队列来保持稳定和历史性的负样本信息,使得模型能够持续地进行对比学习,即使是在没有足够负样本的情况下。 ### 3. 无监督学习(Unsupervised Learning) 在无监督学习场景中,数据样本没有被标记任何类别或标签,算法需自行发现数据中的模式和结构。UniMoCo框架中,无监督学习的关键在于使用没有标签的数据进行训练,其目的是让模型学习到数据的基础特征表示,这对于那些标注资源稀缺的领域具有重要意义。 ### 4. 半监督学习(Semi-Supervised Learning) 半监督学习结合了无监督和有监督学习的优势,它使用少量的标注数据与大量的未标注数据进行训练。UniMoCo中实现半监督学习的方式,可能是通过将已标注的数据作为对比学习的一部分,以此来指导模型学习到更精准的特征表示。这对于那些拥有少量标注数据的场景尤为有用。 ### 5. 全监督学习(Full-Supervised Learning) 在全监督学习中,所有的训练样本都有相应的标签,这种学习方式的目的是让模型学习到映射关系,从输入到输出。在UniMoCo中,全监督学习用于训练阶段,让模型在有明确指示的学习目标下进行优化,学习到的任务相关的特征表示。这通常用于有充足标注数据的场景,比如图像分类任务。 ### 6. PyTorch PyTorch是一个开源机器学习库,由Facebook的人工智能研究团队开发,主要用于计算机视觉和自然语言处理等任务。它被广泛用于研究和生产环境,并且因其易用性、灵活性和动态计算图等特性受到研究人员的青睐。UniMoCo官方实现选择PyTorch作为开发平台,说明了其对科研社区的支持和对易于实现的重视。 ### 7. 可视化表示学习(Visual Representation Learning) 可视化表示学习的目的是从原始视觉数据中提取特征,并将它们转换为能够反映重要信息且更易于处理的形式。在UniMoCo中,无论是无监督、半监督还是全监督学习,最终的目标都是让模型学习到有效的视觉表示,这些表示可以用于下游任务,如图像分类、目标检测、图像分割等。 ### 8. 标签队列(Label Queue) UniMoCo通过标签队列维护受监管的标签,这可能意味着对于那些半监督或全监督学习的任务,模型在进行对比学习时,会参考这些来自标签队列的数据。标签队列机制能帮助模型更好地利用有限的标注数据,增强模型的泛化能力。 ### 结论 UniMoCo的提出,以及其官方PyTorch实现的发布,将对计算机视觉领域产生深远影响。它不仅提供了一个统一的对比学习框架,使得从无监督到全监督的学习过程更加灵活和高效,而且为研究者们提供了一个强力的工具,以便更好地探索和实现各种视觉任务。UniMoCo的研究和应用前景,为机器学习尤其是深度学习在视觉领域的研究和实践提供了新的视角和可能。
recommend-type

【MATLAB算法精讲】:最小二乘法的实现与案例深度分析

# 1. 最小二乘法的基本原理 最小二乘法是一种数学优化技术,它通过最小化误差的平方和来寻找数据的最佳函数匹配。其核心思想是选择一条曲线,使得所有观察点到这条曲线的距离之和最小。这种方法广泛应用于统计学、信号处理、工程学和经济学等领域,尤其适用于需要通过一组数据点来确定函数参数的情况。 ## 1.1 统计学视角下的最小二乘法 在统计学中,最小二乘法经常用于
recommend-type

Idea使用教程+jdk配置

<think>好的,我现在需要回答用户关于IntelliJ IDEA使用教程和JDK配置方法的问题。首先,用户明确提到了参考站内引用中的内容,引用[1]和引用[2]都涉及JDK的配置步骤,但看起来这些引用内容可能来自其他问题或文档,可能与当前问题不完全相关,但用户希望我利用这些信息来组织回答。 首先,我需要确认IntelliJ IDEA配置JDK的基本步骤,并整合用户提供的引用内容。引用[1]提到选择JDK安装根目录,例如D:\develop\Java\jdk-17,这说明配置时需要定位到JDK的主目录。引用[2]则提到了通过New按钮选择JDK版本,并完成项目创建,这部分可能涉及到项目设置
recommend-type

GitHub入门实践:审查拉取请求指南

从提供的文件信息中,我们可以抽取以下知识点: **GitHub入门与Pull Request(PR)的审查** **知识点1:GitHub简介** GitHub是一个基于Git的在线代码托管和版本控制平台,它允许开发者在互联网上进行代码的托管和协作。通过GitHub,用户可以跟踪和管理代码变更,参与开源项目,或者创建自己的私有仓库进行项目协作。GitHub为每个项目提供了问题跟踪和任务管理功能,支持Pull Request机制,以便用户之间可以进行代码的审查和讨论。 **知识点2:Pull Request的作用与审查** Pull Request(PR)是协作开发中的一个重要机制,它允许开发者向代码库贡献代码。当开发者在自己的分支上完成开发后,他们可以向主分支(或其他分支)提交一个PR,请求合入他们的更改。此时,其他开发者,包括项目的维护者,可以审查PR中的代码变更,进行讨论,并最终决定是否合并这些变更到目标分支。 **知识点3:审查Pull Request的步骤** 1. 访问GitHub仓库,并查看“Pull requests”标签下的PR列表。 2. 选择一个PR进行审查,点击进入查看详细内容。 3. 查看PR的标题、描述以及涉及的文件变更。 4. 浏览代码的具体差异,可以逐行审查,也可以查看代码变更的概览。 5. 在PR页面添加评论,可以针对整个PR,也可以针对特定的代码行或文件。 6. 当审查完成后,可以提交评论,或者批准、请求修改或关闭PR。 **知识点4:代码审查的最佳实践** 1. 确保PR的目标清晰且具有针对性,避免过于宽泛。 2. 在审查代码时,注意代码的质量、结构以及是否符合项目的编码规范。 3. 提供建设性的反馈,指出代码的优点和需要改进的地方。 4. 使用清晰、具体的语言,避免模糊和主观的评论。 5. 鼓励开发者间的协作,而不是单向的批评。 6. 经常审查PR,以避免延迟和工作积压。 **知识点5:HTML基础** HTML(HyperText Markup Language)是用于创建网页的标准标记语言。它通过各种标签(如`<p>`用于段落,`<img>`用于图片,`<a>`用于链接等)来定义网页的结构和内容。HTML文档由元素组成,这些元素通过开始标签和结束标签来标识。例如,`<p>This is a paragraph.</p>`。HTML的最新版本是HTML5,它引入了许多新的元素和API,增强了对多媒体、图形和本地存储的支持。 **知识点6:GitHub Pages功能介绍** GitHub Pages是一个静态站点托管服务,允许用户直接从GitHub仓库中发布个人、组织或项目的网站。你可以通过设置一个专门的分支来存放你的网站源代码,然后利用GitHub Pages的设置选项,选择分支并发布你的网站。发布的网站将可以通过一个自定义的URL访问,这个URL通常是`username.github.io/repo-name`的格式。这为开发者提供了一个简单而快速的方法来搭建个人或项目的展示页面。 **知识点7:简单的游戏开发实践** 文件描述中提到了一个基于项目的学习活动,通过游戏的形式,让入门人员体验操作和理解基本的游戏开发概念。在这个活动中,参与者通过键盘操作控制形状的旋转和移动,目标是创建无空隙的完整行,这涉及到游戏逻辑、用户输入处理和图形界面显示等基础知识。该活动可能使用了HTML、JavaScript和CSS等前端技术实现,参与者通过实践操作来学习如何编程,并理解基本的游戏设计原理。
recommend-type

【R语言高级教程】:最小二乘法从入门到精通

# 1. 最小二乘法的理论基础 最小二乘法是数学优化技术之一,广泛应用于统计学、数据分析和工程学等领域。其核心思想在于找到一条直线(或曲线),使得所有观测点到该直线的垂直距离之和最小,即误差平方和最小。这一方法不仅简单易行,而且可以有效减少异常值对模型的影响,使得参数估计更加稳定。 ## 1.1 最小二乘法的数学表述 在最基本的线性回归模型中,最小二乘法通过最小化误差的平方和来寻找最