当前位置: 首页 > news >正文

ROS Turtlebot3多机器人编队导航仿真

文章目录

  • 前言
  • 一、Gzazebo中加载多台Turtlebot3机器人
  • 二、RVIZ中加载多个Turtlebot3机器人
  • 三.多机器人编队导航
  • 总结


前言

前面已经实现了在gazebo仿真环境中机器人一字型编队、三角形编队、N字型编队等仿真,接下来考虑多机器人编队在编队行进过程中的避障问题,通过在RVIZ中加载多个机器人使他们能分别进行全局和局部路径规划,来进行避障。


一、Gzazebo中加载多台Turtlebot3机器人

在前面的文章中也提到过在gazebo仿真环境中加载多个机器人主要是修改启动gazebo仿真环境的launch文件。
原Turtlebot3 launch文件

<launch><env name="GAZEBO_RESOURCE_PATH" value="$(find turtlebot3_gazebo)/models/turtlebot3_autorace/ground_picture" /><arg name="x_pos" default="0.245"/><arg name="y_pos" default="-1.787"/><arg name="z_pos" default="0"/>  <include file="$(find gazebo_ros)/launch/empty_world.launch"><arg name="world_name" value="$(find turtlebot3_gazebo)/worlds/turtlebot3_autorace.world" /><arg name="paused" value="false"/><arg name="use_sim_time" value="true"/><arg name="gui" value="true"/><arg name="headless" value="false"/><arg name="debug" value="false"/></include>  <param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_burger_for_autorace.urdf.xacro" /><node pkg="gazebo_ros" type="spawn_model" name="spawn_urdf" args="-urdf -model turtlebot3_burger -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos) -param robot_description" /></launch>

添加多台机器人的launch文件

<?xml version="1.0"?>
<launch><arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/><arg name="first_tb3"  default="tb3_0"/><arg name="second_tb3" default="tb3_1"/><arg name="third_tb3"  default="tb3_2"/><arg name="first_tb3_x_pos" default=" 0.0"/><arg name="first_tb3_y_pos" default=" 0.0"/><arg name="first_tb3_z_pos" default=" 0.0"/><arg name="first_tb3_yaw"   default=" 0.0"/><arg name="second_tb3_x_pos" default=" -1.0"/><arg name="second_tb3_y_pos" default=" 0.0"/><arg name="second_tb3_z_pos" default=" 0.0"/><arg name="second_tb3_yaw"   default=" 0.0"/><arg name="third_tb3_x_pos" default=" -2.0"/><arg name="third_tb3_y_pos" default=" 0.0"/><arg name="third_tb3_z_pos" default=" 0.0"/><arg name="third_tb3_yaw"   default=" 0.0"/><include file="$(find gazebo_ros)/launch/empty_world.launch"><arg name="world_name" value="$(find turtlebot3_gazebo)/worlds/cloister.world"/><arg name="paused" value="false"/><arg name="use_sim_time" value="true"/><arg name="gui" value="true"/><arg name="headless" value="false"/><arg name="debug" value="false"/></include>  <group ns = "$(arg first_tb3)"><param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" /><node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"><param name="publish_frequency" type="double" value="50.0" /><param name="tf_prefix" value="$(arg first_tb3)" /></node><node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg first_tb3) -x $(arg first_tb3_x_pos) -y $(arg first_tb3_y_pos) -z $(arg first_tb3_z_pos) -Y $(arg first_tb3_yaw) -param robot_description" /></group><group ns = "$(arg second_tb3)"><param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" /><node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"><param name="publish_frequency" type="double" value="50.0" /><param name="tf_prefix" value="$(arg second_tb3)" /></node><node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg second_tb3) -x $(arg second_tb3_x_pos) -y $(arg second_tb3_y_pos) -z $(arg second_tb3_z_pos) -Y $(arg second_tb3_yaw) -param robot_description" /></group><group ns = "$(arg third_tb3)"><param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" /><node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"><param name="publish_frequency" type="double" value="50.0" /><param name="tf_prefix" value="$(arg third_tb3)" /></node><node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg third_tb3) -x $(arg third_tb3_x_pos) -y $(arg third_tb3_y_pos) -z $(arg third_tb3_z_pos) -Y $(arg third_tb3_yaw) -param robot_description" /></group></launch>

对比发现,修改后的launch文件增加了三个tb3的ns属性,并为其设置了初始位姿,设置了ns属性后才使得每个仿真小车发布带有对应属性的节点名称,例如/tb3_0/odom、/tb3_0/base_link、/tb3_1/odom、/tb3_1/base_link。这样能防止TF树错乱而导致的运行出错。

二、RVIZ中加载多个Turtlebot3机器人

与Gazebo中加载多个Turtlebot3机器人相比,RVIZ需要修改的内容多了些。首先修改turtlebot3_navigation.launch
原文件:

<launch><!-- Arguments --><arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/><arg name="map_file" default="$(find turtlebot3_navigation)/maps/map.yaml"/><arg name="open_rviz" default="true"/><arg name="move_forward_only" default="false"/><!-- Turtlebot3 --><include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch"><arg name="model" value="$(arg model)" /></include><!-- Map server --><node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)"/><!-- AMCL --><include file="$(find turtlebot3_navigation)/launch/amcl.launch"/><!-- move_base --><include file="$(find turtlebot3_navigation)/launch/move_base.launch"><arg name="model" value="$(arg model)" /><arg name="move_forward_only" value="$(arg move_forward_only)"/></include><!-- rviz --><group if="$(arg open_rviz)"> <node pkg="rviz" type="rviz" name="rviz" required="true"args="-d $(find turtlebot3_navigation)/rviz/turtlebot3_navigation.rviz"/></group>
</launch>

修改后:

<launch><!-- Arguments --><arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/><arg name="open_rviz" default="true"/><arg name="move_forward_only" default="false"/><arg name="first_tb3"  default="tb3_0"/><arg name="second_tb3" default="tb3_1"/><arg name="third_tb3"  default="tb3_2"/><!-- Map server --><arg name="map_file" default="$(find turtlebot3_navigation)/maps/cloister_gmapping.yaml"/><node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)"/><group ns = "$(arg first_tb3)"><!-- Map server --><node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)"/><!-- Turtlebot3 --><include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch"><arg name="model" value="$(arg model)" /><arg name="multi_robot_name" value="$(arg first_tb3)" /></include><arg name="first_tb3_x_pos" default="0.0"/><arg name="first_tb3_y_pos" default="0.0"/><arg name="first_tb3_z_pos" default="0.0"/><!-- AMCL --><include file="$(find turtlebot3_navigation)/launch/multi_amcl.launch"><arg name="global_frame_id" value="map"/><arg name="odom_frame_id"   value="$(arg first_tb3)/odom"/><arg name="base_frame_id"   value="$(arg first_tb3)/base_footprint"/> <arg name="initial_pose_x" value="$(arg first_tb3_x_pos)"/><arg name="initial_pose_y" value="$(arg first_tb3_y_pos)"/><arg name="initial_pose_a" value="$(arg first_tb3_z_pos)"/></include><!-- move_base --><include file="$(find turtlebot3_navigation)/launch/multi_move_base.launch"><arg name="global_frame_id" value="map"/><arg name="odom_frame_id"   value="$(arg first_tb3)/odom"/><arg name="base_frame_id"   value="$(arg first_tb3)/base_footprint"/><arg name="odom_topic" value="/$(arg first_tb3)/odom" /><arg name="laser_topic" value="/$(arg first_tb3)/scan" /><arg name="cmd_vel_topic" value="/$(arg first_tb3)/cmd_vel" /><arg name="model" value="$(arg model)" /><arg name="move_forward_only" value="$(arg move_forward_only)"/></include>
</group><group ns = "$(arg second_tb3)"><!-- Map server --><node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)"/><!-- Turtlebot3 --><include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch"><arg name="model" value="$(arg model)" /><arg name="multi_robot_name" value="$(arg second_tb3)" /></include><arg name="second_tb3_x_pos" default="-1.0"/><arg name="second_tb3_y_pos" default="0.0"/><arg name="second_tb3_z_pos" default="0.0"/><!-- AMCL --><include file="$(find turtlebot3_navigation)/launch/multi_amcl.launch"><arg name="global_frame_id" value="map"/><arg name="odom_frame_id"   value="$(arg second_tb3)/odom"/><arg name="base_frame_id"   value="$(arg second_tb3)/base_footprint"/> <arg name="initial_pose_x" value="$(arg second_tb3_x_pos)"/><arg name="initial_pose_y" value="$(arg second_tb3_y_pos)"/><arg name="initial_pose_a" value="$(arg second_tb3_z_pos)"/></include><!-- move_base --><include file="$(find turtlebot3_navigation)/launch/multi_move_base.launch"><arg name="global_frame_id" value="map"/><arg name="odom_frame_id"   value="$(arg second_tb3)/odom"/><arg name="base_frame_id"   value="$(arg second_tb3)/base_footprint"/><arg name="odom_topic" value="/$(arg second_tb3)/odom" /><arg name="laser_topic" value="/$(arg second_tb3)/scan" /><arg name="cmd_vel_topic" value="/$(arg second_tb3)/cmd_vel" /><arg name="model" value="$(arg model)" /><arg name="move_forward_only" value="$(arg move_forward_only)"/></include>
</group><group ns = "$(arg third_tb3)"><!-- Map server --><node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)"/><!-- Turtlebot3 --><include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch"><arg name="model" value="$(arg model)" /><arg name="multi_robot_name" value="$(arg third_tb3)" /></include><arg name="third_tb3_x_pos" default="-2.0"/><arg name="third_tb3_y_pos" default="0.0"/><arg name="third_tb3_z_pos" default="0.0"/><!-- AMCL --><include file="$(find turtlebot3_navigation)/launch/multi_amcl.launch"><arg name="global_frame_id" value="map"/><arg name="odom_frame_id"   value="$(arg third_tb3)/odom"/><arg name="base_frame_id"   value="$(arg third_tb3)/base_footprint"/> <arg name="initial_pose_x" value="$(arg third_tb3_x_pos)"/><arg name="initial_pose_y" value="$(arg third_tb3_y_pos)"/><arg name="initial_pose_a" value="$(arg third_tb3_z_pos)"/></include><!-- move_base --><include file="$(find turtlebot3_navigation)/launch/multi_move_base.launch"><arg name="global_frame_id" value="map"/><arg name="odom_frame_id"   value="$(arg third_tb3)/odom"/><arg name="base_frame_id"   value="$(arg third_tb3)/base_footprint"/><arg name="odom_topic" value="/$(arg third_tb3)/odom" /><arg name="laser_topic" value="/$(arg third_tb3)/scan" /><arg name="cmd_vel_topic" value="/$(arg third_tb3)/cmd_vel" /><arg name="model" value="$(arg model)" /><arg name="move_forward_only" value="$(arg move_forward_only)"/></include>
</group><!-- rviz --><group if="$(arg open_rviz)"> <node pkg="rviz" type="rviz" name="rviz" required="true"args="-d $(find turtlebot3_navigation)/rviz/turtlebot3_navWjx.rviz"/></group>
</launch>

turtlebot3_navigation.launch中引用的move_base.launch和amcl.launch文件也需要修改
move_base.launch
原文件:

<launch><!-- Arguments --><arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/><arg name="cmd_vel_topic" default="/cmd_vel" /><arg name="odom_topic" default="odom" /><arg name="move_forward_only" default="false"/><!-- move_base --><node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"><param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" /><rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="global_costmap" /><rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="local_costmap" /><rosparam file="$(find turtlebot3_navigation)/param/local_costmap_params.yaml" command="load" /><rosparam file="$(find turtlebot3_navigation)/param/global_costmap_params.yaml" command="load" /><rosparam file="$(find turtlebot3_navigation)/param/move_base_params.yaml" command="load" /><rosparam file="$(find turtlebot3_navigation)/param/dwa_local_planner_params_$(arg model).yaml" command="load" /><remap from="cmd_vel" to="$(arg cmd_vel_topic)"/><remap from="odom" to="$(arg odom_topic)"/><param name="DWAPlannerROS/min_vel_x" value="0.0" if="$(arg move_forward_only)" /></node>
</launch>

修改后(multi_move_base.launch):

<launch><!-- Arguments --><arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/><arg name="odom_frame_id"   default="odom"/><arg name="base_frame_id"   default="base_footprint"/><arg name="global_frame_id" default="map"/><arg name="cmd_vel_topic" default="/cmd_vel" /><arg name="odom_topic" default="odom" /><arg name="laser_topic" default="scan" /><arg name="move_forward_only" default="false"/><!-- move_base --><node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"><param name="base_global_planner" value="global_planner/GlobalPlanner"/><param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS"/><rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="global_costmap" /><rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="local_costmap" /><rosparam file="$(find turtlebot3_navigation)/param/local_costmap_params.yaml" command="load" /><rosparam file="$(find turtlebot3_navigation)/param/global_costmap_params.yaml" command="load" /><rosparam file="$(find turtlebot3_navigation)/param/move_base_params.yaml" command="load" /><rosparam file="$(find turtlebot3_navigation)/param/dwa_local_planner_params_$(arg model).yaml" command="load" /><!-- reset frame_id parameters using user input data --><param name="global_costmap/global_frame" value="$(arg global_frame_id)"/><param name="global_costmap/robot_base_frame" value="$(arg base_frame_id)"/><param name="local_costmap/global_frame" value="$(arg odom_frame_id)"/><param name="local_costmap/robot_base_frame" value="$(arg base_frame_id)"/><param name="global_costmap/obstacle_layer/scan/topic" value="$(arg laser_topic)"/><param name="local_costmap/obstacle_layer/scan/topic" value="$(arg laser_topic)"/><remap from="cmd_vel" to="$(arg cmd_vel_topic)"/><remap from="odom" to="$(arg odom_topic)"/><remap from="scan" to="$(arg laser_topic)"/><param name="DWAPlanner/min_vel_x" value="0.0" if="$(arg move_forward_only)" /></node>
</launch>

amcl.launch
原文件:

<launch><!-- Arguments --><arg name="scan_topic"     default="scan"/><arg name="initial_pose_x" default="0.0"/><arg name="initial_pose_y" default="0.0"/><arg name="initial_pose_a" default="0.0"/><!-- AMCL --><node pkg="amcl" type="amcl" name="amcl"><param name="min_particles"             value="500"/><param name="max_particles"             value="3000"/><param name="kld_err"                   value="0.02"/><param name="update_min_d"              value="0.20"/><param name="update_min_a"              value="0.20"/><param name="resample_interval"         value="1"/><param name="transform_tolerance"       value="0.5"/><param name="recovery_alpha_slow"       value="0.00"/><param name="recovery_alpha_fast"       value="0.00"/><param name="initial_pose_x"            value="$(arg initial_pose_x)"/><param name="initial_pose_y"            value="$(arg initial_pose_y)"/><param name="initial_pose_a"            value="$(arg initial_pose_a)"/><param name="gui_publish_rate"          value="50.0"/><remap from="scan"                      to="$(arg scan_topic)"/><param name="laser_max_range"           value="3.5"/><param name="laser_max_beams"           value="180"/><param name="laser_z_hit"               value="0.5"/><param name="laser_z_short"             value="0.05"/><param name="laser_z_max"               value="0.05"/><param name="laser_z_rand"              value="0.5"/><param name="laser_sigma_hit"           value="0.2"/><param name="laser_lambda_short"        value="0.1"/><param name="laser_likelihood_max_dist" value="2.0"/><param name="laser_model_type"          value="likelihood_field"/><param name="odom_model_type"           value="diff"/><param name="odom_alpha1"               value="0.1"/><param name="odom_alpha2"               value="0.1"/><param name="odom_alpha3"               value="0.1"/><param name="odom_alpha4"               value="0.1"/><param name="odom_frame_id"             value="odom"/><param name="base_frame_id"             value="base_footprint"/></node>
</launch>

修改后(multi_amcl.launch读入数据):

<launch><!-- Arguments --><arg name="use_map_topic"   default="true"/><arg name="scan_topic"     default="scan"/><arg name="initial_pose_x" default="0.0"/><arg name="initial_pose_y" default="0.0"/><arg name="initial_pose_a" default="0.0"/><arg name="odom_frame_id"   default="odom"/><arg name="base_frame_id"   default="base_footprint"/><arg name="global_frame_id" default="map"/><!-- AMCL --><node pkg="amcl" type="amcl" name="amcl"><param name="use_map_topic"             value="$(arg use_map_topic)"/><param name="min_particles"             value="500"/><param name="max_particles"             value="3000"/><param name="kld_err"                   value="0.02"/><param name="update_min_d"              value="0.20"/><param name="update_min_a"              value="0.20"/><param name="resample_interval"         value="1"/><param name="transform_tolerance"       value="0.5"/><param name="recovery_alpha_slow"       value="0.00"/><param name="recovery_alpha_fast"       value="0.00"/><param name="initial_pose_x"            value="$(arg initial_pose_x)"/><param name="initial_pose_y"            value="$(arg initial_pose_y)"/><param name="initial_pose_a"            value="$(arg initial_pose_a)"/><param name="gui_publish_rate"          value="50.0"/><remap from="scan"                      to="$(arg scan_topic)"/><param name="laser_max_range"           value="3.5"/><param name="laser_max_beams"           value="180"/><param name="laser_z_hit"               value="0.5"/><param name="laser_z_short"             value="0.05"/><param name="laser_z_max"               value="0.05"/><param name="laser_z_rand"              value="0.5"/><param name="laser_sigma_hit"           value="0.2"/><param name="laser_lambda_short"        value="0.1"/><param name="laser_likelihood_max_dist" value="2.0"/><param name="laser_model_type"          value="likelihood_field"/><param name="odom_model_type"           value="diff"/><param name="odom_alpha1"               value="0.1"/><param name="odom_alpha2"               value="0.1"/><param name="odom_alpha3"               value="0.1"/><param name="odom_alpha4"               value="0.1"/><param name="odom_frame_id"             value="$(arg odom_frame_id)"/> <param name="base_frame_id"             value="$(arg base_frame_id)"/> <param name="global_frame_id"           value="$(arg global_frame_id)"/></node>
</launch>

三.多机器人编队导航

多机器人编队的仿真在前面文章中叙述过:多机器人三角形编队的实现,编队的程序不需要修改,可以直接运行。
启动gazebo仿真环境(launch 自己的文件名):

roslaunch turtlebot3_gazebo multi3_turtlebot3.launch

在这里插入图片描述
启动导航节点(RVIZ)

roslaunch  turtlebot3_navigation turtlebot3_navigation

在这里插入图片描述启动编队程序:

roslaunch turtlebot3_teams_wang  turtlebot3_teams_follow_wang.launch

在这里插入图片描述
在这里插入图片描述在这里插入图片描述


总结

简单总结了Turtlebot3多机器人编队仿真,在实现的过程中需要对RVIZ仿真环境进行配置,这个花费了我很长时间,后面我会专门的写一下,主要是添加多个2D nav Goal/2D pose estimate,以及导航、laser、全局路径/局部路径话题的订阅。

相关文章:

ROS Turtlebot3多机器人编队导航仿真

文章目录 前言一、Gzazebo中加载多台Turtlebot3机器人二、RVIZ中加载多个Turtlebot3机器人三.多机器人编队导航总结 前言 前面已经实现了在gazebo仿真环境中机器人一字型编队、三角形编队、N字型编队等仿真&#xff0c;接下来考虑多机器人编队在编队行进过程中的避障问题&…...

端口配置错误,导致RabbitMq启动报错

SpringBoot启动&#xff0c;报错如下&#xff1a; 2023-11-19 01:33:43.030 UID[] [] [AMQP Connection 116.xxx.xx.xxx:15672] ERROR com.rabbitmq.client.impl.ForgivingExceptionHandler - An unexpected connection driver error occured java.net.SocketException: Sock…...

<MySQL> 什么是JDBC?如何使用JDBC进行编程?

目录 一、JDBC是什么&#xff1f; 二、JDBC常用接口和类 2.1 DataSource 2.2 Connection 2.3 Statement 2.4 ResultSet 三、JDBC的使用 3.1 获得数据库驱动包 3.2 添加到项目依赖 3.3 描述数据库服务器 3.4 建立数据库连接 3.6 执行SQL语句和接收返回数据 3.7 释放…...

基于安卓android微信小程序的装修家装小程序

项目介绍 巧匠家装小程序的设计主要是对系统所要实现的功能进行详细考虑&#xff0c;确定所要实现的功能后进行界面的设计&#xff0c;在这中间还要考虑如何可以更好的将功能及页面进行很好的结合&#xff0c;方便用户可以很容易明了的找到自己所需要的信息&#xff0c;还有系…...

基于SSM的小区物业管理系统设计与实现

末尾获取源码 开发语言&#xff1a;Java Java开发工具&#xff1a;JDK1.8 后端框架&#xff1a;SSM 前端&#xff1a;Vue 数据库&#xff1a;MySQL5.7和Navicat管理工具结合 服务器&#xff1a;Tomcat8.5 开发软件&#xff1a;IDEA / Eclipse 是否Maven项目&#xff1a;是 目录…...

c语言免杀火绒

文章目录 前记c加载器补充知识 前记 pyinstaller pyinstaller目前已经被杀疯了&#xff0c;简单打包一个hello a"hello" print(a)#pyinstaller -F -w b.py -n HipsMain.exe考虑Nuitka pip uninstall nuitka pip install nuitka pip install nuitka1.8.5 这里最新…...

MyBatis #{} 和 ${} 的区别

前言&#xff1a; #{} 和 ${} 的区别是 MyBatis 中一个常见的面试题&#xff0c;#{} 和 ${} 是MyBatis 中获取参数的两种方式&#xff0c;但我们在项目中大多数使用的都是 #{} 来获取参数&#xff0c;那么它们两个有什么区别呢&#xff1f; 区别 一. #{} 采用预编译 SQL&…...

计算机科学速成课

建议看看计算机科学速成课&#xff0c;一门很全面的计算机原理入门课程&#xff0c;短短10分钟可以把大学老师十几节课讲的东西讲清楚&#xff01;整个系列一共41个视频&#xff0c;B站上有中文字幕版。 每个视频都是一个特定的主题&#xff0c;例如软件工程、人工智能、操作系…...

基于单片机的汽车安全气囊系统故障仿真设计

**单片机设计介绍&#xff0c; 基于单片机微波炉加热箱系统设计 文章目录 一 概要二、功能设计设计思路 三、 软件设计原理图 五、 程序六、 文章目录 一 概要 基于单片机的汽车安全气囊系统的故障检测系统是一种用于检测安全气囊系统故障的智能化设备&#xff0c;通过单片机控…...

JPA整合Sqlite解决Dialect报错问题, 最新版Hibernate6

前言 我个人项目中&#xff0c;不想使用太重的数据库&#xff0c;而内嵌数据库中SQLite又是最受欢迎的&#xff0c; 因此决定采用这个数据库。 可是JPA并不支持Sqlite&#xff0c;这篇文章就是记录如何解决这个问题的。 原因 JPA屏蔽了底层的各个数据库差异&#xff0c; 但是…...

算法通关村第十关-青铜挑战快速排序

大家好我是苏麟,今天带来快速排序 . 快速排序 单边快速排序(lomuto 洛穆托分区方案) 单边循环 (lomuto分区) 要点 : 选择最右侧元素作为基准点j 找比基准点小的&#xff0c;i 找比基准点大的&#xff0c;一旦找到&#xff0c;二者进行交换。 交换时机: 找到小的&#xff0c…...

whisper large-v3 模型文件下载链接

#源码里找到的_MODELS {"tiny.en": "https://openaipublic.azureedge.net/main/whisper/models/d3dd57d32accea0b295c96e26691aa14d8822fac7d9d27d5dc00b4ca2826dd03/tiny.en.pt","tiny": "https://openaipublic.azureedge.net/main/whisp…...

Ajax 之XMLHttpRequest讲解

一直以来都听别人说Ajax,今天终于接触到了。。。。。。。。。。 一.什么是Ajax? 答: AJAX即“Asynchronous Javascript And XML”&#xff08;异步JavaScript和XML&#xff09;&#xff0c;是指一种创建交互式网页应用的网页开发技术。 AJAX 异步 JavaScript和XML&#x…...

小程序里面循环使用ref的话获取不到

文章目录 概要问题案例解决方法 概要 在小程序里面一般循环使用ref的话会获取不到 问题案例 //这个时自己封装的组件&#xff0c;然后循环使用 <jilianXuanzhe huoqu"huoqu" :ref"jilianXuanzhe i"></jilianXuanzhe>//如果这样使用的话获取…...

PY32F002B从压缩包到实现串口printf输出

最近学习使用芯领的PY32F002B开发板&#xff0c;记录学习历程供有同样需求的人参考。 本文主要讲述利用开发板实现printf语句串口输出。 开发环境的初步搭建 官方提供了一个压缩文件&#xff0c;文件名py32f002B_231026.zip&#xff0c; 链接&#xff1a;https://pan.baidu.c…...

音视频项目—基于FFmpeg和SDL的音视频播放器解析(八)

介绍 在本系列&#xff0c;我打算花大篇幅讲解我的 gitee 项目音视频播放器&#xff0c;在这个项目&#xff0c;您可以学到音视频解封装&#xff0c;解码&#xff0c;SDL渲染相关的知识。您对源代码感兴趣的话&#xff0c;请查看基于FFmpeg和SDL的音视频播放器 如果您不理解本…...

CorelDRAW2024最新版本的图形设计软件

CorelDRAW2024是Corel公司推出的最新版本的图形设计软件。CorelDRAW是一款功能强大的矢量图形编辑工具&#xff0c;被广泛用于图形设计、插图、页面布局、照片编辑和网页设计等领域。 1. 新增的设计工具&#xff1a;CorelDRAW 2024引入了一些全新的设计工具&#xff0c;使用户能…...

【作业】操作系统实验一:进程和线程

文章目录 实验内容一、进程的创建1、编辑源程序2、编辑结果3、编译和运行程序4、解释运行结果 二、进程共享1、运行2、解释运行结果 三、进程终止1、运行2、解释运行结果 四、进程同步1、运行2、解释运行结果 五、Linux中子进程映像的重新装入1、运行2、解释运行结果 六、线程1…...

Linux 环境删除Conda

你可以按照以下步骤操作来删除Conda&#xff1a; 首先&#xff0c;停止所有conda环境。在终端中运行以下命令&#xff1a; conda deactivate然后使用以下命令获取conda安装的路径&#xff1a; which conda如果成功安装了conda&#xff0c;该命令输出的路径应该是类似于这样的&a…...

uni-app(1)pages. json和tabBar

第一步 在HBuilderX中新建项目 填写项目名称、确定目录、选择模板、选择Vue版本&#xff1a;3、点击创建 第二步 配置pages.json文件 pages.json是一个非常重要的配置文件&#xff0c;它用于配置小程序的页面路径、窗口表现、导航条样式等信息。 右键点击pages&#xff0c;按…...

超短脉冲激光自聚焦效应

前言与目录 强激光引起自聚焦效应机理 超短脉冲激光在脆性材料内部加工时引起的自聚焦效应&#xff0c;这是一种非线性光学现象&#xff0c;主要涉及光学克尔效应和材料的非线性光学特性。 自聚焦效应可以产生局部的强光场&#xff0c;对材料产生非线性响应&#xff0c;可能…...

【WiFi帧结构】

文章目录 帧结构MAC头部管理帧 帧结构 Wi-Fi的帧分为三部分组成&#xff1a;MAC头部frame bodyFCS&#xff0c;其中MAC是固定格式的&#xff0c;frame body是可变长度。 MAC头部有frame control&#xff0c;duration&#xff0c;address1&#xff0c;address2&#xff0c;addre…...

(二)原型模式

原型的功能是将一个已经存在的对象作为源目标,其余对象都是通过这个源目标创建。发挥复制的作用就是原型模式的核心思想。 一、源型模式的定义 原型模式是指第二次创建对象可以通过复制已经存在的原型对象来实现,忽略对象创建过程中的其它细节。 📌 核心特点: 避免重复初…...

涂鸦T5AI手搓语音、emoji、otto机器人从入门到实战

“&#x1f916;手搓TuyaAI语音指令 &#x1f60d;秒变表情包大师&#xff0c;让萌系Otto机器人&#x1f525;玩出智能新花样&#xff01;开整&#xff01;” &#x1f916; Otto机器人 → 直接点明主体 手搓TuyaAI语音 → 强调 自主编程/自定义 语音控制&#xff08;TuyaAI…...

前端开发面试题总结-JavaScript篇(一)

文章目录 JavaScript高频问答一、作用域与闭包1.什么是闭包&#xff08;Closure&#xff09;&#xff1f;闭包有什么应用场景和潜在问题&#xff1f;2.解释 JavaScript 的作用域链&#xff08;Scope Chain&#xff09; 二、原型与继承3.原型链是什么&#xff1f;如何实现继承&a…...

华硕a豆14 Air香氛版,美学与科技的馨香融合

在快节奏的现代生活中&#xff0c;我们渴望一个能激发创想、愉悦感官的工作与生活伙伴&#xff0c;它不仅是冰冷的科技工具&#xff0c;更能触动我们内心深处的细腻情感。正是在这样的期许下&#xff0c;华硕a豆14 Air香氛版翩然而至&#xff0c;它以一种前所未有的方式&#x…...

QT3D学习笔记——圆台、圆锥

类名作用Qt3DWindow3D渲染窗口容器QEntity场景中的实体&#xff08;对象或容器&#xff09;QCamera控制观察视角QPointLight点光源QConeMesh圆锥几何网格QTransform控制实体的位置/旋转/缩放QPhongMaterialPhong光照材质&#xff08;定义颜色、反光等&#xff09;QFirstPersonC…...

STM32HAL库USART源代码解析及应用

STM32HAL库USART源代码解析 前言STM32CubeIDE配置串口USART和UART的选择使用模式参数设置GPIO配置DMA配置中断配置硬件流控制使能生成代码解析和使用方法串口初始化__UART_HandleTypeDef结构体浅析HAL库代码实际使用方法使用轮询方式发送使用轮询方式接收使用中断方式发送使用中…...

Go语言多线程问题

打印零与奇偶数&#xff08;leetcode 1116&#xff09; 方法1&#xff1a;使用互斥锁和条件变量 package mainimport ("fmt""sync" )type ZeroEvenOdd struct {n intzeroMutex sync.MutexevenMutex sync.MutexoddMutex sync.Mutexcurrent int…...

Kubernetes 网络模型深度解析:Pod IP 与 Service 的负载均衡机制,Service到底是什么?

Pod IP 的本质与特性 Pod IP 的定位 纯端点地址&#xff1a;Pod IP 是分配给 Pod 网络命名空间的真实 IP 地址&#xff08;如 10.244.1.2&#xff09;无特殊名称&#xff1a;在 Kubernetes 中&#xff0c;它通常被称为 “Pod IP” 或 “容器 IP”生命周期&#xff1a;与 Pod …...