无人机避障——4D毫米波雷达Octomap从点云建立三维栅格地图

Octomap安装

sudo apt-get install ros-melodic-octomap-ros
sudo apt-get install ros-melodic-octomap-msgs
sudo apt-get install ros-melodic-octomap-server
sudo apt-get install ros-melodic-octomap-rviz-plugins
# map_server安装
sudo apt-get install ros-melodic-map-server

  启动rviz

roscore
rosrun rviz rviz

点击add,可以看到多了Octomap_rviz_plugins模组:

OccupancyGrid是显示三维概率地图,也就是octomap地图。OccupancyMap是显示二维占据栅格地图

从PCD创建PointCloud2点云话题并发布出去:

参考资料:

测试的test数据采用以下第一条博客的pcd测试数据

Octomap 在ROS环境下实时显示_octomap在ros环境下实时显示-飞天熊猫-CSDN博客

学习笔记:使用Octomap将点云地图pcd转换为三维栅格地图,并在rviz中可视化_octomap功能包-CSDN博客

创建点云发布话题的工作空间:

mkdir -p ~/publish_pointcloudtest/src        #使用系统命令创建工作空间目录
cd ~/publish_pointcloudtest/src
catkin_init_workspace           # ROS的工作空间初始化命令

在工作空间下放入以下两个文件:

octomap_mapping

octomap_server

资源下载:

https://github.com/OctoMap/octomap_mapping

src下创建cpp文件pointcloud_publisher.cpp

#include <iostream>
#include <string>
#include <stdlib.h>
#include <stdio.h>
#include <sstream>
#include <vector>#include <ros/ros.h>  
#include <pcl/point_cloud.h>  
#include <pcl_conversions/pcl_conversions.h>  
#include <sensor_msgs/PointCloud2.h>  
#include <pcl/io/pcd_io.h>#include <octomap_msgs/OctomapWithPose.h>
#include <octomap_msgs/Octomap.h>
#include <geometry_msgs/Pose.h>#include <octomap/octomap.h>
#include <octomap_msgs/Octomap.h>
#include <octomap_msgs/conversions.h>#include <geometry_msgs/TransformStamped.h>#define TESTCLOUDPOINTS 1  // 设置为 1 以测试点云发布,设置为 0 不测试
#define TESTOCTOTREE 0     // 设置为 1 以测试OctoMap发布,设置为 0 不测试int main (int argc, char **argv)  
{  std::string topic, path, frame_id;int hz = 5;  // 发布频率,单位 Hzros::init(argc, argv, "publish_pointcloud");  // 初始化ROS节点ros::NodeHandle nh;  // 创建节点句柄// 从参数服务器获取参数nh.param<std::string>("path", path, "/home/nvidia/publish_pointcloudtest/data/test.pcd");nh.param<std::string>("frame_id", frame_id, "map");nh.param<std::string>("topic", topic, "pointcloud_topic");nh.param<int>("hz", hz, 5);// 加载点云数据到pcl::PointCloud对象中pcl::PointCloud<pcl::PointXYZ> pcl_cloud; pcl::io::loadPCDFile(path, pcl_cloud);  // 从文件加载点云数据#if TESTCLOUDPOINTS  // 如果 TESTCLOUDPOINTS 定义为 1,则执行这部分代码ros::Publisher pcl_pub = nh.advertise<sensor_msgs::PointCloud2>(topic, 10);  // 创建Publisher对象,将点云数据发布到指定话题// 转换PCL点云到ROS下的 PointCloud2 类型sensor_msgs::PointCloud2 output;  pcl::toROSMsg(pcl_cloud, output);output.header.stamp = ros::Time::now();  // 设置时间戳output.header.frame_id = frame_id;  // 设置坐标系框架// 打印参数信息std::cout << "path = " << path << std::endl;std::cout << "frame_id = " << frame_id << std::endl;std::cout << "topic = " << topic << std::endl;std::cout << "hz = " << hz << std::endl;ros::Rate loop_rate(hz);  // 设置发布频率  while (ros::ok())  {  pcl_pub.publish(output);  // 发布 PointCloud2 数据ros::spinOnce();  // 处理所有回调函数loop_rate.sleep();  // 按照指定频率睡眠}
#endif#if TESTOCTOTREE  // 如果 TESTOCTOTREE 定义为 1,则执行这部分代码ros::Publisher octomap_pub = nh.advertise<octomap_msgs::Octomap>(topic, 1);  // 创建Publisher对象,将OctoMap数据发布到指定话题// 创建 octomap 对象,并设置其分辨率octomap::OcTree tree(0.1);  // 你可以根据需要调整分辨率// 将点云数据插入到 octomap 中for (const auto& point : pcl_cloud.points) {tree.updateNode(point.x, point.y, point.z, true);}// 发布OctoMap消息octomap_msgs::Octomap octomap_msg;octomap_msgs::fullMapToMsg(tree, octomap_msg);  // 转换为 OctoMap 消息// 设置 OctoMap 消息的头信息octomap_msg.header.stamp = ros::Time::now();octomap_msg.header.frame_id = frame_id;// 打印参数信息std::cout << "path = " << path << std::endl;std::cout << "frame_id = " << frame_id << std::endl;std::cout << "topic = " << topic << std::endl;std::cout << "hz = " << hz << std::endl;ros::Rate loop_rate(hz);  // 设置发布频率  while (ros::ok())  {  octomap_pub.publish(octomap_msg);  // 发布 OctoMap 数据ros::spinOnce();  // 处理所有回调函数loop_rate.sleep();  // 按照指定频率睡眠}
#endifreturn 0;  // 主函数返回值
}

代码中需要进行修改为自己的点云,后续相应都需要修改为自己的路径(自行修改)

nh.param<std::string>("path", path, "/home/nvidia/publish_pointcloudtest/data/test.pcd");

CMakeLists.txt

cmake_minimum_required(VERSION 3.0.2)
project(publish_pointcloud)## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packagesset(octomap_ros_DIR "/opt/ros/melodic/share/octomap_ros/cmake")find_package(catkin REQUIRED COMPONENTSroscppstd_msgssensor_msgsoctomap_msgsgeometry_msgsoctomap_ros
)
find_package(PCL REQUIRED)
find_package(octomap REQUIRED)## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()################################################
## Declare ROS messages, services and actions ##
################################################## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
##   your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
##   * add a build_depend tag for "message_generation"
##   * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
##   * If MSG_DEP_SET isn't empty the following dependency has been pulled in
##     but can be declared for certainty nonetheless:
##     * add a exec_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
##   * add "message_generation" and every package in MSG_DEP_SET to
##     find_package(catkin REQUIRED COMPONENTS ...)
##   * add "message_runtime" and every package in MSG_DEP_SET to
##     catkin_package(CATKIN_DEPENDS ...)
##   * uncomment the add_*_files sections below as needed
##     and list every .msg/.srv/.action file to be processed
##   * uncomment the generate_messages entry below
##   * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)## Generate messages in the 'msg' folder
# add_message_files(
#   FILES
#   Message1.msg
#   Message2.msg
# )## Generate services in the 'srv' folder
# add_service_files(
#   FILES
#   Service1.srv
#   Service2.srv
# )## Generate actions in the 'action' folder
# add_action_files(
#   FILES
#   Action1.action
#   Action2.action
# )## Generate added messages and services with any dependencies listed here
# generate_messages(
#   DEPENDENCIES
#   std_msgs
# )################################################
## Declare ROS dynamic reconfigure parameters ##
################################################## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file package.xml:
##   * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
##   * add "dynamic_reconfigure" to
##     find_package(catkin REQUIRED COMPONENTS ...)
##   * uncomment the "generate_dynamic_reconfigure_options" section below
##     and list every .cfg file to be processed## Generate dynamic reconfigure parameters in the 'cfg' folder
# generate_dynamic_reconfigure_options(
#   cfg/DynReconf1.cfg
#   cfg/DynReconf2.cfg
# )###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES my_pkg
#  CATKIN_DEPENDS roscpp std_msgs
#  DEPENDS system_lib
)###########
## Build ##
############# Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include${catkin_INCLUDE_DIRS}${PCL_INCLUDE_DIRS}${OCTOMAP_INCLUDE_DIRS}
)## Declare a C++ library
# add_library(${PROJECT_NAME}
#   src/${PROJECT_NAME}/my_pkg.cpp
# )## Add cmake target dependencies of the library
## as an example, code may need to be generated before libraries
## either from message generation or dynamic reconfigure
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(publish_pointcloud src/pointcloud_publisher.cpp)## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")## Add cmake target dependencies of the executable
## same as for the library above
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})## Specify libraries to link a library or executable target against
target_link_libraries(publish_pointcloud${catkin_LIBRARIES}${PCL_LIBRARIES}${OCTOMAP_LIBRARIES}
)#############
## Install ##
############## all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
# catkin_install_python(PROGRAMS
#   scripts/my_python_script
#   DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )## Mark executables for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
# install(TARGETS ${PROJECT_NAME}_node
#   RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
# install(TARGETS ${PROJECT_NAME}
#   ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#   RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
# )## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
#   DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
#   FILES_MATCHING PATTERN "*.h"
#   PATTERN ".svn" EXCLUDE
# )## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
#   # myfile1
#   # myfile2
#   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )#############
## Testing ##
############### Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_my_pkg.cpp)
# if(TARGET ${PROJECT_NAME}-test)
#   target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()## Add folders to be run by python nosetests
# catkin_add_nosetests(test)

package.xml

<?xml version="1.0"?>
<package format="2"><name>publish_pointcloud</name><version>0.0.0</version><description>The publish_pointcloud package</description><!-- One maintainer tag required, multiple allowed, one person per tag --><!-- Example:  --><!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> --><maintainer email="nvidia@todo.todo">nvidia</maintainer><!-- One license tag required, multiple allowed, one license per tag --><!-- Commonly used license strings: --><!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 --><license>TODO</license><!-- Url tags are optional, but multiple are allowed, one per tag --><!-- Optional attribute type can be: website, bugtracker, or repository --><!-- Example: --><!-- <url type="website">http://wiki.ros.org/point_publish</url> --><!-- Author tags are optional, multiple are allowed, one per tag --><!-- Authors do not have to be maintainers, but could be --><!-- Example: --><!-- <author email="jane.doe@example.com">Jane Doe</author> --><!-- The *depend tags are used to specify dependencies --><!-- Dependencies can be catkin packages or system dependencies --><!-- Examples: --><!-- Use depend as a shortcut for packages that are both build and exec dependencies --><!--   <depend>roscpp</depend> --><!--   Note that this is equivalent to the following: --><!--   <build_depend>roscpp</build_depend> --><!--   <exec_depend>roscpp</exec_depend> --><!-- Use build_depend for packages you need at compile time: --><!--   <build_depend>message_generation</build_depend> --><!-- Use build_export_depend for packages you need in order to build against this package: --><!--   <build_export_depend>message_generation</build_export_depend> --><!-- Use buildtool_depend for build tool packages: --><!--   <buildtool_depend>catkin</buildtool_depend> --><!-- Use exec_depend for packages you need at runtime: --><!--   <exec_depend>message_runtime</exec_depend> --><!-- Use test_depend for packages you need only for testing: --><!--   <test_depend>gtest</test_depend> --><!-- Use doc_depend for packages you need only for building documentation: --><!--   <doc_depend>doxygen</doc_depend> --><buildtool_depend>catkin</buildtool_depend><build_depend>roscpp</build_depend><build_depend>std_msgs</build_depend><build_export_depend>roscpp</build_export_depend><build_export_depend>std_msgs</build_export_depend><exec_depend>roscpp</exec_depend><exec_depend>std_msgs</exec_depend><!-- The export tag contains other, unspecified, tags --><export><!-- Other tools can request additional information be placed here --></export>
</package>

编译通过

记得在devel那边进行source

source devel/setup.bash
roscore
rosrun publish_pointcloud publish_pointcloud

查看下是否有话题,且可以打印出来 

rostopic list
rostopic echo /pointcloud_topic

 

然后打开终端打开rviz

rviz

将PointCloud2 添加进来,话题选择之前的点云话题

 

编写octomap_mapping.launch文件,launch文件在:

将frameid修改即可

<launch><node pkg="octomap_server" type="octomap_server_node" name="octomap_server"><param name="resolution" value="0.05" /><!-- fixed map frame (set to 'map' if SLAM or localization running!) --><param name="frame_id" type="string" value="map" /><!-- maximum range to integrate (speedup!) --><param name="sensor_model/max_range" value="5.0" /><!-- data source to integrate (PointCloud2) --><remap from="cloud_in" to="/pointcloud_topic" /></node>
</launch>

然后就可以运行launch文件了:

roslaunch octomap_server octomap_mapping.launch

总结上面所有的过程 :

1、改完代码后编译nvidia@Xavier-NX:~/publish_pointcloudtest$ catkin_make2、编译完后roscorenvidia@Xavier-NX:~$ roscore3、运行点云发布代码nvidia@Xavier-NX:~/publish_pointcloudtest$ rosrun publish_pointcloud publish_pointcloud4、运行rviz使其显示白色的点云nvidia@Xavier-NX:~$ rviz5、运行octomapnvidia@Xavier-NX:~/publish_pointcloudtest$ roslaunch octomap_server octomap_mapping.launch

上面的点云也是可以测试出来的,如第一张的图,最后用的自己4D毫米波雷达生成的点云也进行了测试,不过有些点云没能显示,后续还需要改进,估计跟坐标系的范围也有关系:

后续考虑实时动态,以及将其转换为二维栅格地图作为无人机的导航地图。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/462760.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【GIN】go-gin 中 validator 验证功能

文章目录 前言一、基础用法二、常用字段说明常用字段说明1. required2. len3. min 和 max4. gte 和 lte 、 gt 和 lt 、ne5. oneof6. email7. url 三、示例代码运行效果 总结 前言 在 Go 中使用 Gin 框架时&#xff0c;BindJSON 可以将 JSON 请求体中的数据绑定到结构体上&…

使用Jupyter Notebook进行数据科学项目

&#x1f493; 博客主页&#xff1a;瑕疵的CSDN主页 &#x1f4dd; Gitee主页&#xff1a;瑕疵的gitee主页 ⏩ 文章专栏&#xff1a;《热点资讯》 使用Jupyter Notebook进行数据科学项目 Jupyter Notebook 简介 安装 Jupyter Notebook 创建和管理 Notebook 编写和运行代码 示例…

【MyBatis源码】CacheKey缓存键的原理分析

文章目录 Mybatis缓存设计缓存KEY的设计CacheKey类主体CacheKey组成CacheKey如何保证缓存key的唯一性 Mybatis缓存设计 MyBatis 每秒过滤众多数据库查询操作&#xff0c;这对 MyBatis 缓存键的设计提出了很高的要求。MyBatis缓存键要满足以下几点。 无碰撞&#xff1a;必须保证…

一键式配置适合 Web 开发的Ubuntu系统

大家好&#xff0c;今天给大家分享一个专为Ubuntu设计的Web开发者配置方案Omakub。 项目介绍 Omakub是一个为开发者打造的、经过精心配置的 Ubuntu 环境项目&#xff0c;由 Ruby on Rails 的创造者 David Heinemeier Hansson&#xff08;DHH&#xff09;发起。目的是为了简化他…

Nginx安装配置详解

Nginx Nginx官网 Tengine翻译的Nginx中文文档 轻量级的Web服务器&#xff0c;主要有反向代理、负载均衡的功能。 能够支撑5万的并发量&#xff0c;运行时内存和CPU占用低&#xff0c;配置简单&#xff0c;运行稳定。 写在前 uWSGI与Nginx的关系 1. 安装 Windows 官网 Stabl…

数据库 二

一.数据认识 1.关系型 表与表的关系&#xff1a;核心表 mysql/oracle、SQLServer(微软) SQL 2.非关系型 redis--缓存数据库Map<k,v> NO-SQL&#xff1a;not only sql 二.关系型数据库(R) 1.客户端、数据库服务 2.库(database) CREATE DATABASE xxx_db;//创建库 DR…

开源OCR免费助力法律文档数字化,提升文档管理效率

一、在法律行业&#xff0c;每天需要处理大量纸质文件&#xff0c;从合同到判决书&#xff0c;手动录入不仅费时&#xff0c;还容易出错。为解决这一问题推出了一款免费开源的OCR智能识别平台&#xff0c;通过先进的光学字符识别&#xff08;OCR&#xff09;技术&#xff0c;将…

零售EDI:HornBach EDI 项目案例

HornBach 是一家总部位于德国的家居和建筑材料零售商&#xff0c;成立于1968年。它以大型仓储式商店而闻名&#xff0c;提供广泛的产品&#xff0c;包括建筑材料、园艺、家居装饰和工具等。 近期我们帮助HornBach的供应商W公司成功实现了与HornBach的EDI直连&#xff0c;除了满…

jupyter如何切换内核

01、写在前面 Jupyter是一个开源的交互式笔记本工具&#xff0c;支持多种编程语言&#xff0c;包括Python、R、Julia 等。它最初是作为IPython 笔记本的一个分支而开发的&#xff0c;后来逐渐发展成为一个独立的项目。Jupyter的名字来源于它支持的三种编程语言&#xff1a;Juli…

STM32ZET6-USART使用

一、原理说明 STM32自带通讯接口 通讯目的 通信方式&#xff1a; 全双工&#xff1a;通信时可以双方同时通信。 半双工&#xff1a;通信时同一时间只能一个设备发送数据&#xff0c;其他设备接收。 单工&#xff1a;只能一个设备发送到另一个设备&#xff0c;例如USART只有…

动态库实现lua网络请求GET, POST, 下载文件

DLL需要使用的网络封装 WinHttp异步实现GET, POST, 多线程下载文件_webclient post下载文件-CSDN博客文章浏览阅读726次。基于WinHttp封装, 实现异步多线程文件下载, GET请求, POST请求_webclient post下载文件https://blog.csdn.net/Flame_Cyclone/article/details/142644088…

牛客周赛65(C++实现)

比赛链接&#xff1a;牛客竞赛_ACM/NOI/CSP/CCPC/ICPC算法编程高难度练习赛_牛客竞赛OJ 文章目录 1.超市1.1 题目描述1.2 思路1.3 代码 2. 雨幕2.1 题目描述2.2 思路2.3 代码 3.闺蜜3.1 题目描述3.2 思路3.3 代码 4. 医生4.1 题目描述4.2 思路4.3 代码 1.超市 1.1 题目描述 …

机器人技术革新:人工智能的强力驱动

内容概要 在当今世界&#xff0c;机器人技术与人工智能的结合正如星星与大海&#xff0c;彼此辉映。随着科技的不断进步&#xff0c;人工智能不仅仅是为机器人赋予了“聪明的大脑”&#xff0c;更是推动了整个行业的快速发展。回顾机器人技术的发展历程&#xff0c;我们会发现…

使用PostgreSQL进行高效数据管理

&#x1f493; 博客主页&#xff1a;瑕疵的CSDN主页 &#x1f4dd; Gitee主页&#xff1a;瑕疵的gitee主页 ⏩ 文章专栏&#xff1a;《热点资讯》 使用PostgreSQL进行高效数据管理 PostgreSQL简介 安装PostgreSQL 在Ubuntu上安装PostgreSQL 在CentOS上安装PostgreSQL 在macOS上…

为开源 AI 模型引入激励机制?解读加密 AI 协议 Sentient 的大模型代币化解决方案

撰文&#xff1a;Shlok Khemani 编译&#xff1a;Glendon&#xff0c;Techub News 古时候&#xff0c;中国人深信「阴阳」的概念——宇宙的每一个方面都蕴含着内在的二元性&#xff0c;这两种相反的力量不断地相互联系&#xff0c;形成一个统一的整体。就好比女性代表「阴」&a…

Hi3516/Hi3519DV500移植YOLOV5、YOLOV6、YOLOV7、YOLOV8开发环境搭建--YOLOV5工程编译移植到开发板测试--(5)

专栏链接如下&#xff1a; Hi3516/Hi3519DV500移植YOLOV5、YOLOV6、YOLOV7、YOLOV8开发环境搭建--安装Ubuntu18.04--&#xff08;1&#xff09; Hi3516/Hi3519DV500移植YOLOV5、YOLOV6、YOLOV7、YOLOV8开发环境搭建--安装开发环境AMCT、依赖包等--&#xff08;2&#xff09;…

【STM32】INA3221三通道电压电流采集模块,HAL库

一、简单介绍 芯片的datasheet地址&#xff1a; INA3221 三通道、高侧测量、分流和总线电压监视器&#xff0c;具有兼容 I2C 和 SMBUS 的接口 datasheet (Rev. B) 笔者所使用的INA3221是淘宝买的模块 原理图 模块的三个通道的电压都是一样&#xff0c;都是POWER。这个芯片采用…

HTML 标签属性——id、class、style 等全局属性详解

文章目录 1. id属性2. class属性3. style属性4. title属性5. lang属性6. dir属性7. accesskey属性8. tabindex属性小结HTML全局属性是一组可以应用于几乎所有HTML元素的特殊属性。这些属性提供了额外的功能和信息,使得网页开发者能够更好地控制元素的行为、样式和可访问性。 …

Python数据分析案例62——基于MAGU-LSTM的时间序列预测(记忆增强门控单元)

案例背景 时间序列lstm系列预测在学术界发论文都被做烂了&#xff0c;现在有一个新的MAGU-LSTM层的代码&#xff0c;并且效果还可以&#xff0c;非常少见我觉得还比较创新&#xff0c;然后我就分享一下它的代码演示一下&#xff0c;并且结合模态分解等方法做一次全面的深度学习…

C++泛型编程

一、什么是泛型编程 泛型编程 是一种编程范式&#xff0c;它通过编写可以处理多种数据类型的代码来实现代码的灵活复用。泛型编程主要通过模板来实现。 比如我们日常使用的容器类型vector就应用了模板来实现其通用性&#xff0c;我们在使用时可以通过传入型别创建对应的动态数…