自主巡航,目标射击
中国机器人及人工智能大赛
参赛经验:
自主巡航赛道
【机器人和人工智能——自主巡航赛项】动手实践篇-CSDN博客
主要逻辑代码
#!/usr/bin/env python
#coding: utf-8import rospy
from geometry_msgs.msg import Point
import threading
import actionlib
import time
from actionlib_msgs.msg import GoalStatus
from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal
from geometry_msgs.msg import PoseWithCovarianceStamped
from tf_conversions import transformations
from ar_track_alvar_msgs.msg import AlvarMarkers
from math import pi
from std_msgs.msg import String
import sys
reload(sys)
sys.setdefaultencoding('utf-8')class Navigation:def __init__(self):self.set_pose_pub = rospy.Publisher('/initialpose', PoseWithCovarianceStamped, queue_size=5)self.move_base = actionlib.SimpleActionClient("move_base", MoveBaseAction)self.move_base.wait_for_server(rospy.Duration(60))def set_pose(self, p):if self.move_base is None:return Falsex, y, th = ppose = PoseWithCovarianceStamped()pose.header.stamp = rospy.Time.now()pose.header.frame_id = 'map'pose.pose.pose.position.x = xpose.pose.pose.position.y = yq = transformations.quaternion_from_euler(0.0, 0.0, th/180.0*pi)pose.pose.pose.orientation.x = q[0]pose.pose.pose.orientation.y = q[1]pose.pose.pose.orientation.z = q[2]pose.pose.pose.orientation.w = q[3]self.set_pose_pub.publish(pose)return True def _feedback_cb(self, feedback):msg = feedback#rospy.loginfo("[Navi] navigation feedback\r\n%s"%feedback)def goto(self, p):rospy.loginfo("[Navigation] goto %s"%p)goal = MoveBaseGoal()goal.target_pose.header.frame_id = 'map'goal.target_pose.header.stamp = rospy.Time.now()goal.target_pose.pose.position.x = p[0]goal.target_pose.pose.position.y = p[1]q = transformations.quaternion_from_euler(0.0, 0.0, p[2]/180.0*pi)goal.target_pose.pose.orientation.x = q[0]goal.target_pose.pose.orientation.y = q[1]goal.target_pose.pose.orientation.z = q[2]goal.target_pose.pose.orientation.w = q[3]self.move_base.send_goal(goal, self._done_cb, self._active_cb, self._feedback_cb)result = self.move_base.wait_for_result(rospy.Duration(60))if not result:self.move_base.cancel_goal()rospy.loginfo("Timed out achieving goal")else:state = self.move_base.get_state()if state == GoalStatus.SUCCEEDED:rospy.loginfo("reach goal %s succeeded!"%p)return Truedef _done_cb(self, status, result):rospy.loginfo("navigation done! status:%d result:%s"%(status, result))def _active_cb(self):rospy.loginfo("[Navi] navigation has be actived")def cancel(self):self.move_base.cancel_all_goals()return Trueclass ARTracker:def __init__(self):self.ar_sub = rospy.Subscriber('/ar_pose_marker', AlvarMarkers, self.ar_cb)def ar_cb(self,data):global tag_idfor marker in data.markers:tag_id = marker.idclass Object_position:def __init__(self):self.ar_sub = rospy.Subscriber('/object_position', Point, self.find_cb)self.tts_pub = rospy.Publisher('/voiceWords', String, queue_size=10)def find_cb(self,data):global find_id point_msg = dataif(point_msg.z>=1 and point_msg.z<=5):find_id = 1 self.tts_pub.publish(str(find_id))elif(point_msg.z>=9 and point_msg.z<=15):find_id = 2self.tts_pub.publish(str(find_id))elif(point_msg.z>=16 and point_msg.z<=23):find_id = 3self.tts_pub.publish(str(find_id))elif(point_msg.z>=25 and point_msg.z<=26):find_id = 4self.tts_pub.publish(str(find_id))elif(point_msg.z>=36 and point_msg.z<=40):find_id = 5self.tts_pub.publish(str(find_id))elif(point_msg.z>=41 and point_msg.z<=43):find_id = 6self.tts_pub.publish(str(find_id))elif(point_msg.z>=70 and point_msg.z<=71):find_id = 7self.tts_pub.publish(str(find_id))elif(point_msg.z>=80 and point_msg.z<=81):find_id = 8self.tts_pub.publish(str(find_id))else:find_id = 0#print("id为0,没有识别到!")def process():rospy.spin()find_id = 0
tag_id = 0
both_id =0if __name__ == '__main__':rospy.init_node('navigation_demo',anonymous=True)goalListX = rospy.get_param('~goalListX', '2.0, 2.0,2.0')goalListY = rospy.get_param('~goalListY', '2.0, 4.0,2.0')goalListYaw = rospy.get_param('~goalListYaw', '0, 90.0,2.0')goals = [[float(x), float(y), float(yaw)] for (x, y, yaw) in zip(goalListX.split(","),goalListY.split(","),goalListYaw.split(","))]##为了方便记忆,goals中[0]是终点,[1]到[8]分别对应场上的8个点,9是第一个框的识别点,10是第二个框的识别点,11是第三个框的识别点,12是第四个框的识别点object_position = Object_position()ar_acker = ARTracker()executor_thread = threading.Thread(target=process).start()navi = Navigation()find_point_flag=[0,0,0,0]have_nav_flag=[0,0,0,0]time.sleep(10)navi.goto(goals[9])find_point_flag[0]=1while True:if find_id==1 or tag_id==1:both_id=1elif find_id==2 or tag_id==2:both_id=2elif find_id==3 or tag_id==3:both_id=3elif find_id==4 or tag_id==4:both_id=4elif find_id==5 or tag_id==5:both_id=5elif find_id==6 or tag_id==6:both_id=6elif find_id==7 or tag_id==7:both_id=7elif find_id==8 or tag_id==8:both_id=8else:both_id=0 if both_id==0:if have_nav_flag[0]==1 and find_point_flag[1]==0: navi.goto(goals[10]) find_point_flag[1]=1if have_nav_flag[1]==1 and find_point_flag[2]==0: navi.goto(goals[11]) find_point_flag[2]=1if have_nav_flag[2]==1 and find_point_flag[3]==0:navi.goto(goals[12])find_point_flag[3]=1if have_nav_flag[3]==1: navi.goto(goals[0]) breakelse:if both_id==1 and have_nav_flag[0]==0: navi.goto(goals[1])have_nav_flag[0]=1if both_id==2 and have_nav_flag[0]==0: navi.goto(goals[2])have_nav_flag[0]=1if both_id==3 and have_nav_flag[0]==0: navi.goto(goals[3])have_nav_flag[1]=1if both_id==4 and have_nav_flag[0]==0: navi.goto(goals[4])have_nav_flag[1]=1if both_id==5 and have_nav_flag[0]==0: navi.goto(goals[5])have_nav_flag[3]=1if both_id==6 and have_nav_flag[0]==0: navi.goto(goals[6])have_nav_flag[3]=1if both_id==7 and have_nav_flag[0]==0: navi.goto(goals[7])have_nav_flag[4]=1if both_id==8 and have_nav_flag[0]==0: navi.goto(goals[8])have_nav_flag[4]=1#time.sleep(1)#rclpy.shutdown()
极限4天排队调车,时间太赶了,代码写得很差,一旦识别不了后面的就走不了,后面想重写也没时间。由于官方用的模板匹配识别的太慢,打算用yolov5 -lite模型识别,openvino部署,后面也来不及用上。现在,把yolov5 -lite 大写数字一到八的检测模型 .onnx文件送上,准确率95%
best.zip - 蓝奏云
目标射击赛道
目标射击赛项实践直播回放2024-04-23_哔哩哔哩_bilibili
#!/usr/bin/env python
#coding: utf-8import rospy
from geometry_msgs.msg import Point, Twist
import threading
import actionlib
import serial
import time
from actionlib_msgs.msg import GoalStatus
from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal
from geometry_msgs.msg import PoseWithCovarianceStamped
from tf_conversions import transformations
from ar_track_alvar_msgs.msg import AlvarMarkers
from math import pi
import subprocessclass Navigation:def __init__(self):self.set_pose_pub = rospy.Publisher('/initialpose', PoseWithCovarianceStamped, queue_size=5)self.move_base = actionlib.SimpleActionClient("move_base", MoveBaseAction)self.move_base.wait_for_server(rospy.Duration(60))def set_pose(self, p):if self.move_base is None:return Falsex, y, th = ppose = PoseWithCovarianceStamped()pose.header.stamp = rospy.Time.now()pose.header.frame_id = 'map'pose.pose.pose.position.x = xpose.pose.pose.position.y = yq = transformations.quaternion_from_euler(0.0, 0.0, th/180.0*pi)pose.pose.pose.orientation.x = q[0]pose.pose.pose.orientation.y = q[1]pose.pose.pose.orientation.z = q[2]pose.pose.pose.orientation.w = q[3]self.set_pose_pub.publish(pose)return True def _feedback_cb(self, feedback):msg = feedback#rospy.loginfo("[Navi] navigation feedback\r\n%s"%feedback)def goto(self, p):rospy.loginfo("[Navigation] goto %s"%p)goal = MoveBaseGoal()goal.target_pose.header.frame_id = 'map'goal.target_pose.header.stamp = rospy.Time.now()goal.target_pose.pose.position.x = p[0]goal.target_pose.pose.position.y = p[1]q = transformations.quaternion_from_euler(0.0, 0.0, p[2]/180.0*pi)goal.target_pose.pose.orientation.x = q[0]goal.target_pose.pose.orientation.y = q[1]goal.target_pose.pose.orientation.z = q[2]goal.target_pose.pose.orientation.w = q[3]self.move_base.send_goal(goal, self._done_cb, self._active_cb, self._feedback_cb)result = self.move_base.wait_for_result(rospy.Duration(60))if not result:self.move_base.cancel_goal()rospy.loginfo("Timed out achieving goal")else:state = self.move_base.get_state()if state == GoalStatus.SUCCEEDED:rospy.loginfo("reach goal %s succeeded!"%p)return Truedef _done_cb(self, status, result):rospy.loginfo("navigation done! status:%d result:%s"%(status, result))def _active_cb(self):rospy.loginfo("[Navi] navigation has be actived")def cancel(self):self.move_base.cancel_all_goals()return Trueclass ARTracker:def __init__(self):self.ar_sub = rospy.Subscriber('/ar_pose_marker', AlvarMarkers, self.ar_cb)def ar_cb(self,data):global target_idglobal ar_xglobal ar_yglobal ar_zglobal ar_idfor marker in data.markers:if marker.id == target_id :ar_x = marker.pose.pose.position.xar_y = marker.pose.pose.position.yar_z = marker.pose.pose.position.zar_id = marker.id#print('AR Marker Position (x,y,z):', ar_x, ar_y,ar_z)breakclass Object_position:def __init__(self):self.ar_sub = rospy.Subscriber('/object_position', Point, self.find_cb)def find_cb(self,data):global find_id global find_xglobal find_y point_msg = dataif(point_msg.z>=1 and point_msg.z<=5):find_id = 1 find_x=point_msg.xfind_y=point_msg.y else:find_id = 0def process():rospy.spin()find_id = 0
find_x=0.0
find_y=0.0
target_id = 0
ar_id = 0
ar_x =0.0
ar_y =0.0
ar_z =0.0if __name__ == '__main__':rospy.init_node('navigation_demo',anonymous=True)ser = serial.Serial(port="/dev/shoot", baudrate=9600, parity="N", bytesize=8, stopbits=1)pub = rospy.Publisher("/cmd_vel", Twist, queue_size=1000)goals = [ [1.1 , -0.37,0.0],[1.1 , -1.45,.0],[1.0 , -2.72,.0],[0.07 , -2.72,.0] ]object_position = Object_position()ar_acker = ARTracker()executor_thread = threading.Thread(target=process).start()navi = Navigation()time.sleep(15)# ------first--------------------------------------------------------navi.goto(goals[0])start=time.time()is_shoot=0while True:if find_id == 1:flog0 = find_x - 320flog1 = abs(flog0)print(flog0)if abs(flog1) >10:msg = Twist() msg.angular.z = -0.01 * flog0 pub.publish(msg)print(msg.angular.z)elif abs(flog1) <= 10: print('1 is shoot') ser.write(b'\x55\x01\x12\x00\x00\x00\x01\x69') time.sleep(0.2) ser.write(b'\x55\x01\x11\x00\x00\x00\x01\x68') time.sleep(2)is_shoot=1breakend=time.time()if end-start>12:breakif is_shoot==0:ser.write(b'\x55\x01\x12\x00\x00\x00\x01\x69') time.sleep(0.2) ser.write(b'\x55\x01\x11\x00\x00\x00\x01\x68') time.sleep(2)#subprocess.run( ['rosnode','kill','find_object_2d'] )# ------sencond-----------------------------------------------------navi.goto(goals[1])target_id=1 Yaw_th = 0.003start=time.time()is_shoot=0while True:if ar_id == target_id:ar_x_abs = abs(ar_x)print('x:',ar_x)print('z:',ar_z) if ar_x_abs >= Yaw_th: msg = Twist() msg.angular.z = -1.5 * ar_x pub.publish(msg)elif ar_x_abs < Yaw_th and (ar_z >= 1.57 and ar_z <=1.64):print('2 is shoot') ser.write(b'\x55\x01\x12\x00\x00\x00\x01\x69') time.sleep(0.1) ser.write(b'\x55\x01\x11\x00\x00\x00\x01\x68')is_shoot=1breakend=time.time()if end-start>20:breakif is_shoot==0:ser.write(b'\x55\x01\x12\x00\x00\x00\x01\x69') time.sleep(0.2) ser.write(b'\x55\x01\x11\x00\x00\x00\x01\x68') time.sleep(2)# # --------------------third----------------------------------navi.goto(goals[2])target_id=2 # ------------------------------------------------------Yaw_th = 0.002start=time.time()is_shoot=0while True:if ar_id == target_id:ar_x_abs = abs(ar_x)print(ar_x) if ar_x_abs >= Yaw_th: msg = Twist() msg.angular.z = -1.5 * ar_x pub.publish(msg)elif ar_x_abs < Yaw_th:print('3 is shoot') ser.write(b'\x55\x01\x12\x00\x00\x00\x01\x69') time.sleep(0.1) ser.write(b'\x55\x01\x11\x00\x00\x00\x01\x68')is_shoot=1 breakend=time.time()if end-start>12:breakif is_shoot==0:ser.write(b'\x55\x01\x12\x00\x00\x00\x01\x69') time.sleep(0.2) ser.write(b'\x55\x01\x11\x00\x00\x00\x01\x68') time.sleep(2)# # -------------------------------------------------------------------------navi.goto(goals[3]) #slowly#rclpy.shutdown()
调的时候旋转靶是可以打的,但是比赛过程就旋转靶没打中,没办法了,就这样。
经验
ssh -Y abot@192.168.135.6
sudo nautilus
scp -r abot@192.168.135.6:/home/abot/robot_ws D:主目录运行:
建图: ./1-gmapping.sh 保存: roslaunch robot_slam save_map.launch
射击: roslaunch abot_bringup shoot.launch 发射驱动程序
rostopic pub /shoot std_msgs/String "data: '' " 发布射击的空话题,等待发射
识别:
roslaunch usb_cam usb_cam_test.launch 打开相机
rosrun rqt_image_view rqt_image_view 可视化相机
语音:
连接蓝牙耳机WI-C200
roscore
rosrun robot_voice tts_subscribe
rostopic pub /voiceWords std_msgs/String "data: '1234' "
启动导航与识别:
3-mission.sh 在这里
roslaunch track_tag usb_cam_with_calibration.launch 打开相机节点
roslaunch track_tag ar_track_camera.launch 启动二维码识别节点
rosrun robot_voice tts_subscribe; exec bash 语音播报节点
robot_slam/launch/multi_goal.launch 修改导航的目标点的坐标值
robot_slam/scripts/ navigation_multi_goals.py 修改对应id分别走到哪个点
--------------------------------------------------------------------------------------把官方给的代码放到 src\robot_slam\scripts 里面
--------------------1. 自主巡航------------------------------
修改导航的目标点的位姿: robot_slam/launch/multi_goal.launch
X Y Yaw 一列为一组值 ,一一对应(分别表示goal[0] ...goal[1]), Yaw是角度制,90.0表示逆时针旋转90度(正值向左)识别:(视频的第35分钟)
roslaunch usb_cam usb_cam_test.launch 打开相机
roslaunch find_object_2d find_object_2d6.launch 启动识别程序Edit -- Add object -- Take picture截图 --框选物体 --End --File --Save object 路径选择 abot_find/object/
然后对图片进行特殊命名(数字范围)
-------没有ar_cb函数py
--------------------2. 目标射击------------------------------user_demo/param/mission.yaml 修改射击目标点的相关参数
roslaunch usb_cam usb_cam_test.launch 打开相机
roslaunch find_object_2d find_object_2d6.launch 启动识别程序
rosrun robot_slam III.py 识别结果判断
rostopic echo /object_position跟踪标签:在6-mission.sh里有 ,
roslaunch track_tag usb_cam_with_calibration.launch
roslaunch track_tag ar_track_camera.launchrostopic echo /ar_pose_marker
然后运行官方给的代码 rosrun robot_slam .py ,需要把代码整合起来,能够识别三种目标并射击
启动代码前一定要插上炮台的USB串口线,不然运行就会报错没有串口 /dev/shoot
记得打开炮台开关
---------------------------------------------------------------------------
查看坐标点
运行navigation.sh脚本前注释掉最后一行 ,在打开的地图里点击目标点前 运 rostopic echo /move_base_simple/goal
在导航地图中使用RViz中的navigation goal标定目标后,到终端的输出查看pose 字段,里面有x,y目标点
直接拿迟来量坐标比较快,单位是米,搞懂ros坐标系编译及运行--------------------------------------------------------------------
catkin_make
catkin_make -DCATKIN_WHITELIST_PACKAGES="robot_slam"source devel/setup.bash
source /opt/ros/melodic/setup.bash
参加比赛要注重交流,从比赛中获得友情,知识和实践,面对困难永不放弃的决心,不要把奖项看的那么重要。
在小车的主机里插入鼠标,连接WIFI,使用屏幕键盘输入密码,剩下的交给远程控制。
同一局域网下ssh传输文件:
无论是windows还是ubuntu,都可以互传文件
同一局域网多人连接:
一个主要的人负责用向日葵远程控制小车,进行调试
一个次要的人负责使用ssh连接,在里面写代码,查看文档
等调完半小时,换另一个远程控制调车。
(Vscode的ssh远程连接修改代码)(或者,在虚拟机里ssh连接小车主机<加Y参数 ssh -Y IP>,在终端里执行 sudo nautilus 打开并编辑文件管理器)
功能包重名,就修改launch文件名区别开,如过.sh脚本运行报错,单独分开命令运行试试,记得source自己的工作空间
复制别人的工作空间,需要重新编译,不然setup.bash还是用的原来的,串到原来的代码
编译:
catkin_make # 若失败,删除build目录和devel目录试试
catkin_make -DCATKIN_WHITELIST_PACKAGES="robot_slam"
catkin build 包名
Ctrl+h 修改环境变量.bashrc
......
相关文章:
![](https://i-blog.csdnimg.cn/direct/12facf75f15844a1a0d767662ba84f7a.png)
自主巡航,目标射击
中国机器人及人工智能大赛 参赛经验: 自主巡航赛道 【机器人和人工智能——自主巡航赛项】动手实践篇-CSDN博客 主要逻辑代码 #!/usr/bin/env python #coding: utf-8import rospy from geometry_msgs.msg import Point import threading import actionlib impor…...
![](https://www.ngui.cc/images/no-images.jpg)
MySQL中EXPLAIN关键字详解
昨天领导突然问到,MySQL中explain获取到的type字段中index和ref的区别是什么。 这两种状态都是在使用索引后产生的,但具体区别却了解不多,只知道ref相比于index效率更高。 因此,本文较为详细地记录了MySQL性能中返回字段的含义、状…...
![](https://www.ngui.cc/images/no-images.jpg)
如何理解ref toRef和toRefs
是什么 ref 生成值类型的响应式数据可用于模板和reactive通过.value修改值 ref也可以像vue2中的ref那样使用 toRef 针对一个响应式对象(reactive)的prop创建一个ref两者保持引用关系 toRefs 将响应式对象(reactive封装)转换…...
![](https://www.ngui.cc/images/no-images.jpg)
【linux】kernel-trace
文章目录 linux kernel trace配置trace内核配置trace接口使用通用配置Events配置Function配置Function graph配置Stack trace设置 跟踪器tracer功能描述 使用示例1.irqsoff2.preemptoff3.preemptirqsoff linux kernel trace 配置 源码路径: kernel/trace trace内…...
![](https://www.ngui.cc/images/no-images.jpg)
【Golang 面试基础题】每日 5 题(一)
✍个人博客:Pandaconda-CSDN博客 📣专栏地址:http://t.csdnimg.cn/UWz06 📚专栏简介:在这个专栏中,我将会分享 Golang 面试中常见的面试题给大家~ ❤️如果有收获的话,欢迎点赞👍收藏…...
![](https://www.ngui.cc/images/no-images.jpg)
ETCD介绍以及Go语言中使用ETCD详解
ETCD介绍以及Go语言中使用ETCD详解 什么是etcd ETCD是一个分布式、可靠的key-value存储的分布式系统,用于存储分布式系统中的关键数据;当然,它不仅仅用于存储,还提供配置共享及服务发现;基于Go语言实现 。 etcd的特点 完全复制:集群中的每个节点都可以使用完整的存档高…...
![](https://i-blog.csdnimg.cn/direct/0904019666e7498daa5337795df99ccd.png)
03-用户画像+Elasticsearch
优点 es支持海量数据的写入和更新es可以和hadoop,hive及spark进行集成es支持hivesql的操作,可以通过hivesql将数据导入eses的在进行数据检索查询是速度比较快es是分布式存储 应用 全文检索 全文检索流程: 1-对文档数据(文本数据)进行分词 2-将分词…...
![](https://i-blog.csdnimg.cn/direct/bd5ef263c498472790c3b3eef3a52f5b.png)
初学Mybatis之搭建项目环境
在连接 mysql 数据库时,遇到了个 bug,之前都能连上,但报错说换了个 OS 操作系统什么的 然后搜索怎么连接,找到了解决方法 MySQL MYSQL – 无法连接到本地MYSQL服务器 (10061)|极客教程 (geek-docs.com) 命令行输入 services.msc…...
![](https://i-blog.csdnimg.cn/direct/d1926a4f6fa847f992391abbdb7385e6.png)
JMeter使用小功能-(持续更新)
1、jmeter在同一个线程组内,uuid的复用 方式一: 方式二: 2、获得jMeter使用的线程总数 ctx.getThreadGroup().getNumberOfThreads()来表示活动线程总数 int threadNumctx.getThreadGroup().getNumThreads(); String threads Integer…...
![](https://www.ngui.cc/images/no-images.jpg)
科研绘图系列:R语言火山图(volcano plot)
介绍 火山图(Volcano Plot),也称为火山图分析,是一种在生物信息学和基因组学中常用的图形表示方法,主要用于展示基因表达数据的差异。它通常用于基因表达微阵列或RNA测序数据的可视化,帮助研究人员识别在不同条件下表达差异显著的基因。 火山图的基本构成 X轴:通常表示…...
![](https://i-blog.csdnimg.cn/direct/8e9fb9e753a948bf937d881159193c27.png)
docker firewalld 防火墙设置
1、环境 centos 7 firewalld docker-ce docker 默认会更改防护墙配置 导致添加的防火墙策略不生效,可以启用firewalld 重新设置策略 2、启用防火墙 systemctl start firewalld systemctl enable firewalld3、配置文件禁用docker 的iptables /etc/docker/daemon.js…...
![](https://img-blog.csdnimg.cn/img_convert/fab25351c6179d8b96e1cd1e127cc756.png)
《问题004:报错-JS问题-unknown: Invalid shorthand property initializer.》
问题描述: unknown: Invalid shorthand property initializer. (25:13) unknown:无效的简写属性初始化项 解决方法: “”应该写为“:”(globalData 改成 globalData: )...
![](https://www.ngui.cc/images/no-images.jpg)
什么是 MLPerf?
什么是 MLPerf? MLPerf 是一个用于衡量机器学习硬件、软件和服务性能的标准化基准测试平台。它由 MLCommons 组织开发,该组织是由多家领先的科技公司和学术机构组成的。MLPerf 的目标是通过一系列标准化的基准测试任务和数据集,提供一个统一…...
![](https://www.ngui.cc/images/no-images.jpg)
【SpringBoot】第3章 SpringBoot的系统配置
3.1 系统配置文件 3.1.1 application.properties SpringBoot支持两种不同格式的配置文件,一种是Properties,一种是YML。 SpringBoot默认使用application.properties作为系统配置文件,项目创建成功后会默认在resources目录下生成applicatio…...
![](https://i-blog.csdnimg.cn/direct/984ce14762064497916bf72b30b5ce30.png)
ELK日志分析系统部署文档
一、ELK说明 ELK是Elasticsearch(ES) Logstash Kibana 这三个开源工具组成,官方网站: The Elastic Search AI Platform — Drive real-time insights | Elastic 简单的ELK架构 ES: 是一个分布式、高扩展、高实时的搜索与数据分析引擎。它…...
![](https://i-blog.csdnimg.cn/direct/5b230d22e3a24cc8bee2de140d2c324c.png)
ue5笔记
1 点光源 聚光源 矩形光源 参数比较好理解 (窗口里面)环境光混合器:快速创造关于环境光的组件 大气光源:太阳光,定向光源 天空大气:蓝色的天空和大气 高度雾:大气下面的高度感的雾气 体积…...
![](https://i-blog.csdnimg.cn/direct/5c63f53ae43b46d1a5a6af9491f504ba.png)
TCP重传机制详解
1.什么是TCP重传机制 在 TCP 中,当发送端的数据到达接收主机时,接收端主机会返回⼀个确认应答消息,表示已收到消息。 但是如果传输的过程中,数据包丢失了,就会使⽤重传机制来解决。TCP的重传机制是为了保证数据传输的…...
![](https://www.ngui.cc/images/no-images.jpg)
如何使用javascript将商品添加到购物车?
使用JavaScript将商品添加到购物车可以通过以下步骤实现: 创建一个购物车对象,可以是一个数组或者对象,用于存储添加的商品信息。在网页中的商品列表或详情页面,为每个商品添加一个“添加到购物车”的按钮,并为按钮绑…...
![](https://img-blog.csdnimg.cn/img_convert/912458b58932012c1128d52000fda994.png)
【MySQL】:想学好数据库,不知道这些还想咋学
客户端—服务器 客户端是一个“客户端—服务器”结构的程序 C(client)—S(server) 客户端和服务器是两个独立的程序,这两个程序之间通过“网络”进行通信(相当于是两种角色) 客户端 主动发起网…...
![](https://www.ngui.cc/images/no-images.jpg)
1.关于linux的命令
1.关于文件安装的问题 镜像站点服务器:cat /etc/apt/sources.list 索引文件:cd /var/lib/apt/lists 下载文件包存在的路径:cd /etc/cache/apt/archives/2.关于dpkg文件安装管理器的应用: 安装文件:sudo dpkg -i 文件名; 查找文件目录:sudo …...
![](https://i-blog.csdnimg.cn/direct/e50b730d5dba42a9bc449e8c84c9c1cf.png)
【人工智能】机器学习 -- 决策树(乳腺肿瘤数)
目录 一、使用Python开发工具,运行对iris数据进行分类的例子程序dtree.py,熟悉sklearn机器实习开源库。 二、登录https://archive-beta.ics.uci.edu/ 三、使用sklearn机器学习开源库,使用决策树对breast-cancer-wisconsin.data进行分类。 …...
![](https://img-blog.csdnimg.cn/img_convert/d56a169288c163c8e749cf16685d3e46.png)
【proteus经典实战】LCD滚动显示汉字
一、简介 Proteus是一款功能丰富的电子设计和仿真软件,它允许用户设计电路图、进行PCB布局,并在虚拟环境中测试电路功能。这款软件广泛应用于教育和产品原型设计,特别适合于快速原型制作和电路设计教育。Proteus的3D可视化功能使得设计更加直…...
![](https://www.ngui.cc/images/no-images.jpg)
数据结构复习1
1、什么是集合? 就是一组数据的集合体,就像篮子装着苹果、香蕉等等,这些“水果”就代表数据,“篮子”就是这个集合。 集合的特点: 集合用于存储对象。 对象是确定的个数可以用数组,如果不确定可以用集合…...
![](https://www.ngui.cc/images/no-images.jpg)
订单管理系统需求规范
1. 引言 1.1 目的 本文档旨在明确描述订单管理系统的功能、非功能性需求以及约束条件,以指导系统的分析、设计、开发、测试和部署。 1.2 范围 本系统将支持在线订单处理,从客户下单到完成配送的全过程管理,包括库存管理、支付处理、订单跟…...
![](https://i-blog.csdnimg.cn/direct/d5cf100fc5e24fb6ae3d3b3360981421.gif)
swiftui使用ScrollView实现左右滑动和上下滑动的效果,仿小红书页面
实现的效果如果所示,顶部的关注用户列表可以左右滑动,中间的内容区域是可以上下滚动的效果,点击顶部的toolbar也可以切换关注/发现/附近不同页面,实现翻页效果。 首页布局 这里使用了NavigationStack组件和tabViewStyle样式配置…...
![](https://www.ngui.cc/images/no-images.jpg)
深入理解并使用 MySQL 的 SUBSTRING_INDEX 函数
引言 在处理字符串数据时,经常需要根据特定的分隔符来分割字符串或提取字符串的特定部分。MySQL 提供了一个非常有用的函数 SUBSTRING_INDEX 来简化这类操作。本文将详细介绍 SUBSTRING_INDEX 的使用方法、语法,以及通过实际案例来展示其在数据库查询中…...
![](https://i-blog.csdnimg.cn/direct/10b1445f118f43b9b42feb2341570588.png)
elementUI在手机端使用遇到的问题总结
之前的博客有写过用vue2elementUI封装手机端选择器picker组件,支持单选、多选、远程搜索多选,最终真机调试的时候发现有很多细节样式需要调整。此篇博客记录下我调试过程中遇到的问题和解决方法。 一、手机真机怎么连电脑本地代码调试? 1.确…...
![](https://i-blog.csdnimg.cn/direct/c742c0ebafea4af08ee037a5c69d5a3f.png#pic_center)
【初阶数据结构】5.栈和队列
文章目录 1.栈1.1 概念与结构1.2 栈的实现2.队列2.1 概念与结构2.2 队列的实现3.栈和队列算法题3.1 有效的括号3.2 用队列实现栈3.3 用栈实现队列3.4 设计循环队列 1.栈 1.1 概念与结构 栈:一种特殊的线性表,其只允许在固定的一端进行插入和删除元素操…...
![](https://i-blog.csdnimg.cn/direct/f53b9a8aeef94191a61ed2e88243164d.png)
高通Android 12 设置Global属性为null问题
1、最近在做app调用framework.jar需求,尝试在frameworks/base/packages/SettingsProvider/res/values/defaults.xml增加属性 <integer name"def_xxxxx">1</integer> 2、在frameworks\base\packages\SettingsProvider\src\com\android\provide…...
![](https://www.ngui.cc/images/no-images.jpg)
Xcode代码静态分析:构建无缺陷代码的秘诀
Xcode代码静态分析:构建无缺陷代码的秘诀 在软件开发过程中,代码质量是至关重要的。Xcode作为Apple的官方集成开发环境(IDE),提供了强大的代码静态分析工具,帮助开发者在编写代码时发现潜在的错误和问题。…...
![](/images/no-images.jpg)
手机网站制作案例/5118站长工具
由于原有的方法无法处理两个日期在不同月份的情况,现更新LaTaio的方法如下:// 摘要: // 获取此实例所表示的日期为该月中的第几天。 // // 返回结果: // 日组成部分,表示为 1 和 31 之间的一个值。 public int Day { get; } 这个方法可能更直…...
![](/images/no-images.jpg)
中国招标网官方网站/企业网络营销策划方案
/** Created by SharpDevelop. * User: noo * Date: 2009-8-16 * Time: 14:50 * * 抽象类 */usingSystem ;abstractclassAA//等同于 internal abstract class A,类只能在当前项目中访问,不能实例化(无构造函数),…...
![](/images/no-images.jpg)
艺术设计教学资源网站建设标准/世界球队最新排名
一、处理JSON 1、将JavaScript数据转换为JSON对象(序列化) JSON.stringify(Object)2、将JSON数据转换为JavaScript对象(逆序列化) JSON.parse(stringJSON)二、Buffer模块缓冲数据(使用两位16进制表示一字节) 1、创建缓冲区 Buffer.from(array): returns …...
![](https://img-blog.csdnimg.cn/img_convert/225287cb41318e657210166cfd1236f1.png)
清远网站制作/网站搭建外贸
真的很想吐槽一下李航老师后面的附录,看的我是云头雾里,上网查了很多资料才搞懂。 这篇文章主要讲解牛顿法和拟牛顿法一些算法思路上的由来,作为附录的补充,具体算法细节可以参考那本书1.牛顿法首先你需要知道的是牛顿法本身是一个…...
![](https://img.mp.sohu.com/upload/20170806/dee50163615c47b39a3f8c035338c0eb_th.png)
深圳石岩建网站/优化大师手机版下载
今日头条自媒体运营推广视频教程学习资料短视频运营从零到精通今日头条趣东方头条凤凰新浪看点网易企鹅UC大鱼一点资讯自媒体快传视频处理软件今日头条推广视频教程自媒体推广短视频教程今日头条引流小白入门视频解析下载支持今日头条快手抖音火山映客陌陌西瓜美拍微博等快手今…...
![](/images/no-images.jpg)
网站建设初期目标/关键词优化排名软件
来于:http://segmentfault.com/q/1010000000422506 没有缓冲区时,每次读取操作都会导致一次文件读取操作(就是告诉操作系统内核我要读这个文件的这个部分,麻烦你帮我把它取过来)。有缓冲区时,会一次性读取…...