【啟發式算法】RRT*算法詳細介紹(Python)

????????📢本篇文章是博主人工智能(AI)領域學習時,用于個人學習、研究或者欣賞使用,并基于博主對相關等領域的一些理解而記錄的學習摘錄和筆記,若有不當和侵權之處,指出后將會立即改正,還望諒解。文章分類在👉啟發式算法專欄:

? ? ? ?【啟發式算法】(9)---《RRT*算法詳細介紹(Python)》

【啟發式算法】RRT*算法詳細介紹(Python)

目錄

1. RRT*算法

2.算法原理

RRT*與RRT的區別

3.算法步驟

步驟詳細說明

4.RRT*的關鍵原理

1. 樹的擴展

2. 路徑優化

3. 連接最短路徑

4. 漸進最優性

[Python] RRT*算法實現

[Results] 運行結果

[Notice]? 注意事項

5.優點與不足

6.總結


1. RRT*算法

????????RRT*算法(Rapidly-exploring Random Tree Star)是一種用于機器人路徑規劃的算法,旨在為機器人找到從起點到目標的最短路徑,同時避免障礙物。它是基于RRT(Rapidly-exploring Random Tree)算法的改進版,具有更高的路徑質量和優化能力。RRT*的關鍵特點是它能夠在搜索過程中逐漸優化路徑,最終找到一條接近最短的路徑。


2.算法原理

????????想象你在一個森林里,從某個點出發(起點),想找到一條通向小屋(終點)的路徑。森林里有很多樹(障礙物),你看不到小屋在哪里。你開始隨機地朝不同方向走,記錄你走過的路,如果碰到障礙就繞開。

這就是 RRT 的基本思路:“快速而隨機地擴展路徑”

而 RRT* 在這個基礎上更聰明:每走一步,它還會看一下有沒有更短的路線可以替換原來的路線。

RRT*與RRT的區別

????????RRT*算法與普通的RRT算法相比,最大的區別在于優化過程。RRT只能快速探索空間,但不保證找到最優路徑。而RRT*則通過不斷優化已經找到的路徑,保證能找到一條接近最優的路徑。


3.算法步驟

????????RRT*的核心思想是通過不斷擴展一個隨機樹,探索搜索空間,同時在擴展過程中優化路徑。算法的基本步驟如下:

  1. **初始化樹**:從起點出發,初始化一個樹(可以是RRT樹),樹的根節點是起點。
  2. ?**隨機采樣**:在空間中隨機采樣一個點,這個點是機器人可能需要經過的位置。
  3. ?**擴展樹**:通過找到樹中距離該隨機采樣點最近的節點,然后朝這個隨機點擴展一小步。樹會不斷向外擴展,探索新的區域。
  4. **連接路徑**:擴展樹的過程中,算法會檢查是否能夠找到更優的路徑。如果新的節點能夠連接到樹中某個更接近目標的節點,或者可以替換掉原本的路徑,那么就會更新樹的結構,尋找更短的路徑。
  5. **優化路徑**:算法會在樹擴展的過程中,反復優化路徑,以確保最終路徑是最優的。

步驟詳細說明

????????假設我們有一個機器人,起點在`(0, 0)`,目標點在`(10, 10)`,空間中有障礙物。我們來一步步看RRT*算法是如何工作的:

?1. 初始化樹

????????我們從起點`(0, 0)`開始,構建一個初始樹。這個樹只有一個節點,即起點。

2. 隨機采樣

????????我們從空間中隨機選擇一個點,假設選擇的是`(7, 4)`。這個點并不一定在樹上,但我們希望樹可以通過某種方式擴展到這個點。

3. 擴展樹

????????找到樹中離`(7, 4)`最近的節點,比如起點`(0, 0)`,然后從`(0, 0)`朝著`(7, 4)`方向擴展,假設擴展的步長是1,所以新節點的位置可能是`(1, 0.57)`。這個新節點被加入到樹中,樹就變得更大了。

4. 檢查路徑優化

????????如果新的節點在擴展時發現了更短的路徑,或者有可能替代之前的路徑,算法就會更新路徑。例如,如果擴展的過程中,我們發現從`(1, 0.57)`到目標點`(10, 10)`的路徑比原來的路徑更短,算法就會更新路徑。

5. 重復以上步驟

????????算法會繼續重復以上步驟,直到找到一條從起點到目標點的路徑。隨著樹的擴展,路徑不斷優化,最終得到一條最短的路徑。

6. 結束

????????當樹擴展到目標點附近,算法停止,輸出路徑。


4.RRT*的關鍵原理

????????RRT*的核心原理不僅僅是樹的擴展,而是在每次擴展時進行路徑優化。為了保證路徑的最優性,RRT*會在每次擴展時,檢查是否能找到更短的路徑。這個過程實際上是一個漸進最優的過程。

1. 樹的擴展

????????樹的擴展是RRT*的基本操作,在空間中隨機選擇一個點,并擴展樹的結構。這一過程類似于RRT算法中的“樹擴展”步驟,但RRT*在擴展時增加了路徑優化步驟。

給定一個隨機采樣點 q_{\text{rand}},樹中某個節點q_{\text{nearest}},RRT*的目標是從 q_{\text{nearest}}q_{\text{rand}}?的q_{\text{new}}

q_{\text{new}} = q_{\text{nearest}} + \Delta t \cdot \frac{q_{\text{rand}} - q_{\text{nearest}}}{\|q_{\text{rand}} - q_{\text{nearest}}\|}

其中,\Delta t是擴展步長,q_{\text{new}}是新節點。

??????計算?新節點的代價:假設在某一時刻,樹中有一個節點 q_{\text{parent}},我們從這個節點擴展到新節點 q_{\text{new}},則新節點的代價可以定義為:

C(q_{\text{new}}) = C(q_{\text{parent}}) + \text{cost}(q_{\text{parent}}, q_{\text{new}})
其中,\text{cost}(q_{\text{parent}}, q_{\text{new}})是從父節點到新節點的代價,通常計算為兩點之間的歐幾里得距離:

\text{cost}(q_{\text{parent}}, q_{\text{new}}) = \|q_{\text{new}} - q_{\text{parent}}\|

2. 路徑優化

????????在RRT*中,路徑優化是一個至關重要的步驟,它能夠保證路徑的最優性。優化過程的核心思想是檢查新擴展的節點是否可以通過某些已有節點來形成更短的路徑。具體來說,如果我們有兩個節點 q_{\text{new}}?和 q_{\text{neighbour}},那么如果經過 q_{\text{new}}q_{\text{neighbour}}?的路徑比原有路徑更短,就更新路徑。

????????在這個過程中,RRT*需要計算從新節點到樹中某些節點的路徑長度,并選擇能夠帶來路徑優化的節點。這個步驟在每次擴展時都進行,最終產生一條近似最優的路徑。

????????假設新節點 q_{\text{new}}?通過與樹中的節點 q_{\text{neighbour}}連接來優化路徑。如果經過q_{\text{neighbour}}的路徑比原路徑更短,則更新路徑。即,若有:

C(q_{\text{neighbour}}) > C(q_{\text{new}}) + \text{cost}(q_{\text{new}}, q_{\text{neighbour}})

則更新 q_{\text{neighbour}}?的父節點為 q_{\text{new}},并更新路徑。

3. 連接最短路徑

????????RRT*的優化不僅體現在路徑本身,還包括通過連接新節點和樹中的某些節點,生成最短路徑。假設已經有了一條路徑 \pi_1,從起點到目標點。現在我們希望通過添加新的節點來更新這條路徑。若新的路徑 \pi_2比原路徑更短,則替換原路徑。更新過程可以通過“Rewiring”來完成,即調整樹結構,使路徑變得更短。

4. 漸進最優性

????????RRT*的一個顯著特征是它的漸進最優性。隨著擴展步數的增加,RRT*會不斷優化路徑,最終趨近于最優路徑。這種漸進最優性可以通過以下公式描述:

????????在給定的空間中,如果我們對樹進行足夠多的擴展,路徑的代價 C_{\text{path}}會趨近于最優路徑的代價 C^*,滿足:

C_{\text{path}} \to C^* \quad \text{as} \quad n \to \infty

其中,n$是擴展的次數。


[Python] RRT*算法實現

????????RRT*算法我也是基于一位大佬的算法應用的,在大佬的代碼基礎上做了一點修改。

?項目代碼我已經放入下面鏈接里面,可以通過下面鏈接跳轉:🔥

【啟發式算法】--- RRT*算法?

若是下面代碼復現困難或者有問題,也歡迎評論區留言

"""《RRT*算法實現》時間:2025.06.25"""
import math
import os
import sysimport matplotlib.pyplot as plt
from celluloid import Camera  # 保存動圖時用,pip install celluloid
sys.path.append("../RRT")
try:from rrt_planning import RRT
except ImportError:raiseshow_animation = Trueclass RRTStar(RRT):"""Class for RRT Star planning"""class Node(RRT.Node):def __init__(self, x, y):super().__init__(x, y)self.cost = 0.0def __init__(self,start,goal,obstacle_list,rand_area,expand_dis=3.0,goal_sample_rate=20,max_iter=50000,connect_circle_dist=50.0,search_until_max_iter=False,robot_radius=0.0):"""Setting Parameterstart:Start Position [x,y]goal:Goal Position [x,y]obstacleList:obstacle Positions [[x,y,size],...]randArea:Random Sampling Area [min,max]"""super().__init__(start, goal, obstacle_list, rand_area, expand_dis,goal_sample_rate, max_iter,robot_radius=robot_radius)self.connect_circle_dist = connect_circle_distself.goal_node = self.Node(goal[0], goal[1])self.search_until_max_iter = search_until_max_iterdef planning(self, animation=True, camera=None):"""rrt star path planninganimation: flag for animation on or off ."""self.node_list = [self.start]for i in range(self.max_iter):if i % 100 == 0:print("Iter:", i, ", number of nodes:", len(self.node_list))# print("Iter:", i, ", number of nodes:", len(self.node_list))rnd = self.sample_free()nearest_ind = self.get_nearest_node_index(self.node_list, rnd)new_node = self.steer(self.node_list[nearest_ind], rnd,self.expand_dis)near_node = self.node_list[nearest_ind]# 計算代價,歐氏距離new_node.cost = near_node.cost + math.hypot(new_node.x-near_node.x, new_node.y-near_node.y)if self.obstacle_free(new_node, self.obstacle_list, self.robot_radius):near_inds = self.find_near_nodes(new_node) # 找到x_new的鄰近節點node_with_updated_parent = self.choose_parent(new_node, near_inds) # 重新選擇父節點# 如果父節點更新了if node_with_updated_parent:# 重布線self.rewire(node_with_updated_parent, near_inds)self.node_list.append(node_with_updated_parent)else:self.node_list.append(new_node)if animation and i % 100 ==0:self.draw_graph(rnd, camera)if ((not self.search_until_max_iter) and new_node):  # if reaches goallast_index = self.search_best_goal_node()if last_index is not None:return self.generate_final_course(last_index)print("reached max iteration")last_index = self.search_best_goal_node()if last_index is not None:return self.generate_final_course(last_index)return Nonedef choose_parent(self, new_node, near_inds):"""在新產生的節點 $x_{new}$ 附近以定義的半徑范圍$r$內尋找所有的近鄰節點 $X_{near}$,作為替換 $x_{new}$ 原始父節點 $x_{near}$ 的備選我們需要依次計算起點到每個近鄰節點 $X_{near}$ 的路徑代價 加上近鄰節點 $X_{near}$ 到 $x_{new}$ 的路徑代價,取路徑代價最小的近鄰節點$x_{min}$作為 $x_{new}$ 新的父節點Arguments:--------new_node, Noderandomly generated node with a path from its neared pointThere are not coalitions between this node and th tree.near_inds: listIndices of indices of the nodes what are near to new_nodeReturns.------Node, a copy of new_node"""if not near_inds:return None# search nearest cost in near_indscosts = []for i in near_inds:near_node = self.node_list[i]t_node = self.steer(near_node, new_node)if t_node and self.obstacle_free(t_node, self.obstacle_list, self.robot_radius):costs.append(self.calc_new_cost(near_node, new_node))else:costs.append(float("inf"))  # the cost of collision nodemin_cost = min(costs)if min_cost == float("inf"):print("There is no good path.(min_cost is inf)")return Nonemin_ind = near_inds[costs.index(min_cost)]new_node = self.steer(self.node_list[min_ind], new_node)new_node.cost = min_costreturn new_nodedef search_best_goal_node(self):dist_to_goal_list = [self.calc_dist_to_goal(n.x, n.y) for n in self.node_list]goal_inds = [dist_to_goal_list.index(i) for i in dist_to_goal_listif i <= self.expand_dis]safe_goal_inds = []for goal_ind in goal_inds:t_node = self.steer(self.node_list[goal_ind], self.goal_node)if self.obstacle_free(t_node, self.obstacle_list, self.robot_radius):safe_goal_inds.append(goal_ind)if not safe_goal_inds:return Nonemin_cost = min([self.node_list[i].cost for i in safe_goal_inds])for i in safe_goal_inds:if self.node_list[i].cost == min_cost:return ireturn Nonedef find_near_nodes(self, new_node):"""1) defines a ball centered on new_node2) Returns all nodes of the three that are inside this ballArguments:---------new_node: Nodenew randomly generated node, without collisions betweenits nearest nodeReturns:-------listList with the indices of the nodes inside the ball ofradius r"""nnode = len(self.node_list) + 1r = self.connect_circle_dist * math.sqrt((math.log(nnode) / nnode))# if expand_dist exists, search vertices in a range no more than# expand_distif hasattr(self, 'expand_dis'):r = min(r, self.expand_dis)dist_list = [(node.x - new_node.x)**2 + (node.y - new_node.y)**2for node in self.node_list]near_inds = [dist_list.index(i) for i in dist_list if i <= r**2]return near_indsdef rewire(self, new_node, near_inds):"""For each node in near_inds, this will check if it is cheaper toarrive to them from new_node.In such a case, this will re-assign the parent of the nodes innear_inds to new_node.Parameters:----------new_node, NodeNode randomly added which can be joined to the treenear_inds, list of uintsA list of indices of the self.new_node which containsnodes within a circle of a given radius.Remark: parent is designated in choose_parent."""for i in near_inds:near_node = self.node_list[i]edge_node = self.steer(new_node, near_node)if not edge_node:continueedge_node.cost = self.calc_new_cost(new_node, near_node)no_collision = self.obstacle_free(edge_node, self.obstacle_list, self.robot_radius)improved_cost = near_node.cost > edge_node.costif no_collision and improved_cost:near_node.x = edge_node.xnear_node.y = edge_node.ynear_node.cost = edge_node.costnear_node.path_x = edge_node.path_xnear_node.path_y = edge_node.path_ynear_node.parent = edge_node.parentself.propagate_cost_to_leaves(new_node)def calc_new_cost(self, from_node, to_node):d, _ = self.calc_distance_and_angle(from_node, to_node)return from_node.cost + ddef propagate_cost_to_leaves(self, parent_node):for node in self.node_list:if node.parent == parent_node:node.cost = self.calc_new_cost(parent_node, node)self.propagate_cost_to_leaves(node)def main():print("Start " )fig = plt.figure(1)camera = Camera(fig) # 保存動圖時使用# camera = None # 不保存動圖時,camara為Noneshow_animation = True# ====Search Path with RRT====# # 生成100個隨機元組的列表import random# obstacle_list = [(random.randint(0, 200), random.randint(0, 200), random.randint(1, 10)) for _ in range(100)]# 分別生成100個x、y坐標對和100個size值positions = [(random.randint(0, 180), random.randint(0, 180)) for _ in range(100)]sizes = [random.randint(1, 10) for _ in range(100)]# 合并為100個三元組obstacle_list = [(x, y, size) for (x, y), size in zip(positions, sizes)]while True:goal = [random.randint(180, 199), random.randint(180, 199)]goal_ = tuple(goal)if goal_ not in positions:break# Set Initial parametersrrt_star = RRTStar(start=[0, 0],goal=goal,rand_area=[0, 200],obstacle_list=obstacle_list,expand_dis=3,robot_radius=0.8)path = rrt_star.planning(animation=show_animation,camera=camera)if path is None:print("Cannot find path")else:print(f"found path!!,路徑長度{len(path)},路徑{path}")# Draw final pathif show_animation:rrt_star.draw_graph(camera=camera)plt.plot([x for (x, y) in path], [y for (x, y) in path], 'r--')plt.grid(True)if camera!=None:camera.snap()animation = camera.animate()animation.save('trajectory.gif')plt.show()if __name__ == '__main__':main()

如果需要完整代碼實現,可在下面自行前往大佬的github,鏈接。?


[Results] 運行結果


[Notice]? 注意事項

?# 環境配置
Python                  3.11.5
torch                   2.1.0
torchvision             0.16.0
gym                     0.26.2

5.優點與不足

?優點:

1. **最優性**:通過不斷優化路徑,RRT\*能夠提供最短路徑(在有限的計算時間內)。
2. **靈活性**:適用于高維空間和復雜環境,能夠處理障礙物的影響。
3. **漸進性**:隨著搜索的進行,路徑會越來越優化,適合動態環境。

不足:

1. **計算量大**:由于需要在每一步優化路徑,計算量較大,可能不適合實時性要求高的應用。
2. **收斂速度慢**:對于復雜環境,算法可能需要較長時間才能找到最優路徑。


6.總結

????????RRT*算法是一種高效的路徑規劃算法,其關鍵在于通過路徑優化和漸進最優性來生成接近最優的路徑。通過在樹擴展過程中不斷進行路徑優化,RRT*能夠解決復雜環境中的路徑規劃問題。它通過多次擴展和優化,在計算資源允許的情況下,可以產生最優或近似最優的路徑。RRT*算法特別適用于復雜的環境。雖然計算量較大,但它的最優性使得它在許多應用中仍然很有價值。

?更多強化學習文章,請前往:【啟發式算法】專欄


????????博客都是給自己看的筆記,如有誤導深表抱歉。文章若有不當和不正確之處,還望理解與指出。由于部分文字、圖片等來源于互聯網,無法核實真實出處,如涉及相關爭議,請聯系博主刪除。如有錯誤、疑問和侵權,歡迎評論留言聯系作者,或者添加VX:Rainbook_2,聯系作者。?

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/91519.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/91519.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/91519.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Docker架構深度解析:從核心概念到企業級實踐

Docker架構深度解析&#xff1a;從核心概念到企業級實踐一、Docker架構全景圖1.1 整體架構示意圖二、核心組件深度解析2.1 Docker Daemon工作機制三、鏡像與容器原理3.1 鏡像分層結構3.2 容器生命周期四、網絡架構詳解4.1 網絡模式對比4.2 Bridge網絡實現原理五、存儲架構與實踐…

PPT自動化 python-pptx - 8: 文本(text)

在使用 python-pptx 庫操作 PowerPoint 文檔時&#xff0c;理解文本的結構和處理方式至關重要。本文將深入探討文本在形狀中的組織層級、訪問方式以及各級別的格式化選項。文本容器與層級結構可容納文本的形狀&#xff1a; 只有自動形狀 (Auto shapes) 和表格單元格 (table cel…

使用realsense進行目標檢測并標識目標深度

涉及知識點都在代碼中注釋了&#xff0c;直接看代碼 // This example is derived from the ssd_mobilenet_object_detection opencv demo // and adapted to be used with Intel RealSense Cameras // Please see https://github.com/opencv/opencv/blob/master/LICENSE#includ…

OpenWrt Network configuration

OpenWrt Network configuration device 和 interface 關系device device 表示底層的網絡設備&#xff0c;如物理網卡、橋接設備&#xff08;bridge&#xff09;、VLAN 設備等。 通過 config device 定義&#xff0c;描述設備類型、端口成員、VLAN 等屬性。 例如&#xff1a;br…

VuePress 使用詳解

一、核心概念 VuePress 是 Vue.js 團隊開發的靜態網站生成器&#xff0c;專為技術文檔優化&#xff0c;具備以下特性&#xff1a; Markdown 優先&#xff1a;原生支持 Markdown 語法擴展Vue 驅動&#xff1a;可在 Markdown 中使用 Vue 組件默認主題優化&#xff1a;內置響應式…

AI大模型前沿:Muyan-TTS開源零樣本語音合成技術解析

AI大模型前沿&#xff1a;Muyan-TTS開源零樣本語音合成技術解析引言&#xff1a;語音合成技術的演進與Muyan-TTS的突破性意義語音合成&#xff08;Text-to-Speech, TTS&#xff09;技術作為人機交互的核心接口之一&#xff0c;自20世紀30年代貝爾實驗室首次嘗試電子語音合成以來…

c# everthing.exe 通信

1 獲取everthing進程 調用 Everything 搜索創建SearchWithEverything函數using Microsoft.Win32; using System; using System.Diagnostics; using System.IO; using System.Management; using System.Text;class EverythingHelper {// 方法 1&#xff1a;從進程獲取路徑publi…

Gitee:中國企業級DevOps平臺的本土化突圍之路

Gitee&#xff1a;中國企業級DevOps平臺的本土化突圍之路 在國內數字化轉型浪潮下&#xff0c;DevOps平臺作為企業研發效能提升的核心引擎&#xff0c;正在經歷從工具到生態的全面升級。作為國內領先的一站式DevOps解決方案&#xff0c;Gitee憑借其本土化優勢與全鏈路服務能力&…

C++法則22:運算符 ::* 和 ->* 和 ::* 是獨特的整體運算符,是不可分的。

C法則22&#xff1a;運算符 ::* 和 ->* 和 ::* 是獨特的整體運算符&#xff0c;是不可分的。1. ::*&#xff08;成員指針聲明符&#xff09;作用&#xff1a;用于聲明一個指向類成員的指針。語法&#xff1a;ReturnType (ClassName::*pointerName) &ClassName::MemberN…

Linux系統管理習題

Linux 系統管理練習題 1.請為此虛擬機配置以下網絡參數&#xff1a; 1&#xff09;主機名&#xff1a;chenyu.example.com &#xff08;將chenyu改成自己名字的全拼&#xff09; 2&#xff09;IP 地址&#xff1a;192.168.100.100/24 3&#xff09;默認網關&#xff1a;192.168…

SQL166 每天的日活數及新用戶占比

SQL166 每天的日活數及新用戶占比 題目理解 本SQL查詢旨在分析用戶活躍數據&#xff0c;計算兩個關鍵指標&#xff1a; 每日活躍用戶數(DAU)每日新增用戶占比(新用戶占活躍用戶的比例) 解題思路 1. 數據準備階段 首先我們需要獲取所有用戶的活躍記錄&#xff0c;包括&…

【33】C# WinForm入門到精通 ——表格布局器TableLayoutPanel【屬性、方法、事件、實例、源碼】

WinForm 是 Windows Form 的簡稱&#xff0c;是基于 .NET Framework 平臺的客戶端&#xff08;PC軟件&#xff09;開發技術&#xff0c;是 C# 語言中的一個重要應用。 .NET 提供了大量 Windows 風格的控件和事件&#xff0c;可以直接拿來使用。 本專欄內容是按照標題序號逐漸…

uv使用教程

以下是使用 Python 包管理工具 uv 的常見命令指南。uv 是由 Astral&#xff08;Ruff 的開發者&#xff09;開發的高性能 Python 包安裝器和解析器&#xff0c;旨在替代 pip 和 pip-tools&#xff1a; 1. 安裝 uv uv官網倉庫 # Linux/macOS curl -Ls https://astral.sh/uv/in…

SpringBoot3.x入門到精通系列:1.1 簡介與新特性

SpringBoot 3.x 簡介與新特性 &#x1f4d6; 什么是SpringBoot SpringBoot是由Pivotal團隊提供的全新框架&#xff0c;其設計目的是用來簡化Spring應用的初始搭建以及開發過程。SpringBoot集成了大量常用的第三方庫配置&#xff0c;SpringBoot應用中這些第三方庫幾乎可以零配…

二、搭建springCloudAlibaba2021.1版本分布式微服務-Nacos搭建及服務注冊和配置中心

nacos介紹 1、Nacos簡介 Nacos 是阿里巴巴推出來的一個新開源項目&#xff0c;這是一個更易于構建云原生應用的動態服務發現、配置管理和服務管理平臺。 Nacos 致力于幫助您發現、配置和管理微服務。Nacos 提供了一組簡單易用的特性集&#xff0c;幫助您快速實現動態服務發現、…

淺談物聯網嵌入式程序開發源碼技術方案

在物聯網蓬勃發展的時代&#xff0c;嵌入式程序作為連接硬件與軟件的橋梁&#xff0c;發揮著至關重要的作用。以“邊緣智能 云協同”為核心&#xff0c;為工業、醫療、家居、農業、智慧城市五大場景提供穩定、低功耗、可擴展的物聯網終端與平臺一體化解決方案。以下董技叔軟件…

【筆記】重學單片機(51)

為學習嵌入式做準備&#xff0c;重新拿起51單片機學習。此貼為學習筆記&#xff0c;僅記錄易忘點&#xff0c;實用理論基礎&#xff0c;并不是0基礎。 資料參考&#xff1a;清翔零基礎教你學51單片機 51單片機學習筆記1. C語言中的易忘點1.1 數據類型1.2 位運算符1.3 常用控制語…

C++現代Redis客戶端庫redis-plus-plus詳解

&#x1f680; C現代Redis客戶端庫redis-plus-plus詳解&#xff1a;告別繁瑣的hiredis&#xff0c;擁抱現代C的Redis操作 &#x1f4c5; 更新時間&#xff1a;2025年07月28日 &#x1f3f7;? 標簽&#xff1a;C | Redis | redis-plus-plus | 現代C | 后端開發 文章目錄&#x…

Redis存儲原理與數據模型(上)

一、Redis數據模型 1.1、查看Redis數據定義&#xff1a; typedef struct redisDb {kvstore *keys; /* The keyspace for this DB 指向鍵值存儲的指針&#xff0c;用于快速訪問和修改數據庫中的鍵值對*/kvstore *expires; /* Timeout of keys with a t…

視頻生成模型蒸餾的方法

1.fastvideo https://github.com/hao-ai-lab/FastVideohttps://github.com/hao-ai-lab/FastVideo Distillation support Recipes for video DiT, based on PCM. Support distilling/finetuning/inferencing state-of-the-art open video DiTs: 1. Mochi 2. Hunyuan. 2.l