[go: up one dir, main page]

TWI856570B - Processing path planning simulation device and method - Google Patents

Processing path planning simulation device and method Download PDF

Info

Publication number
TWI856570B
TWI856570B TW112110435A TW112110435A TWI856570B TW I856570 B TWI856570 B TW I856570B TW 112110435 A TW112110435 A TW 112110435A TW 112110435 A TW112110435 A TW 112110435A TW I856570 B TWI856570 B TW I856570B
Authority
TW
Taiwan
Prior art keywords
processing
optimal
model
postures
positions
Prior art date
Application number
TW112110435A
Other languages
Chinese (zh)
Other versions
TW202439186A (en
Inventor
張晉維
方思涵
呂紹篁
Original Assignee
台達電子工業股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 台達電子工業股份有限公司 filed Critical 台達電子工業股份有限公司
Priority to TW112110435A priority Critical patent/TWI856570B/en
Application granted granted Critical
Publication of TWI856570B publication Critical patent/TWI856570B/en
Publication of TW202439186A publication Critical patent/TW202439186A/en

Links

Images

Landscapes

  • Manipulator (AREA)
  • Numerical Control (AREA)

Abstract

The processing path planning simulation device is provided, which includes a memory and a processor. The processor performs following operations: according to an obstacle model, multiple processing point positions, a robot arm model, a processing tool model, relationship between models and production strategy parameter, performing collision test simulation to generate multiple candidate poses of the robot arm model; performing path optimization algorithm on multiple candidate poses to generate a pose sequence; performing ant colony algorithm based on the posture sequence and the obstacle model to generate an optimal processing path, where the optimal processing path includes multiple optimal processing segments and multiple optimal nodes, where the ant colony algorithm includes performing multiple path generating operations between positions of multiple optimal postures to generate multiple optimal processing segments; and simulate an end point of a virtual tool on the robot arm model to perform virtual processing operations on the multiple processing point positions according to the multiple optimal nodes in sequence so as to produce simulation results.

Description

加工路徑規劃模擬裝置以及方法Processing path planning simulation device and method

本揭示是有關於加工路徑規劃模擬裝置以及方法。The present disclosure relates to a processing path planning simulation device and method.

電子組裝產業中,機械手臂因其靈活性而大量用於取代傳統人力的工序,例如,上下料、鎖螺絲、點噴膠、組件以及焊錫等製程,這些工序大多仰賴機械手臂安裝工具來執行加工任務。進一步而言,傳統的加工路徑規劃需由工程師現場教點與編程,這將佔用實際機台而造成停線成本以及時間成本。此外,加工路徑規劃的結果高度仰賴過往的經驗跟知識。在典型做法中,為了避免碰撞,往往會安排許多輔助點在路徑中以繞開障礙物,以確保機器手臂在執行任務過程中不會與其他物體碰撞。此外,在機器手臂換手的過程中,手臂姿態可能會有較大的變化,因此,這通常會在遠離障礙物的地方進行換手操作(例如,在完成一次點膠加工後,將機械臂抬升3至50公分以確保不會產生碰撞)。藉此,這樣可以保證機械臂在換手操作時能夠順利運動,並最大程度地避免碰撞產生。然而,這樣的路徑規劃往往不是最佳加工路徑,且有極大的改善空間。In the electronic assembly industry, robotic arms are widely used to replace traditional manual processes due to their flexibility, such as loading and unloading, screwing, glue spraying, assembly and soldering. Most of these processes rely on robotic arm installation tools to perform processing tasks. Furthermore, traditional processing path planning requires engineers to teach points and program on-site, which will occupy actual machines and cause line downtime costs and time costs. In addition, the results of processing path planning are highly dependent on past experience and knowledge. In typical practices, in order to avoid collisions, many auxiliary points are often arranged in the path to bypass obstacles to ensure that the robot arm does not collide with other objects during the execution of the task. In addition, during the process of the robot arm changing hands, the arm posture may change greatly, so this is usually done away from obstacles (for example, after completing a dispensing process, the robot arm is raised 3 to 50 cm to ensure that there is no collision). In this way, the robot arm can move smoothly during the hand-changing operation and avoid collisions to the greatest extent. However, such path planning is often not the best processing path and there is a lot of room for improvement.

本揭示提出一種加工路徑規劃模擬裝置,其包括記憶體以及處理器。記憶體儲存多個指令。處理器連接記憶體,用以存取多個指令,並執行以下操作:根據在虛擬環境中的障礙物模型、在障礙物模型上的多個加工點位置、在虛擬環境中的機械手臂模型、機械手臂模型上的加工工具模型、模型位置相對關係以及生產策略參數進行碰撞測試模擬以產生機械手臂模型的多個候選姿態,其中多個候選姿態分為多個姿態群組,其中多個姿態群組分別對應於該些加工點位置;對多個候選姿態執行路徑最佳化演算法以產生姿態序列,其中姿態序列包括依序排列的多個最佳姿態;基於姿態序列以及該障礙物模型執行蟻群演算法以產生最佳加工路徑,其中最佳加工路徑包括多個最佳加工段以及多個最佳節點,其中蟻群演算法包括在多個最佳姿態的位置之間進行多個路徑產生運算以產生多個最佳加工段;以及在虛擬環境中的障礙物模型上,基於最佳加工路徑,模擬機械手臂模型上的加工工具模型的末端點依序以與多個最佳節點對應的姿態對多個加工點位置進行虛擬加工操作以產生模擬結果。The present disclosure provides a processing path planning simulation device, which includes a memory and a processor. The memory stores a plurality of instructions. The processor is connected to the memory to access the plurality of instructions and execute the following operations: performing collision test simulation according to an obstacle model in a virtual environment, a plurality of processing point positions on the obstacle model, a robot arm model in a virtual environment, a processing tool model on the robot arm model, a relative relationship between model positions, and production strategy parameters to generate a plurality of candidate postures of the robot arm model, wherein the plurality of candidate postures are divided into a plurality of posture groups, wherein the plurality of posture groups respectively correspond to the processing point positions; executing a path optimization algorithm on the plurality of candidate postures to generate a posture sequence, wherein the posture sequence The method comprises a plurality of optimal postures arranged in sequence; executing an ant swarm algorithm based on the posture sequence and the obstacle model to generate an optimal processing path, wherein the optimal processing path comprises a plurality of optimal processing segments and a plurality of optimal nodes, wherein the ant swarm algorithm comprises performing a plurality of path generation operations between the positions of the plurality of optimal postures to generate a plurality of optimal processing segments; and on the obstacle model in the virtual environment, based on the optimal processing path, the end point of the processing tool model on the simulated robot arm model sequentially performs virtual processing operations on the positions of the plurality of processing points in postures corresponding to the plurality of optimal nodes to generate a simulation result.

本揭示提出另一種加工路徑規劃模擬方法,包括:根據在虛擬環境中的障礙物模型、在障礙物模型上的多個加工點位置、在虛擬環境中的機械手臂模型、機械手臂模型上的加工工具模型、模型位置相對關係以及生產策略參數進行碰撞測試模擬以產生機械手臂模型的多個候選姿態,其中多個候選姿態分為多個姿態群組,其中多個姿態群組分別對應於該些加工點位置;對多個候選姿態執行路徑最佳化演算法以產生姿態序列,其中姿態序列包括依序排列的多個最佳姿態;基於姿態序列以及該障礙物模型執行蟻群演算法以產生最佳加工路徑,其中最佳加工路徑包括多個最佳加工段以及多個最佳節點,其中蟻群演算法包括在多個最佳姿態的位置之間進行多個路徑產生運算以產生多個最佳加工段;以及在虛擬環境中的障礙物模型上,基於最佳加工路徑,模擬機械手臂模型上的加工工具模型的末端點依序以與多個最佳節點對應的姿態對多個加工點位置進行虛擬加工操作以產生模擬結果。The present disclosure proposes another processing path planning simulation method, including: performing collision test simulation according to an obstacle model in a virtual environment, multiple processing point positions on the obstacle model, a robot arm model in the virtual environment, a processing tool model on the robot arm model, a relative relationship between model positions, and production strategy parameters to generate multiple candidate postures of the robot arm model, wherein the multiple candidate postures are divided into multiple posture groups, wherein the multiple posture groups correspond to the processing point positions respectively; executing a path optimization algorithm on the multiple candidate postures to generate a posture sequence, wherein the posture sequence includes A plurality of optimal postures are arranged in sequence; an ant swarm algorithm is executed based on the posture sequence and the obstacle model to generate an optimal processing path, wherein the optimal processing path includes a plurality of optimal processing segments and a plurality of optimal nodes, wherein the ant swarm algorithm includes performing a plurality of path generation operations between the positions of the plurality of optimal postures to generate a plurality of optimal processing segments; and on the obstacle model in the virtual environment, based on the optimal processing path, the end point of the processing tool model on the simulated robot arm model sequentially performs virtual processing operations on the plurality of processing point positions with postures corresponding to the plurality of optimal nodes to generate a simulation result.

在以往技術中,常常造成大量的停線成本以及時間成本。由於為了避開障礙物,要安排許多輔助點來繞開,且在機器手臂換手過程中會遠離加工點,這將使得規劃路徑並非最佳(即,加工路徑並非最短,且整體時間並非最短)。這都是仰賴大量人為判斷所造成的問題。In the past, a lot of downtime and time costs were often incurred. In order to avoid obstacles, many auxiliary points had to be arranged to bypass them, and the robot arm would be far away from the processing point during the hand-changing process, which would make the planned path not optimal (that is, the processing path was not the shortest, and the overall time was not the shortest). These are all problems caused by relying on a lot of human judgment.

有鑑於此,本揭示提出一種加工路徑規劃模擬裝置以及方法,其讓使用者先輸入障礙物模型、機械手臂模型、加工工具模型、模型位置相對關係以及生產策略參數以進行真實場域的模擬,並基於障礙物模型、機械手臂模型、加工工具模型、模型位置相對關係以及生產策略參數等進行碰撞測試模擬以及蟻群演算法以產生最佳加工路徑。In view of this, the present disclosure proposes a processing path planning simulation device and method, which allows the user to first input an obstacle model, a robot arm model, a processing tool model, a relative relationship between model positions, and production strategy parameters to simulate a real field, and then perform a collision test simulation and an ant swarm algorithm based on the obstacle model, the robot arm model, the processing tool model, the relative relationship between model positions, and production strategy parameters to generate an optimal processing path.

藉由這樣的做法將可解決由於人工規劃路徑的結果常常不是最佳的問題(例如,從一個加工點到另一個加工點的路徑太遠且不夠有效率)。進一步而言,本揭示提的加工路徑規劃模擬裝置以及方法可預先模擬加工路徑,可大大縮短因人工教點與編程的時間會占用實體機台造成停線成本及時間成本,這將可改善人工規劃路徑的結果,而使得加工路徑縮短以及加工時間變短。此外,在蟻群演算法的遞迴階段中更結合了路徑產生運算以及碰撞檢測機制,這將大大降低演算所需要的時間。This approach can solve the problem that the result of manually planned paths is often not optimal (for example, the path from one processing point to another is too far and not efficient enough). Furthermore, the processing path planning simulation device and method disclosed in the present disclosure can simulate the processing path in advance, which can greatly shorten the downtime cost and time cost caused by the time of manual teaching points and programming, which will improve the result of manually planned paths, shorten the processing path and shorten the processing time. In addition, the path generation operation and collision detection mechanism are combined in the recursive stage of the ant colony algorithm, which will greatly reduce the time required for calculation.

請參照第1圖,第1圖是本揭示一些實施例繪示的加工路徑規劃模擬裝置100的方塊圖。如第1圖所示,加工路徑規劃模擬裝置100包括記憶體110以及處理器120。記憶體110以及處理器120互相連接。Please refer to FIG. 1, which is a block diagram of a processing path planning simulation device 100 according to some embodiments of the present disclosure. As shown in FIG. 1, the processing path planning simulation device 100 includes a memory 110 and a processor 120. The memory 110 and the processor 120 are connected to each other.

在一些實施例中,加工路徑規劃模擬裝置100可以是由智慧型手機、平板電腦、筆記型電腦、桌上型電腦、中繼(relay)裝置或伺服器等電子裝置實現。In some embodiments, the processing path planning simulation device 100 can be implemented by an electronic device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a relay device, or a server.

在本實施例中,記憶體110儲存由處理器120執行的指令,其用以執行後續段落所描述的詳細步驟。在一些實施例中,記憶體110可以由記憶單元、快閃記憶體、唯讀記憶體、硬碟或任何具相等性的儲存組件等實現。在一些實施例中,處理器120可以由處理單元、中央處理單元或計算單元等實現。In this embodiment, the memory 110 stores instructions executed by the processor 120, which are used to execute the detailed steps described in the following paragraphs. In some embodiments, the memory 110 can be implemented by a memory unit, a flash memory, a read-only memory, a hard disk, or any equivalent storage component. In some embodiments, the processor 120 can be implemented by a processing unit, a central processing unit, or a computing unit.

一併參照第2圖,第2圖是本揭示一些實施例繪示的加工路徑規劃模擬方法的流程圖。第1圖的加工路徑規劃模擬裝置100中的元件用以執行加工路徑規劃模擬方法中的步驟S210~S240。如第2圖所示,首先,於步驟S210中,根據在虛擬環境中的障礙物模型、在障礙物模型上的多個加工點位置、在虛擬環境中的機械手臂模型、機械手臂模型上的加工工具模型、模型位置相對關係以及生產策略參數進行碰撞測試模擬以產生機械手臂模型的多個候選姿態,其中多個候選姿態分為多個姿態群組,其中多個姿態群組分別對應於多個加工點位置。Referring to FIG. 2, FIG. 2 is a flow chart of a processing path planning simulation method according to some embodiments of the present disclosure. The components in the processing path planning simulation device 100 of FIG. 1 are used to execute steps S210 to S240 in the processing path planning simulation method. As shown in FIG. 2, first, in step S210, a collision test simulation is performed based on an obstacle model in a virtual environment, a plurality of processing point positions on the obstacle model, a robot model in a virtual environment, a processing tool model on the robot model, a relative relationship between model positions, and production strategy parameters to generate a plurality of candidate postures of the robot model, wherein the plurality of candidate postures are divided into a plurality of posture groups, wherein the plurality of posture groups respectively correspond to a plurality of processing point positions.

在一些實施例中,加工路徑規劃模擬裝置100更可包括輸入介面(未繪示),並可藉由此輸入介面輸入在虛擬環境中的障礙物模型、在障礙物模型上的多個加工點位置、在虛擬環境中的機械手臂模型、機械手臂模型上的加工工具模型、模型位置相對關係以及生產策略參數。In some embodiments, the processing path planning simulation device 100 may further include an input interface (not shown), and an obstacle model in a virtual environment, multiple processing point positions on the obstacle model, a robot arm model in the virtual environment, a processing tool model on the robot arm model, a relative relationship between model positions, and production strategy parameters may be input through the input interface.

在一些實施例中,障礙物模型可以是在三維虛擬環境中的一個三維的立體模型,且可以是對實體待加工物件(例如,一個印刷電路板(printed circuit board, PCB))虛擬化的一個三維的立體模型。舉例而言,可藉由使用者介面輸入一個印刷電路板的三維的立體模型的3D CAD檔案,並模擬出存在此三維的立體模型的一個三維虛擬環境。在一些實施例中,可在障礙物模型上預先設定好多個加工點位置。舉例而言,可將虛擬化的印刷電路板的特定線路設定為加工點位置。In some embodiments, the obstacle model can be a three-dimensional stereoscopic model in a three-dimensional virtual environment, and can be a three-dimensional stereoscopic model of a physical object to be processed (e.g., a printed circuit board (PCB)). For example, a 3D CAD file of a three-dimensional stereoscopic model of a printed circuit board can be input through a user interface, and a three-dimensional virtual environment in which the three-dimensional stereoscopic model exists can be simulated. In some embodiments, a plurality of processing point positions can be pre-set on the obstacle model. For example, a specific line of the virtualized printed circuit board can be set as a processing point position.

在一些實施例中,機械手臂模型可以是在三維虛擬環境中的另一個三維的立體模型,且可以是對實機械手臂虛擬化的一個三維的立體模型。舉例而言,可藉由使用者介面輸入一個機械手臂的三維的立體模型的3D CAD檔案,並模擬出存在此三維的立體模型的一個三維虛擬環境。在一些實施例中,機械手臂模型上的加工工具模型可以是在三維虛擬環境中的設置於機械手臂模型上的一個虛擬的噴膠工具或鎖螺絲工具等虛擬加工器具。舉例而言,可藉由使用者介面輸入一個噴膠工具或鎖螺絲工具等的三維的立體模型的3D CAD檔案,並模擬出存在此三維的立體模型的一個三維虛擬環境。In some embodiments, the robot arm model can be another three-dimensional stereoscopic model in a three-dimensional virtual environment, and can be a three-dimensional stereoscopic model of a real robot arm virtualized. For example, a 3D CAD file of a three-dimensional stereoscopic model of a robot arm can be input through a user interface, and a three-dimensional virtual environment in which the three-dimensional stereoscopic model exists can be simulated. In some embodiments, the processing tool model on the robot arm model can be a virtual processing tool such as a virtual glue spraying tool or a screw locking tool set on the robot arm model in the three-dimensional virtual environment. For example, a 3D CAD file of a three-dimensional solid model of a glue spraying tool or a screw locking tool can be input through the user interface, and a three-dimensional virtual environment containing the three-dimensional solid model can be simulated.

在一些實施例中,模型位置相對關係可包括在三維虛擬環境中機械手臂模型與加工工具模型之間的組裝相對關係以及障礙物模型與機械手臂模型之間的姿態相對關係。In some embodiments, the model position relative relationship may include an assembly relative relationship between a robot arm model and a processing tool model and a posture relative relationship between an obstacle model and the robot arm model in a three-dimensional virtual environment.

換言之,障礙物模型、機械手臂模型以及加工工具模型都是模擬真實場域(例如,工廠)中的真實物件(例如,待加工面板以及具有噴膠工具的機械手臂)。In other words, the obstacle model, the robot arm model, and the processing tool model are all real objects (eg, a panel to be processed and a robot arm with a glue spraying tool) in the simulated real scene (eg, a factory).

一併參照第3圖,第3圖是本揭示一些實施例繪示的在虛擬環境SE中的障礙物模型OM的示意圖。如第3圖所示,虛擬環境SE為一個虛擬的三維空間(即,具有x、y、z方向),其中虛擬環境SE可被劃分為多個網格,其中這些網格由物件網格解析度進行調整,且各網格都能指示出一個座標,這樣的網格可以有利於後續的碰撞測試模擬的座標辨識。此外,虛擬環境SE中存在一個障礙物模型OM,障礙物模型OM為一個三維的立體模型(例如,存在障礙物模型OM的網格會指示出對應的多個座標),障礙物模型OM上存在多個虛擬加工點PP1~PP4(例如,存在虛擬加工點PP1~PP4的網格也會指示出對應的多個座標)。虛擬加工點PP1~PP4用以模擬障礙物模型OM上要進行模擬加工的點位。 Referring to FIG. 3 , FIG. 3 is a schematic diagram of an obstacle model OM in a virtual environment SE according to some embodiments of the present disclosure. As shown in FIG. 3 , the virtual environment SE is a virtual three-dimensional space (i.e., having x, y, and z directions), wherein the virtual environment SE can be divided into a plurality of grids, wherein these grids are adjusted by the object grid resolution, and each grid can indicate a coordinate, such a grid can be beneficial to the coordinate identification of the subsequent collision test simulation. In addition, there is an obstacle model OM in the virtual environment SE. The obstacle model OM is a three-dimensional solid model (for example, the grid of the obstacle model OM will indicate multiple corresponding coordinates). There are multiple virtual processing points PP1~PP4 on the obstacle model OM (for example, the grid of the virtual processing points PP1~PP4 will also indicate multiple corresponding coordinates). The virtual processing points PP1~PP4 are used to simulate the points on the obstacle model OM to be simulated.

一併參照第4圖,第4圖是本揭示一些實施例繪示在虛擬環境SE中的機械手臂模型MAM的示意圖。如第4圖所示,如同第3圖的虛擬環境SE中也可同時存在一個機械手臂模型MAM(例如,存在機械手臂模型MAM的網格會指示出對應的多個座標),且加工工具模型ST可被設置於機械手臂模型MAM的末端(例如,存在加工工具模型ST的網格會指示出對應的多個座標)。 Referring to FIG. 4, FIG. 4 is a schematic diagram of a robot arm model MAM in a virtual environment SE in some embodiments of the present disclosure. As shown in FIG. 4, a robot arm model MAM may also exist in the virtual environment SE of FIG. 3 (for example, the grid of the robot arm model MAM indicates multiple corresponding coordinates), and the processing tool model ST may be set at the end of the robot arm model MAM (for example, the grid of the processing tool model ST indicates multiple corresponding coordinates).

在一些實施例中,生產策略參數可包括碰撞安全距離、橫向偏移距離、縱向偏移距離、垂直方向距離差、傾角差以及方位角差。在一些實施例中,分別針對多個加工點位置中的各者,可根據橫向偏移距離、縱向偏移距離、垂直方向距離差、傾角差、方位角差產生機械手臂模型MAM上的加工工具模型ST的末端點的多個碰撞測試位置。接著,分別針對多個加工點位置中的各者,可根據多個碰撞測試位置產生機械手臂模型MAM的多個碰撞測試姿態,並根據碰撞安全距離、多個碰撞測試姿態以及障礙物模型從多個碰撞測試姿態選擇多個非碰撞姿態,其中機械手臂 模型MAM指示機械手臂模型上的多個參考點的六維(6 degree of freedom,6DOF)座標(即,3維移動空間及3維旋轉空間),其中多個參考點包括機械手臂模型MAM上的加工工具模型ST的末端點。接著,可將多個加工點位置各自對應的多個非碰撞姿態做為多個候選姿態。 In some embodiments, the production strategy parameters may include a collision safety distance, a lateral offset distance, a longitudinal offset distance, a vertical distance difference, a tilt difference, and an azimuth difference. In some embodiments, for each of the plurality of processing point positions, a plurality of collision test positions of the end point of the processing tool model ST on the robot arm model MAM may be generated according to the lateral offset distance, the longitudinal offset distance, the vertical distance difference, the tilt difference, and the azimuth difference. Then, for each of the multiple processing point positions, multiple collision test postures of the robot arm model MAM can be generated according to the multiple collision test positions, and multiple non-collision postures can be selected from the multiple collision test postures according to the collision safety distance, the multiple collision test postures and the obstacle model, wherein the robot arm model MAM indicates the six-dimensional (6 degree of freedom, 6DOF) coordinates (i.e., 3D movement space and 3D rotation space) of multiple reference points on the robot arm model, wherein the multiple reference points include the end points of the processing tool model ST on the robot arm model MAM. Then, the multiple non-collision postures corresponding to each of the multiple processing point positions can be used as multiple candidate postures.

值得注意的是,本揭示提供使用者輸入不同的工藝策略做為生產策略參數,且納入這些策略資訊所規劃出來的路徑可具備安全性與可行性。在一些實施例中,生產策略參數更包含但不限於追蹤或靜止加工選項、正面或背面加工選項、垂直抬升參數與圓心放射角參數等。 It is worth noting that the present disclosure provides users with input of different process strategies as production strategy parameters, and the paths planned by incorporating these strategy information can be safe and feasible. In some embodiments, the production strategy parameters further include but are not limited to tracking or static processing options, front or back processing options, vertical lifting parameters, and center radiation angle parameters.

在一些實施例中,這些碰撞測試姿態指示加工工具模型ST的末端點的六維座標。在一些實施例中,機械手臂模型MAM的各關節(joint)、由各關節連接的各機械部位、加工工具模型ST以及加工工具模型ST的末端點可做為參考點,這些參考點都具有各自的六維座標。在一些實施例中,加工工具模型ST可以是虛擬化的噴膠工具或虛擬化的鎖螺絲工具等。舉例而言,當加工工具模型ST是虛擬化的鎖螺絲工具時,分別針對多個加工點位置中的各者,可直接在多個加工點位置分別產生該機械手臂模型MAM上的加工工具模型ST的末端點的碰撞測試位置。此時,由於鎖螺絲工具不會以傾斜的姿態加工,因此,可設定加工工具模型ST的傾角差等於0,並設定一個方位角差。此外,由於鎖螺絲工具的加工特性,鎖螺絲工具需與加工點位置(即,螺絲孔)直接接觸,因此,可設定加工工具模型ST的橫向 偏移距離、縱向偏移距離以及垂直方向距離差皆等於0。 In some embodiments, these collision test postures indicate the six-dimensional coordinates of the end points of the processing tool model ST. In some embodiments, the joints of the robot arm model MAM, the mechanical parts connected by the joints, the processing tool model ST, and the end points of the processing tool model ST can be used as reference points, and these reference points all have their own six-dimensional coordinates. In some embodiments, the processing tool model ST can be a virtualized spray tool or a virtualized screw tool, etc. For example, when the processing tool model ST is a virtualized screw tool, for each of the multiple processing point positions, the collision test positions of the end points of the processing tool model ST on the robot arm model MAM can be directly generated at the multiple processing point positions. At this time, since the screw threading tool will not process in a tilted posture, the tilt angle difference of the processing tool model ST can be set to 0, and an azimuth angle difference can be set. In addition, due to the processing characteristics of the screw threading tool, the screw threading tool needs to be in direct contact with the processing point position (i.e., the screw hole), so the horizontal offset distance, longitudinal offset distance, and vertical distance difference of the processing tool model ST can be set to 0.

一併參照第5A圖,第5A圖是本揭示一些實施例繪示進行碰撞測試模擬的示意圖。如第5A圖所示,首先,針對加工點位置PP1,加工工具模型ST的末端點TP與加工點位置PP1之間會存在水平方向的橫向偏移距離h以及垂直方向的縱向偏移距離v,且加工工具模型ST的指向方向為-Z方向,進而將此初始的位置做為一個碰撞測試位置。藉此,可根據碰撞測試位置調整機械手臂模型MAM的姿態以產生一個碰撞測試姿態。當可以產生碰撞測試姿態時,模擬加工工具模型ST進行虛擬加工,並判斷是否可以對加工點位置PP1完成加工。當可以完成加工時,可判斷機械手臂模型MAM的加工工具模型ST在碰撞測試姿態下是否會與障礙物模型OM產生碰撞。當不會與障礙物模型OM產生碰撞時,可將此碰撞測試姿態做為非碰撞姿態。 Referring to FIG. 5A , FIG. 5A is a schematic diagram showing collision test simulation in some embodiments of the present disclosure. As shown in FIG. 5A , first, for the processing point position PP1, there is a horizontal offset distance h and a vertical offset distance v between the end point TP of the processing tool model ST and the processing point position PP1, and the pointing direction of the processing tool model ST is the -Z direction, and this initial position is used as a collision test position. In this way, the posture of the robot arm model MAM can be adjusted according to the collision test position to generate a collision test posture. When the collision test posture can be generated, the simulated processing tool model ST performs virtual processing and determines whether the processing of the processing point position PP1 can be completed. When the processing can be completed, it can be determined whether the processing tool model ST of the robot arm model MAM will collide with the obstacle model OM in the collision test posture. When there is no collision with the obstacle model OM, this collision test posture can be used as a non-collision posture.

在一些實施例中,判斷是否產生碰撞的方法可包括:藉由反向動力法(inverse kinematics)判斷加工工具模型ST的末端點TP是否達成碰撞測試姿態,其中,當加工工具模型ST的末端點TP達成碰撞測試姿態時,可在碰撞測試姿態下判斷機械手臂模型MAM中的多個參考點之間的多個連桿以及加工工具模型ST是否與障礙物模型OM產生碰撞。值得注意的是,此做法可忽略機械手臂模型MAM的機體本身的幾何空間,且由於這種檢測機制計算低,因此,可大量應用在路徑規劃搜尋的迭代(即,後續蟻群演 算法的迭代)之中。在一些實施例中,當加工工具模型ST的末端點TP達成碰撞測試姿態時,可在碰撞測試姿態下判斷機械手臂模型MAM的機體結構、機械手臂模型MAM中的多個參考點之間的多個連桿以及加工工具模型ST的這些座標是否與障礙物模型OM的座標產生交集。值得注意的是,此做法能確保檢測結果的可靠性但運算量較大,且僅在關鍵步驟會進行精確的檢測機制(例如,在完成後續蟻群演算法之後,可針對所找出的整個路徑進行精確的檢測機制),這樣可以同時達成高效且規劃結果可靠的目標。 In some embodiments, the method for determining whether a collision occurs may include: determining whether the end point TP of the processing tool model ST reaches a collision test posture by inverse kinematics, wherein when the end point TP of the processing tool model ST reaches a collision test posture, it is possible to determine whether multiple links between multiple reference points in the robot arm model MAM and the processing tool model ST collide with the obstacle model OM under the collision test posture. It is worth noting that this approach can ignore the geometric space of the robot arm model MAM itself, and because this detection mechanism has low computational cost, it can be widely used in the iteration of path planning search (i.e., the iteration of the subsequent ant swarm algorithm). In some embodiments, when the end point TP of the processing tool model ST reaches a collision test posture, the body structure of the robot arm model MAM, multiple links between multiple reference points in the robot arm model MAM, and whether these coordinates of the processing tool model ST intersect with the coordinates of the obstacle model OM can be judged under the collision test posture. It is worth noting that this approach can ensure the reliability of the detection results but the amount of calculation is large, and only in the key steps will the accurate detection mechanism be performed (for example, after the subsequent ant swarm algorithm is completed, the accurate detection mechanism can be performed for the entire path found), so that the goals of high efficiency and reliable planning results can be achieved at the same time.

在一些實施例中,可在碰撞測試姿態下計算機械手臂模型MAM中的多個參考點之間的多個連桿以及加工工具模型ST中的一者與機械手臂模型MAM以及障礙物模型OM之間的間隔距離是否小於或等於碰撞安全距離。接著,當間隔距離小於或等於碰撞安全距離時,可判斷已產生碰撞。 In some embodiments, it is possible to calculate whether the distance between multiple links between multiple reference points in the robot model MAM and one of the processing tool models ST and the robot model MAM and the obstacle model OM is less than or equal to the collision safety distance in the collision test posture. Then, when the distance is less than or equal to the collision safety distance, it can be determined that a collision has occurred.

接著,如第5B圖,第5B圖為第5A圖中初始的位置的局部放大圖示意圖。可將加工工具模型ST的指向方向調整為與垂直延伸線CVL之間存在一個傾角差φ(即,加工工具模型ST的中心延伸線L與穿過圓形C的中心點的垂直延伸線CVL(平行於+Z方向且在圓形C的下方)會有一個交點,且加工工具模型ST的中心延伸線L與穿過圓形C的中心點的垂直延伸線CVL之間會有一個夾角),將加工工具模型ST的末端點TP設置於於半徑為h的圓形C的圓周上,進而以上述相同的方法判斷是否能產生另一個 非碰撞姿態,其中Z軸可垂直於圓形C的圓形平面(即,與圓形C的半徑h垂直)。 Next, as shown in Figure 5B, Figure 5B is a partial enlarged schematic diagram of the initial position in Figure 5A. The pointing direction of the processing tool model ST can be adjusted to have an angle difference φ with the vertical extension line CVL (that is, the center extension line L of the processing tool model ST and the vertical extension line CVL passing through the center point of the circle C (parallel to the +Z direction and below the circle C) will have an intersection, and there will be an angle between the center extension line L of the processing tool model ST and the vertical extension line CVL passing through the center point of the circle C), and the end point TP of the processing tool model ST is set on the circumference of the circle C with a radius of h, and then the same method as above is used to determine whether another non-collision posture can be generated, in which the Z axis can be perpendicular to the circular plane of the circle C (that is, perpendicular to the radius h of the circle C).

接著,可將加工工具模型ST的末端點TP沿著圓形C旋轉一個角度差θ,並也以上述相同的方法判斷是否能產生另一個非碰撞姿態。以此類推,下一次的碰撞測試都再旋轉一個旋轉角度差θ,直到旋轉角度總和等於360度為止,便將加工工具模型ST的指向方向與垂直延伸線CVL之間的夾角再增加傾角差φ,並繼續上述相同的流程直到加工工具模型ST的指向方向調整為與垂直延伸線CVL之間的垂直夾角等於一個預設角度(可由使用者先設定好)為止。當旋轉角度總和等於360度、垂直夾角等於預設角度以及產生任一個非碰撞姿態時,可結束碰撞測試。 Next, the end point TP of the processing tool model ST can be rotated along the circle C by an angle difference θ, and the same method as above is used to determine whether another non-collision posture can be generated. Similarly, the next collision test will be rotated by another rotation angle difference θ until the total rotation angle is equal to 360 degrees, and the angle between the pointing direction of the processing tool model ST and the vertical extension line CVL will be increased by the angle difference φ, and the same process will be continued until the pointing direction of the processing tool model ST is adjusted to a vertical angle equal to a preset angle (which can be set by the user in advance) with the vertical extension line CVL. When the total rotation angle is equal to 360 degrees, the vertical angle is equal to the preset angle, and any non-collision posture is generated, the collision test can be terminated.

接著,當旋轉角度總和等於360度、垂直夾角等於預設角度以及未產生非碰撞姿態時,可將加工工具模型ST的末端點TP垂直往上移動一個垂直方向距離差d,並將加工工具模型ST的指向方向為-Z方向,並以上述相同的方式繼續進行碰撞測試以產生其他非碰撞姿態直到加工工具模型ST的指向方向再次調整為與垂直延伸線CVL之間的垂直夾角等於上述預設角度為止。當旋轉角度總和等於360度、垂直夾角等於預設角度以及產生任一個非碰撞姿態時,也可結束碰撞測試。以此類推,當旋轉角度總和等於360度、垂直夾角等於預設角度以及一直未產生非碰撞姿態時,可藉由不斷往上移動直到移動N個垂直方向距離差d為止以產生任一個非碰撞姿態,其中N可以是預設 的一個正整數。最後,針對第3圖中的其他加工點位置PP2~PP4也可藉由相同的方式產生其他非碰撞姿態。 Next, when the total rotation angle is equal to 360 degrees, the vertical angle is equal to the preset angle, and no non-collision posture is generated, the end point TP of the processing tool model ST can be moved vertically upward by a vertical distance difference d, and the pointing direction of the processing tool model ST is set to the -Z direction, and the collision test is continued in the same manner as above to generate other non-collision postures until the pointing direction of the processing tool model ST is adjusted again to a vertical angle between the vertical extension line CVL equal to the above preset angle. When the total rotation angle is equal to 360 degrees, the vertical angle is equal to the preset angle, and any non-collision posture is generated, the collision test can also be terminated. By analogy, when the total rotation angle is equal to 360 degrees, the vertical angle is equal to the preset angle, and no non-collision posture has been generated, any non-collision posture can be generated by continuously moving upward until N vertical distance differences d are moved, where N can be a preset positive integer. Finally, other non-collision postures can be generated in the same way for other processing point positions PP2~PP4 in Figure 3.

再者,如第2圖所示,於步驟S220中,對多個候選姿態執行路徑最佳化演算法以產生姿態序列,其中姿態序列包括依序排列的多個最佳姿態。在一些實施例中,路徑最佳化演算法可以是數學規劃演算法、啟發式演算法或元啟發式演算法等。在一些實施例中,可藉由數學規劃演算法、啟發式演算法或元啟發式演算法,從多個姿態群組選擇各自的最佳姿態以及產生多個最佳姿態的排列順序。接著,可根據多個最佳姿態以及排列順序產生姿態序列。 Furthermore, as shown in FIG. 2, in step S220, a path optimization algorithm is executed on multiple candidate postures to generate a posture sequence, wherein the posture sequence includes multiple optimal postures arranged in sequence. In some embodiments, the path optimization algorithm can be a mathematical planning algorithm, a heuristic algorithm, or a meta-heuristic algorithm. In some embodiments, the best postures of each group can be selected from multiple posture groups and the arrangement order of multiple optimal postures can be generated by a mathematical planning algorithm, a heuristic algorithm, or a meta-heuristic algorithm. Then, a posture sequence can be generated according to the multiple optimal postures and the arrangement order.

以下以實際的例子進一步說明本揭示的姿態群組。一併參照第6圖,第6圖是本揭示一些實施例繪示的多個姿態群組GP1~GP4的示意圖。如第6圖所示,姿態群組GP1包括多個位置COD1~COD3的候選姿態,姿態群組GP2包括多個位置COD4~COD5的候選姿態,姿態群組GP3包括多個位置COD6~COD8的候選姿態,以及姿態群組GP4包括多個位置COD9~COD11的候選姿態,其中姿態群組GP1~GP4分別對應於第3圖的加工點位置PP1~PP4。詳細而言,姿態群組GP1是由加工點位置PP1周圍的位置COD1~COD3的候選姿態所組成,姿態群組GP2是由加工點位置PP2周圍的位置COD4~COD5的候選姿態所組成,姿態群組GP3是由加工點位置PP3周圍的位置COD6~COD8的候選姿態所組成,以及姿態群組GP4是由加工點位置PP4周圍的位置COD9~COD11的 候選姿態所組成。 The following is a further explanation of the posture groups of the present disclosure with practical examples. Referring to FIG. 6, FIG. 6 is a schematic diagram of multiple posture groups GP1 to GP4 shown in some embodiments of the present disclosure. As shown in FIG. 6, posture group GP1 includes multiple candidate postures at positions COD1 to COD3, posture group GP2 includes multiple candidate postures at positions COD4 to COD5, posture group GP3 includes multiple candidate postures at positions COD6 to COD8, and posture group GP4 includes multiple candidate postures at positions COD9 to COD11, wherein posture groups GP1 to GP4 correspond to processing point positions PP1 to PP4 of FIG. 3, respectively. Specifically, posture group GP1 is composed of candidate postures of positions COD1 to COD3 around processing point position PP1, posture group GP2 is composed of candidate postures of positions COD4 to COD5 around processing point position PP2, posture group GP3 is composed of candidate postures of positions COD6 to COD8 around processing point position PP3, and posture group GP4 is composed of candidate postures of positions COD9 to COD11 around processing point position PP4.

一併參照第7圖,第7圖是本揭示一些實施例繪示的產生姿態序列的示意圖。如第7圖所示,可藉由數學規劃演算法、啟發式演算法或元啟發式演算法從姿態群組GP1~GP4中個別地取出一個候選姿態,且這些候選姿態的組合會有最短的路徑總和。詳細而言,當對姿態群組GP1~GP4進行數學規劃演算法、啟發式演算法或元啟發式演算法時,可計算出由位置COD3、位置COD5、位置COD8以及位置COD9所產生的一條路徑會有最短的路徑總和。因此,位置COD3的候選姿態、位置COD5的候選姿態、位置COD8的候選姿態以及位置COD9的候選姿態可做為依序排列的多個最佳姿態,且依序排列的多個最佳姿態可做為姿態序列。換言之,機械手臂模型MAM就是要依序採用位置COD3的候選姿態、位置COD5的候選姿態、位置COD8的候選姿態以及位置COD9的候選姿態以對第3圖的加工點位置PP1~PP4進行模擬加工。 Referring to FIG. 7, FIG. 7 is a schematic diagram of a generated posture sequence illustrated in some embodiments of the present disclosure. As shown in FIG. 7, a candidate posture can be individually selected from the posture groups GP1 to GP4 by a mathematical planning algorithm, a heuristic algorithm, or a meta-heuristic algorithm, and the combination of these candidate postures will have the shortest path sum. Specifically, when a mathematical planning algorithm, a heuristic algorithm, or a meta-heuristic algorithm is performed on the posture groups GP1 to GP4, it can be calculated that a path generated by position COD3, position COD5, position COD8, and position COD9 will have the shortest path sum. Therefore, the candidate postures of position COD3, position COD5, position COD8, and position COD9 can be used as multiple optimal postures arranged in sequence, and the multiple optimal postures arranged in sequence can be used as a posture sequence. In other words, the robot arm model MAM is to use the candidate postures of position COD3, position COD5, position COD8, and position COD9 in sequence to simulate the processing of the processing point positions PP1~PP4 in Figure 3.

再者,於步驟S230中,基於姿態序列以及障礙物模型OM執行蟻群演算法(ant colony optimization,ACO)以產生最佳加工路徑,其中最佳加工路徑包括多個最佳加工段以及多個最佳節點,其中蟻群演算法包括在多個最佳姿態的位置之間進行多個路徑產生運算以產生多個最佳加工段。 Furthermore, in step S230, the ant colony optimization (ACO) algorithm is executed based on the posture sequence and the obstacle model OM to generate an optimal processing path, wherein the optimal processing path includes multiple optimal processing segments and multiple optimal nodes, wherein the ant colony algorithm includes performing multiple path generation operations between the positions of multiple optimal postures to generate multiple optimal processing segments.

在一些實施例中,針對多個最佳姿態中排列相鄰二 者的位置之間,進行多個路徑產生運算以產生多個候選加工段以及多個候選節點,並根據螞蟻數量參數以及遞迴次數執行蟻群演算法以從多個候選加工段以及多個候選節點選擇多個最佳加工段以及多個最佳節點。在一些實施例中,遞迴次數指示執行多個遞迴階段的總次數。在一些實施例中,路徑產生運算可包括:根據多個最佳姿態中排列相鄰二者的位置、碰撞安全距離以及與障礙物模型OM對應多個座標產生多個候選加工段以及多個候選節點。 In some embodiments, for the positions of two adjacent ones arranged in multiple optimal postures, multiple path generation operations are performed to generate multiple candidate processing segments and multiple candidate nodes, and the ant swarm algorithm is executed according to the ant quantity parameter and the number of repetitions to select multiple optimal processing segments and multiple optimal nodes from the multiple candidate processing segments and multiple candidate nodes. In some embodiments, the number of repetitions indicates the total number of times the multiple repetition stages are executed. In some embodiments, the path generation operation may include: generating multiple candidate processing segments and multiple candidate nodes according to the positions of two adjacent ones arranged in multiple optimal postures, the collision safety distance, and multiple coordinates corresponding to the obstacle model OM.

以下以實際例子進一步說明本揭示的最佳加工段的產生。一併參照第8圖,第8圖是本揭示一些實施例繪示的多個最佳姿態的位置BP1~BP4的示意圖。如第8圖所示,最佳姿態的位置BP1~BP4分別位於加工點位置PP1~PP4的附近。為便於說明,以下先以最佳姿態的位置BP1~BP2之間產生最佳加工段做說明。 The following is a practical example to further illustrate the generation of the optimal processing section of the present disclosure. Referring to FIG. 8, FIG. 8 is a schematic diagram of multiple optimal posture positions BP1~BP4 shown in some embodiments of the present disclosure. As shown in FIG. 8, the optimal posture positions BP1~BP4 are respectively located near the processing point positions PP1~PP4. For the convenience of explanation, the following first describes the generation of the optimal processing section between the optimal posture positions BP1~BP2.

一併參照第9A圖,第9A圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第一次選擇中的第一步驟的示意圖。如第9A圖所示,最佳姿態的位置BP1、BP2附近存在兩個模擬障礙物OS1、OS2,且欲在最佳姿態的位置BP1到最佳姿態的位置BP2之間找到最佳加工段。此時,可進行其中一個遞迴階段。 Referring to FIG. 9A, FIG. 9A is a schematic diagram of the first step in the first selection between two adjacent positions in multiple optimal postures shown in some embodiments of the present disclosure. As shown in FIG. 9A, there are two simulated obstacles OS1 and OS2 near the positions BP1 and BP2 of the optimal posture, and the optimal processing section is to be found between the position BP1 of the optimal posture and the position BP2 of the optimal posture. At this time, one of the recursive stages can be performed.

在此遞迴階段中,可藉由路徑產生運算產生四個候選加工段PS11~PS14(假設每次都產生四個)以及對應的三個候選節點ND11~ND13。此外,可藉由相同於上述碰撞測試的方法,以辨識機械手臂模型MAM上的加工工具 模型ST的末端點TP在候選加工段PS11~PS13、候選節點ND11~ND13上不會對模擬障礙物OS1、OS2產生碰撞(即,候選加工段PS14會產生碰撞)。假設此時螞蟻數量參數設定為3、遞迴次數設定為4且候選加工段PS11~PS13的初始費洛蒙濃度設定為τ0(預設的常數),可在第一次遞迴的第一次選擇(即,第1隻螞蟻)中基於一個選擇機率選擇候選加工段PS11~PS13中的其中一者,其中選擇機率如以下公式(1)所示。 In this recursive stage, four candidate processing segments PS11 to PS14 (assuming that four are generated each time) and three corresponding candidate nodes ND11 to ND13 can be generated by path generation operation. In addition, the end point TP of the processing tool model ST on the robot arm model MAM can be identified by the same method as the above-mentioned collision test, which will not collide with the simulated obstacles OS1 and OS2 on the candidate processing segments PS11 to PS13 and the candidate nodes ND11 to ND13 (that is, the candidate processing segment PS14 will collide). Assuming that the ant number parameter is set to 3, the number of repetitions is set to 4, and the initial pheromone concentration of the candidate processing sections PS11-PS13 is set to τ 0 (a preset constant), one of the candidate processing sections PS11-PS13 can be selected in the first selection of the first repetition (i.e., the first ant) based on a selection probability, where the selection probability is shown in the following formula (1).

Figure 112110435-A0305-02-0019-7
Figure 112110435-A0305-02-0019-7

其中

Figure 112110435-A0305-02-0019-2
為第k隻螞蟻從候選節點i到候選節點j的機 率,τ ij 是位於候選節點i、j之間的路徑上的費洛蒙濃度(此時所有候選加工段的費洛蒙濃度都是τ0),η ij 為期望值,其為候選節點i、j之間的最短路徑長度之倒數(例如,從最佳姿態的位置BP1到候選節點ND11之間的最短路徑長度的倒數),z為從候選節點i可能到達的所有候選節點(即,從最佳姿態的位置BP1可能到達候選節點ND11~ND13),α是費洛蒙指數項,β是距離倒數指數項,α,β用以決定費洛蒙與距離相對重要性之參數。此時越短的路徑會有越高的選擇機率(如第9A圖中的候選加工段PS12)。 in
Figure 112110435-A0305-02-0019-2
is the probability of the kth ant going from candidate node i to candidate node j , τ ij is the pheromone concentration on the path between candidate nodes i and j (the pheromone concentration of all candidate processing sections is τ 0 at this time), η ij is the expected value, which is the reciprocal of the shortest path length between candidate nodes i and j (for example, the reciprocal of the shortest path length from the best posture position BP1 to the candidate node ND11), z is all the candidate nodes that can be reached from candidate node i (that is, from the best posture position BP1, candidate nodes ND11~ND13 can be reached), α is the pheromone index term, β is the reciprocal distance index term, α and β are parameters used to determine the relative importance of pheromone and distance. At this time, the shorter the path, the higher the chance of selection (such as the candidate processing section PS12 in Figure 9A).

一併參照第9B圖,第9B圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第一次選擇中的第二步驟的示意圖。如第9B圖所示,當選擇候選加工段PS12時,可藉由路徑產生運算產生四個候選加工段PS121~PS124以及對應的四個候選節點 ND121~ND124。此外,可藉由相同於上述碰撞測試的方法,以辨識機械手臂模型MAM上的加工工具模型ST的末端點TP在候選加工段PS121~PS122、候選節點ND121~ND122上不會對模擬障礙物OS1、OS2產生碰撞(即,候選加工段PS123~PS124會產生碰撞)。接著,可基於上述相同方法計算選擇機率以選擇候選加工段PS121~PS122中的其中一者。 Referring to FIG. 9B, FIG. 9B is a schematic diagram of the second step in the first selection between two positions arranged adjacent to each other in a plurality of optimal postures according to some embodiments of the present disclosure. As shown in FIG. 9B, when the candidate processing segment PS12 is selected, four candidate processing segments PS121-PS124 and corresponding four candidate nodes ND121-ND124 can be generated by path generation operation. In addition, the end point TP of the processing tool model ST on the robot arm model MAM can be identified by the same method as the above-mentioned collision test, which will not collide with the simulated obstacles OS1 and OS2 on the candidate processing segments PS121-PS122 and the candidate nodes ND121-ND122 (that is, the candidate processing segments PS123-PS124 will collide). Then, the selection probability can be calculated based on the same method as above to select one of the candidate processing sections PS121~PS122.

一併參照第9C圖,第9C圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第一次選擇中的第三步驟的示意圖。如第9C圖所示,當選擇候選加工段PS122時,可藉由路徑產生運算產生四個候選加工段PS1221~PS1224以及對應的四個候選節點ND1221~ND1224。此外,可藉由相同於上述碰撞測試的方法,以辨識機械手臂模型MAM上的加工工具模型ST的末端點TP在候選加工段PS1221~PS1222、候選節點ND1221~ND1223上不會對模擬障礙物OS1、OS2產生碰撞(即,候選加工段PS1224會產生碰撞)。接著,可基於上述相同方法計算選擇機率以選擇候選加工段PS1221~PS1223中的其中一者。 Referring to FIG. 9C , FIG. 9C is a schematic diagram of the third step in the first selection between two positions arranged adjacent to each other in a plurality of optimal postures, illustrated in some embodiments of the present disclosure. As shown in FIG. 9C , when the candidate processing segment PS122 is selected, four candidate processing segments PS1221 to PS1224 and corresponding four candidate nodes ND1221 to ND1224 can be generated by path generation operation. In addition, the end point TP of the processing tool model ST on the robot arm model MAM can be identified by the same method as the above-mentioned collision test, so that it will not collide with the simulated obstacles OS1 and OS2 on the candidate processing segments PS1221 to PS1222 and the candidate nodes ND1221 to ND1223 (that is, the candidate processing segment PS1224 will collide). Then, the selection probability can be calculated based on the same method as above to select one of the candidate processing sections PS1221~PS1223.

一併參照第9D圖,第9D圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第一次選擇所產生的多個候選加工段PS11~PS13、PS121~PS122、PS1221~PS1223的示意圖。如第9D圖所示,此時,在第一次選擇中可產生候選加工段 PS11~PS13、候選加工段PS121~PS122以及候選加工段PS1221~PS1223。當選擇了候選加工段PS1223且到達最佳姿態的位置BP2時,第一次選擇的路徑可包括候選加工段PS12、PS122以及PS1223。 Referring to FIG. 9D, FIG. 9D is a schematic diagram of multiple candidate processing segments PS11~PS13, PS121~PS122, PS1221~PS1223 generated by the first selection between two adjacent positions in multiple optimal postures according to some embodiments of the present disclosure. As shown in FIG. 9D, at this time, candidate processing segments PS11~PS13, candidate processing segments PS121~PS122, and candidate processing segments PS1221~PS1223 can be generated in the first selection. When candidate processing segment PS1223 is selected and the position BP2 of the optimal posture is reached, the path of the first selection may include candidate processing segments PS12, PS122, and PS1223.

一併參照第10A圖,第10A圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第二次選擇的其中一步驟的示意圖。如第10A圖所示,假設在第一次遞迴的第二次選擇中基於先前計算的選擇機率先選擇了候選加工段PS12以及PS121,可藉由路徑產生運算產生四個候選加工段PS1211~PS1214以及對應的三個候選節點ND1211~ND1212、ND1214。此外,可藉由相同於上述碰撞測試的方法,以辨識機械手臂模型MAM上的加工工具模型ST的末端點TP在候選加工段PS1211~PS1213、候選節點ND1211~ND1212上不會對模擬障礙物OS1、OS2產生碰撞(即,候選加工段PS1214會產生碰撞)。接著,可基於上述相同方法計算選擇機率以選擇候選加工段PS1211~PS1213中的其中一者。 Referring to FIG. 10A , FIG. 10A is a schematic diagram of one step of the second selection between two positions arranged adjacent to each other in a plurality of optimal postures according to some embodiments of the present disclosure. As shown in FIG. 10A , assuming that in the second selection of the first recursion, the selection machine first selects the candidate processing segments PS12 and PS121 based on the previous calculation, four candidate processing segments PS1211 to PS1214 and corresponding three candidate nodes ND1211 to ND1212 and ND1214 can be generated by path generation operation. In addition, the same method as the above collision test can be used to identify that the end point TP of the processing tool model ST on the robot arm model MAM will not collide with the simulated obstacles OS1 and OS2 on the candidate processing segments PS1211~PS1213 and the candidate nodes ND1211~ND1212 (that is, the candidate processing segment PS1214 will collide). Then, the selection probability can be calculated based on the same method as above to select one of the candidate processing segments PS1211~PS1213.

一併參照第10B圖,第10B圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第二次選擇所產生的多個候選加工段PS11~PS13、PS121~PS122、PS1211~PS1213、PS1221~PS1223的示意圖。如第10B圖所示,此時,在第二次選擇中可產生候選加工段PS1211~PS1213。當選擇了候選加工段 PS1213且到達最佳姿態的位置BP2時,第二次選擇的路徑可包括候選加工段PS12、PS121以及PS1213。 Referring to FIG. 10B, FIG. 10B is a schematic diagram of multiple candidate processing segments PS11~PS13, PS121~PS122, PS1211~PS1213, PS1221~PS1223 generated by the second selection between two adjacent positions in multiple optimal postures according to some embodiments of the present disclosure. As shown in FIG. 10B, at this time, candidate processing segments PS1211~PS1213 can be generated in the second selection. When candidate processing segment PS1213 is selected and the position BP2 of the optimal posture is reached, the path of the second selection may include candidate processing segments PS12, PS121 and PS1213.

一併參照第11A圖,第11A圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第三次選擇的其中一步驟的示意圖。如第11A圖所示,假設在第一次遞迴的第三次選擇中基於先前計算的選擇機率先選擇了候選加工段PS13,可藉由路徑產生運算產生四個候選加工段PS131~PS134以及對應的三個候選節點ND131~ND132、ND134。此外,可藉由相同於上述碰撞測試的方法,以辨識機械手臂模型MAM上的加工工具模型ST的末端點TP在候選加工段PS133~PS134、候選節點ND134上不會對模擬障礙物OS1、OS2產生碰撞(即,候選加工段PS131~PS132會產生碰撞)。接著,可基於上述相同方法計算選擇機率以選擇候選加工段PS133~PS134中的其中一者。 Referring to FIG. 11A , FIG. 11A is a schematic diagram of one step of the third selection between two positions arranged adjacent to each other in a plurality of optimal postures according to some embodiments of the present disclosure. As shown in FIG. 11A , assuming that the selection machine first selects the candidate processing segment PS13 based on the previously calculated selection in the third selection of the first recursion, four candidate processing segments PS131 to PS134 and corresponding three candidate nodes ND131 to ND132 and ND134 can be generated by path generation operation. In addition, the same method as the above collision test can be used to identify that the end point TP of the processing tool model ST on the robot arm model MAM will not collide with the simulated obstacles OS1 and OS2 on the candidate processing segments PS133~PS134 and the candidate node ND134 (that is, the candidate processing segments PS131~PS132 will collide). Then, the selection probability can be calculated based on the same method as above to select one of the candidate processing segments PS133~PS134.

一併參照第11B圖,第11B圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第三次選擇所產生的多個候選加工段PS11~PS13、PS121~PS122、PS1211~PS1213、PS1221~PS1223、PS133~PS134的示意圖。如第11B圖所示,此時,在第三次選擇中可產生候選加工段PS133~PS134。當選擇了候選加工段PS133且到達最佳姿態的位置BP2時,第三次選擇的路徑可包括候選加工段PS13以及PS133。接著,在第三次選擇後(即,第一次遞迴結束),可將上述所有候 選加工段的費洛蒙濃度設定如以下公式(2)。 Referring to FIG. 11B, FIG. 11B is a schematic diagram of multiple candidate processing segments PS11~PS13, PS121~PS122, PS1211~PS1213, PS1221~PS1223, PS133~PS134 generated by the third selection between two positions arranged adjacent to each other in multiple optimal postures according to some embodiments of the present disclosure. As shown in FIG. 11B, at this time, candidate processing segments PS133~PS134 can be generated in the third selection. When candidate processing segment PS133 is selected and reaches the position BP2 of the optimal posture, the path of the third selection may include candidate processing segments PS13 and PS133. Then, after the third selection (i.e., the first recursion ends), the pheromone concentration of all the above-mentioned candidate processing segments can be set as shown in the following formula (2).

Figure 112110435-A0305-02-0023-3
Figure 112110435-A0305-02-0023-3

其中τ ij 是位於候選節點i、j之間的路徑上的費洛蒙濃度(此時所有候選加工段的費洛蒙濃度都是τ0),t為第t次遞迴,ρ是費洛蒙的蒸發系數,

Figure 112110435-A0305-02-0023-4
為第k隻螞蟻(即,第k次選擇路徑)在候選節點i、j之間的路徑上所釋放的費洛蒙數量,且設為第k次選擇路徑總長度的倒數與常數Q的乘積,其中ρ以及Q皆為預先設定好的常數。此外,若第k次沒有選擇經過候選節點i、j之間,則為0,不會在其上釋放費洛蒙。換言之,每次遞迴結束都可利用公式(2)更新所有候選加工段的費洛蒙濃度。接著,之後的2~4次遞迴也是以相同的方式產生並選擇路徑以及更新費洛蒙濃度。 Where τ ij is the pheromone concentration on the path between candidate nodes i and j (the pheromone concentration of all candidate processing sections is τ 0 at this time), t is the t-th recurrence, ρ is the evaporation coefficient of pheromone,
Figure 112110435-A0305-02-0023-4
is the amount of pheromone released by the kth ant (i.e., the kth selected path) on the path between candidate nodes i and j , and is set to the product of the reciprocal of the total length of the kth selected path and the constant Q, where ρ and Q are both pre-set constants. In addition, if the kth ant does not choose to pass through the candidate nodes i and j , it is 0 and no pheromone will be released on it. In other words, at the end of each recursion, the pheromone concentration of all candidate processing sections can be updated using formula (2). Then, the next 2 to 4 recursions are also generated and the path is selected and the pheromone concentration is updated in the same way.

在一些實施例中,加工路徑規劃模擬裝置100更可包括使用者介面(未繪示),並可藉由使用者介面顯示模擬結果。在一些實施例中,使用者介面可以由顯示器或投影器等各種顯影電路實現。 In some embodiments, the processing path planning simulation device 100 may further include a user interface (not shown), and the simulation results may be displayed through the user interface. In some embodiments, the user interface may be implemented by various display circuits such as a display or a projector.

一併參照第12圖,第12圖是本揭示一些實施例繪示的模擬結果的示意圖。如第12圖所示,藉由第9A~11B圖的方法,可在最佳姿態的位置BP1~BP4之間產生多個最佳加工段BPS1~BPS5。此外,除了最佳姿態的位置BP1~BP4之外,還會產生節點ND1~ND2,並在節點ND1~ND2產生機械手臂模型MAM的另外兩個操作姿態。藉此,最佳姿態的位置BP1~BP4以及節點ND1~ND2可做為多個最佳節點,多個最佳加工段 BPS1~BPS5以及多個最佳節點可組成最佳加工路徑,此最佳加工路徑不僅具有最短路徑長度且可避免與障礙物之間的碰撞。 Refer to FIG. 12, which is a schematic diagram of simulation results shown in some embodiments of the present disclosure. As shown in FIG. 12, by the method of FIG. 9A to FIG. 11B, multiple optimal processing segments BPS1 to BPS5 can be generated between the positions BP1 to BP4 of the optimal posture. In addition, in addition to the positions BP1 to BP4 of the optimal posture, nodes ND1 to ND2 are also generated, and two other operating postures of the robot arm model MAM are generated at the nodes ND1 to ND2. Thus, the positions BP1 to BP4 of the optimal posture and the nodes ND1 to ND2 can be used as multiple optimal nodes, and multiple optimal processing segments BPS1 to BPS5 and multiple optimal nodes can form an optimal processing path, which not only has the shortest path length but also can avoid collisions with obstacles.

在一些實施例中,根據模擬結果調整最佳加工路徑,其中調整後的最佳加工路徑包括多個調整後的最佳加工段以及多個調整後的最佳節點。接著,在虛擬環境SE中的障礙物模型OM上,基於調整後的最佳加工路徑,模擬機械手臂模型MAM上的加工工具模型ST的末端點TP依序以與多個調整後的最佳節點對應的姿態對多個加工點位置PP1~PP4進行虛擬加工操作以產生調整後的模擬結果。 In some embodiments, the optimal processing path is adjusted according to the simulation result, wherein the adjusted optimal processing path includes multiple adjusted optimal processing segments and multiple adjusted optimal nodes. Then, on the obstacle model OM in the virtual environment SE, based on the adjusted optimal processing path, the end point TP of the processing tool model ST on the simulated robot arm model MAM sequentially performs virtual processing operations on multiple processing point positions PP1-PP4 in postures corresponding to the multiple adjusted optimal nodes to generate adjusted simulation results.

在一些實施例中,可利用路徑修剪(path pruning)演算法刪除最佳加工路徑中的其中兩個最佳加工段之間的最佳節點以產生調整後的最佳加工段。舉例而言,可隨機地選擇其中多個最佳加工段之間的相鄰三個最佳節點,將最前面與最後面的最佳節點相連以產生一個測試加工段,並對此測試加工段進行上述碰撞測試。若未產生碰撞,便可刪除掉相鄰三個最佳節點中的中間的最佳節點,並將此測試加工段作為調整後的最佳加工段以產生調整後的最佳加工路徑。在一些實施例中,可藉由貝茲曲線(Bézier curve)演算法或B樣條(B-spline)演算法等平滑化演算法對最佳加工路徑進行平滑化。 In some embodiments, a path pruning algorithm can be used to delete the best node between two best processing segments in the best processing path to generate an adjusted best processing segment. For example, three adjacent best nodes between multiple best processing segments can be randomly selected, and the front and rear best nodes can be connected to generate a test processing segment, and the above-mentioned collision test can be performed on this test processing segment. If no collision occurs, the middle best node among the three adjacent best nodes can be deleted, and this test processing segment can be used as the adjusted best processing segment to generate an adjusted best processing path. In some embodiments, the best processing path can be smoothed by a smoothing algorithm such as a Bézier curve algorithm or a B-spline algorithm.

在一些實施例中,可根據最佳加工路徑產生路徑檔,其中路徑檔指示機械手臂模型MAM在多個最佳節點的姿態。以下表(1)示出一個路徑檔的例子。 In some embodiments, a path file may be generated based on the optimal processing path, wherein the path file indicates the posture of the robot arm model MAM at multiple optimal nodes. The following table (1) shows an example of a path file.

Figure 112110435-A0305-02-0025-5
Figure 112110435-A0305-02-0025-5

如以上表(1)所示,路徑檔可包括多個最佳節點的六維座標。藉此,使用者可藉由使用者介面,觀看此路徑檔。 As shown in Table (1) above, the path file may include the six-dimensional coordinates of multiple optimal nodes. Thus, the user can view the path file through the user interface.

綜上所述,本揭示的加工路徑規劃模擬裝置以及方法首先輸入各種模擬用的參數以及模型,以決定對加工點位置進行模擬加工的最佳姿態,再決定這些最佳姿態的模擬加工順序,進而結合蟻群演算法以及路徑產生運算在最佳姿態之間產生最佳加工路徑。藉此,只要輸入所需要的參數以及模型,就可自動化地模擬出實體待加工物件上的 最佳加工路徑。因此,將可解決現場教點與編程所造成的停線成本以及時間成本,更進一步解決規劃路徑並非最佳的問題。 In summary, the processing path planning simulation device and method disclosed in the present invention first input various simulation parameters and models to determine the best posture for simulating the processing of the processing point position, and then determine the simulation processing order of these best postures, and then combine the ant colony algorithm and path generation operation to generate the best processing path between the best postures. In this way, as long as the required parameters and models are input, the best processing path on the physical object to be processed can be automatically simulated. Therefore, the line stop cost and time cost caused by on-site teaching points and programming can be solved, and the problem that the planned path is not optimal can be further solved.

雖然本揭示已以實施例揭露如上,然其並非用以限定本揭示,任何所屬技術領域中具有通常知識者,在不脫離本揭示的精神和範圍內,當可作些許的更動與潤飾,故本揭示的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present disclosure has been disclosed as above by way of embodiments, it is not intended to limit the present disclosure. Any person with ordinary knowledge in the relevant technical field may make some changes and modifications within the spirit and scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the scope defined by the attached patent application.

100:加工路徑規劃模擬裝置 100: Processing path planning simulation device

110:記憶體 110: Memory

120:處理器 120: Processor

S210~S240:步驟 S210~S240: Steps

SE:虛擬環境 SE: Virtual Environment

PP1~PP4:加工點位置/虛擬加工點 PP1~PP4: Processing point location/virtual processing point

OM:障礙物模型 OM: Obstacle Model

MAM:機械手臂模型 MAM: Robotic Arm Model

θ:旋轉角度差 θ: rotation angle difference

φ:傾角差 φ: Tilt difference

CVL:垂直延伸線 CVL:Vertical extension line

ST:加工工具模型 ST: Processing tool model

h:橫向偏移距離 h: lateral offset distance

v:縱向偏移距離 v: longitudinal offset distance

d:垂直方向距離差 d: vertical distance difference

TP:末端點 TP: terminal point

L:中心延伸線 L: Center extension line

C:圓形 C: Round

GP1~GP4:姿態群組 GP1~GP4: Posture group

COD1~COD11:位置 COD1~COD11: Location

BP1~BP4:最佳姿態的位置 BP1~BP4: The best posture position

OS1~OS2:模擬障礙物 OS1~OS2: Simulated obstacles

PS11~PS14,PS121~PS124,PS1211~PS1214,PS1221~PS1224,PS131~PS134:候選加工段 PS11~PS14,PS121~PS124,PS1211~PS1214,PS1221~PS1224,PS131~PS134: Candidate processing sections

ND11~ND13,ND121~ND124,ND1211,ND1212,ND1214,ND1221~ND1224,ND131,ND132,ND134:候選節點 ND11~ND13,ND121~ND124,ND1211,ND1212,ND1214,ND1221~ND1224,ND131,ND132,ND134: candidate nodes

ND1~ND2:節點 ND1~ND2: Node

BPS1~BPS5:最佳加工段 BPS1~BPS5: Optimal processing section

第1圖是本揭示一些實施例繪示的加工路徑規劃模擬裝置的方塊圖。 第2圖是本揭示一些實施例繪示的加工路徑規劃模擬方法的流程圖。 第3圖是本揭示一些實施例繪示的在虛擬環境中的障礙物模型的示意圖。 第4圖是本揭示一些實施例繪示進行在虛擬環境中的機械手臂模型的示意圖。 第5A圖是本揭示一些實施例繪示進行碰撞測試模擬的示意圖。 第5B圖為第5A圖中初始的位置的局部放大圖示意圖。 第6圖是本揭示一些實施例繪示的多個姿態群組的示意圖。 第7圖是本揭示一些實施例繪示的產生姿態序列的示意圖。 第8圖是本揭示一些實施例繪示的多個最佳姿態的位置的示意圖。 第9A圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第一次選擇中的第一步驟的示意圖。 第9B圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第一次選擇中的第二步驟的示意圖。 第9C圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第一次選擇中的第三步驟的示意圖。 第9D圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第一次選擇所產生的多個候選加工段的示意圖。 第10A圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第二次選擇的其中一步驟的示意圖。 第10B圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第二次選擇所產生的多個候選加工段的示意圖。 第11A圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第三次選擇的其中一步驟的示意圖。 第11B圖是本揭示一些實施例繪示的針對多個最佳姿態中排列相鄰二者的位置之間第三次選擇所產生的多個候選加工段的示意圖。 第12圖是本揭示一些實施例繪示的模擬結果的示意圖。 FIG. 1 is a block diagram of a processing path planning simulation device illustrated in some embodiments of the present disclosure. FIG. 2 is a flow chart of a processing path planning simulation method illustrated in some embodiments of the present disclosure. FIG. 3 is a schematic diagram of an obstacle model in a virtual environment illustrated in some embodiments of the present disclosure. FIG. 4 is a schematic diagram of a robot arm model in a virtual environment illustrated in some embodiments of the present disclosure. FIG. 5A is a schematic diagram of a collision test simulation illustrated in some embodiments of the present disclosure. FIG. 5B is a schematic diagram of a partial enlarged view of the initial position in FIG. 5A. FIG. 6 is a schematic diagram of multiple posture groups illustrated in some embodiments of the present disclosure. FIG. 7 is a schematic diagram of a generated posture sequence illustrated in some embodiments of the present disclosure. FIG. 8 is a schematic diagram of the positions of multiple optimal postures shown in some embodiments of the present disclosure. FIG. 9A is a schematic diagram of the first step in the first selection between positions arranged adjacent to each other in multiple optimal postures shown in some embodiments of the present disclosure. FIG. 9B is a schematic diagram of the second step in the first selection between positions arranged adjacent to each other in multiple optimal postures shown in some embodiments of the present disclosure. FIG. 9C is a schematic diagram of the third step in the first selection between positions arranged adjacent to each other in multiple optimal postures shown in some embodiments of the present disclosure. FIG. 9D is a schematic diagram of multiple candidate processing sections generated by the first selection between positions arranged adjacent to each other in multiple optimal postures shown in some embodiments of the present disclosure. FIG. 10A is a schematic diagram of one step of the second selection between two positions arranged adjacent to each other in a plurality of optimal postures, as shown in some embodiments of the present disclosure. FIG. 10B is a schematic diagram of multiple candidate processing segments generated by the second selection between two positions arranged adjacent to each other in a plurality of optimal postures, as shown in some embodiments of the present disclosure. FIG. 11A is a schematic diagram of one step of the third selection between two positions arranged adjacent to each other in a plurality of optimal postures, as shown in some embodiments of the present disclosure. FIG. 11B is a schematic diagram of multiple candidate processing segments generated by the third selection between two positions arranged adjacent to each other in a plurality of optimal postures, as shown in some embodiments of the present disclosure. FIG. 12 is a schematic diagram of simulation results, as shown in some embodiments of the present disclosure.

S210~S240:步驟 S210~S240: Steps

Claims (10)

一種加工路徑規劃模擬裝置,包括:一記憶體,儲存多個指令;一處理器,連接該記憶體,用以存取該些指令,並執行以下操作:根據在一虛擬環境中的一障礙物模型、在該障礙物模型上的多個加工點位置、在該虛擬環境中的一機械手臂模型、該機械手臂模型上的一加工工具模型、模型位置相對關係以及生產策略參數進行一碰撞測試模擬以產生該機械手臂模型的多個候選姿態,其中該碰撞測試模擬為模擬該加工工具模型對該些加工點位置中的各者進行加工時,該加工工具模型不會與該障礙物模型產生碰撞的該機械手臂模型的多個非碰撞姿態,且將該些加工點位置各自對應的該些非碰撞姿態做為該些候選姿態,其中該些候選姿態分為多個姿態群組;對該些候選姿態執行路徑最佳化演算法以產生一姿態序列,其中該姿態序列包括依序排列的多個最佳姿態,其中該些姿態群組分別對應於多個最佳位置,該些最佳位置分別對應於該些加工點位置且分別在該些加工點位置的周圍,該些最佳位置所產生的一條路徑會有最短的路徑總和,該些最佳位置各自對應的該些候選姿態是做為依序排列的該些最佳姿態;基於該姿態序列以及該障礙物模型執行一蟻群演算法以產生一最佳加工路徑,其中該最佳加工路徑包括多個 最佳加工段以及多個最佳節點,其中該蟻群演算法包括藉由在該些最佳姿態的該些最佳位置之間進行多個路徑產生運算以產生該些最佳加工段;以及在該虛擬環境中的該障礙物模型上,基於該最佳加工路徑,模擬該機械手臂模型上的一加工工具模型的一末端點依序以與該些最佳節點對應的姿態對該些加工點位置進行虛擬加工操作以產生一模擬結果。 A processing path planning simulation device includes: a memory storing a plurality of instructions; a processor connected to the memory for accessing the instructions and performing the following operations: performing a collision test simulation based on an obstacle model in a virtual environment, a plurality of processing point positions on the obstacle model, a robot arm model in the virtual environment, a processing tool model on the robot arm model, a relative relationship between model positions and a production strategy parameter to generate a plurality of processing point positions of the robot arm model; candidate postures, wherein the collision test simulation is to simulate the multiple non-collision postures of the robot arm model in which the processing tool model will not collide with the obstacle model when the processing tool model processes each of the processing point positions, and the non-collision postures corresponding to each of the processing point positions are used as the candidate postures, wherein the candidate postures are divided into a plurality of posture groups; a path optimization algorithm is executed on the candidate postures to generate a posture sequence, wherein the posture sequence includes A plurality of optimal postures are arranged in sequence, wherein the posture groups correspond to a plurality of optimal positions, respectively, the optimal positions correspond to the processing point positions and are respectively around the processing point positions, a path generated by the optimal positions will have the shortest path sum, and the candidate postures corresponding to the optimal positions are used as the optimal postures arranged in sequence; an ant swarm algorithm is executed based on the posture sequence and the obstacle model to generate an optimal processing path, wherein the optimal processing The path includes multiple optimal processing segments and multiple optimal nodes, wherein the ant colony algorithm includes generating the optimal processing segments by performing multiple path generation operations between the optimal positions of the optimal postures; and on the obstacle model in the virtual environment, based on the optimal processing path, simulating an end point of a processing tool model on the robot arm model to perform virtual processing operations on the processing point positions in sequence with postures corresponding to the optimal nodes to generate a simulation result. 如請求項1所述之加工路徑規劃模擬裝置,其中該生產策略參數包括一碰撞安全距離、一橫向偏移距離、一縱向偏移距離、一垂直方向距離差、一傾角差以及一方位角差,其中該處理器更用以執行以下操作:分別針對該些加工點位置中的各者,根據該橫向偏移距離、該縱向偏移距離、該垂直方向距離差、該傾角差、該方位角差產生該機械手臂模型上的該加工工具模型的該末端點的多個碰撞測試位置;分別針對該些加工點位置中的各者,根據該些碰撞測試位置產生該機械手臂模型的多個碰撞測試姿態,並根據該碰撞安全距離、該些碰撞測試姿態以及該障礙物模型從該些碰撞測試姿態選擇該些非碰撞姿態,其中該機械手臂模型指示該機械手臂模型上的多個參考點的六維座標,其中該些參考點包括該機械手臂模型上的一加工工具模型的一末端點;以及將該些加工點位置各自對應的該些非碰撞姿態做為該些 候選姿態。 A processing path planning simulation device as described in claim 1, wherein the production strategy parameters include a collision safety distance, a lateral offset distance, a longitudinal offset distance, a vertical distance difference, an inclination difference, and an azimuth difference, wherein the processor is further used to perform the following operations: for each of the processing point positions, generate multiple collision test positions of the end point of the processing tool model on the robot arm model according to the lateral offset distance, the longitudinal offset distance, the vertical distance difference, the inclination difference, and the azimuth difference; for each of the processing point positions, generate multiple collision test positions of the end point of the processing tool model on the robot arm model according to the lateral offset distance, the longitudinal offset distance, the vertical distance difference, the inclination difference, and the azimuth difference; For each of the processing point positions, a plurality of collision test postures of the robot model are generated according to the collision test positions, and the non-collision postures are selected from the collision test postures according to the collision safety distance, the collision test postures and the obstacle model, wherein the robot model indicates the six-dimensional coordinates of a plurality of reference points on the robot model, wherein the reference points include an end point of a processing tool model on the robot model; and the non-collision postures corresponding to each of the processing point positions are used as the candidate postures. 如請求項1所述之加工路徑規劃模擬裝置,其中該路徑最佳化演算法為數學規劃演算法、啟發式演算法或元啟發式演算法,其中該處理器更用以執行以下操作:藉由該數學規劃演算法、該啟發式演算法或該元啟發式演算法,從該些姿態群組選擇各自的最佳姿態以及產生該些最佳姿態的一排列順序;以及根據該些最佳姿態以及該排列順序產生該姿態序列。 A processing path planning simulation device as described in claim 1, wherein the path optimization algorithm is a mathematical planning algorithm, a heuristic algorithm or a meta-heuristic algorithm, and wherein the processor is further used to perform the following operations: selecting the respective best postures from the posture groups and generating a sequence of the best postures by the mathematical planning algorithm, the heuristic algorithm or the meta-heuristic algorithm; and generating the posture sequence according to the best postures and the sequence. 如請求項2所述之加工路徑規劃模擬裝置,其中該處理器更用以執行以下操作:根據該些最佳姿態中排列相鄰二者的該些最佳位置、該碰撞安全距離以及與該障礙物模型對應多個座標進行該些路徑產生運算以產生多個候選加工段以及多個候選節點,並根據螞蟻數量參數以及一遞迴次數執行該蟻群演算法以從該些候選加工段以及該些候選節點選擇多個最佳加工段以及多個最佳節點。 The processing path planning simulation device as described in claim 2, wherein the processor is further used to perform the following operations: performing the path generation operations according to the optimal positions of the two adjacent ones arranged in the optimal postures, the collision safety distance, and the multiple coordinates corresponding to the obstacle model to generate multiple candidate processing segments and multiple candidate nodes, and executing the ant swarm algorithm according to the ant quantity parameter and the number of iterations to select multiple optimal processing segments and multiple optimal nodes from the candidate processing segments and the candidate nodes. 如請求項1所述之加工路徑規劃模擬裝置,其中該處理器更用以執行以下操作:根據該模擬結果調整該最佳加工路徑,其中調整後的最佳加工路徑包括多個調整後的最佳加工段以及多個調整後 的最佳節點;以及在該虛擬環境中的該障礙物模型上,基於該調整後的最佳加工路徑,模擬該機械手臂模型上的該加工工具模型的該末端點依序以與該些調整後的最佳節點對應的姿態對該些加工點位置進行該虛擬加工操作以產生調整後的模擬結果。 The processing path planning simulation device as described in claim 1, wherein the processor is further used to perform the following operations: adjusting the optimal processing path according to the simulation result, wherein the adjusted optimal processing path includes a plurality of adjusted optimal processing segments and a plurality of adjusted optimal nodes; and on the obstacle model in the virtual environment, based on the adjusted optimal processing path, simulating the end point of the processing tool model on the robot arm model to perform the virtual processing operation on the processing point positions in sequence with the posture corresponding to the adjusted optimal nodes to generate the adjusted simulation result. 一種加工路徑規劃模擬方法,包括:根據在一虛擬環境中的一障礙物模型、在該障礙物模型上的多個加工點位置、在該虛擬環境中的一機械手臂模型、該機械手臂模型上的一加工工具模型、模型位置相對關係以及生產策略參數進行一碰撞測試模擬以產生該機械手臂模型的多個候選姿態,其中該碰撞測試模擬為模擬該加工工具模型對該些加工點位置中的各者進行加工時,該加工工具模型不會與該障礙物模型產生碰撞的該機械手臂模型的多個非碰撞姿態,且將該些加工點位置各自對應的該些非碰撞姿態做為該些候選姿態,其中該些候選姿態分為多個姿態群組;對該些候選姿態執行路徑最佳化演算法以產生一姿態序列,其中該姿態序列包括依序排列的多個最佳姿態,其中該些姿態群組分別對應於多個最佳位置,該些最佳位置分別對應於該些加工點位置且分別在該些加工點位置的周圍,該些最佳位置所產生的一條路徑會有最短的路徑總和,該些最佳位置各自對應的該些候選姿態是做為依序排列的該 些最佳姿態;基於該姿態序列以及該障礙物模型執行一蟻群演算法以產生一最佳加工路徑,其中該最佳加工路徑包括多個最佳加工段以及多個最佳節點,其中該蟻群演算法包括藉由在該些最佳姿態的該些最佳位置之間進行多個路徑產生運算以產生該些最佳加工段;以及在該虛擬環境中的該障礙物模型上,基於該最佳加工路徑,模擬該機械手臂模型上的一加工工具模型的一末端點依序以該些最佳節點對該些加工點位置進行虛擬加工操作以產生一模擬結果。 A processing path planning simulation method includes: performing a collision test simulation based on an obstacle model in a virtual environment, multiple processing point positions on the obstacle model, a robot arm model in the virtual environment, a processing tool model on the robot arm model, a relative relationship between model positions, and a production strategy parameter to generate multiple candidate postures of the robot arm model, wherein the collision test simulation is to simulate the processing tool model to the processing points. When processing each of the point positions, the processing tool model will not collide with the obstacle model, and the non-collision postures corresponding to each of the processing point positions are used as the candidate postures, wherein the candidate postures are divided into a plurality of posture groups; a path optimization algorithm is executed on the candidate postures to generate a posture sequence, wherein the posture sequence includes a plurality of optimal postures arranged in sequence, wherein the postures The groups correspond to a plurality of optimal positions, respectively, and the optimal positions correspond to the processing point positions and are respectively around the processing point positions. A path generated by the optimal positions will have the shortest path sum. The candidate postures corresponding to the optimal positions are used as the optimal postures arranged in sequence. An ant swarm algorithm is executed based on the posture sequence and the obstacle model to generate an optimal processing path, wherein the optimal processing path includes multiple An optimal processing segment and multiple optimal nodes, wherein the ant colony algorithm includes generating the optimal processing segments by performing multiple path generation operations between the optimal positions of the optimal postures; and on the obstacle model in the virtual environment, based on the optimal processing path, simulating an end point of a processing tool model on the robot arm model to perform virtual processing operations on the processing point positions in sequence with the optimal nodes to generate a simulation result. 如請求項6所述之加工路徑規劃模擬方法,其中該生產策略參數包括一碰撞安全距離、一橫向偏移距離、一縱向偏移距離、一垂直方向距離差、一傾角差以及一方位角差,其中根據在該虛擬環境中的該障礙物模型、在該障礙物模型上的該些加工點位置、在該虛擬環境中的該機械手臂模型以及該生產策略參數進行碰該撞測試模擬以產生該機械手臂模型的該些候選姿態的步驟包括:分別針對該些加工點位置中的各者,根據該橫向偏移距離、該縱向偏移距離、該垂直方向距離差、該傾角差、該方位角差產生該機械手臂模型上的該加工工具模型的該末端點的多個碰撞測試位置;分別針對該些加工點位置中的各者,根據該些碰撞測試位置產生該機械手臂模型的多個碰撞測試姿態,並根據該 碰撞安全距離、該些碰撞測試姿態以及該障礙物模型從該些碰撞測試姿態選擇該些非碰撞姿態,其中該機械手臂模型指示該機械手臂模型上的多個參考點的六維座標,其中該些參考點包括該機械手臂模型上的一加工工具模型的一末端點;以及將該些加工點位置各自對應的該些非碰撞姿態做為該些候選姿態。 A processing path planning simulation method as described in claim 6, wherein the production strategy parameters include a collision safety distance, a lateral offset distance, a longitudinal offset distance, a vertical distance difference, a tilt difference, and an azimuth difference, wherein the step of performing a collision test simulation to generate the candidate postures of the robot model according to the obstacle model in the virtual environment, the processing point positions on the obstacle model, the robot arm model in the virtual environment, and the production strategy parameters includes: for each of the processing point positions, according to the lateral offset distance, the longitudinal offset distance, the vertical distance difference, the tilt difference, the azimuth difference, The invention relates to a method for generating a plurality of collision test positions of the end point of the processing tool model on the robot arm model by using a difference; generating a plurality of collision test postures of the robot arm model according to the collision test positions for each of the processing point positions, and selecting the non-collision postures from the collision test postures according to the collision safety distance, the collision test postures and the obstacle model, wherein the robot arm model indicates the six-dimensional coordinates of a plurality of reference points on the robot arm model, wherein the reference points include an end point of a processing tool model on the robot arm model; and taking the non-collision postures corresponding to the processing point positions as the candidate postures. 如請求項6所述之加工路徑規劃模擬方法,其中該路徑最佳化演算法為數學規劃演算法、啟發式演算法或元啟發式演算法,其中對該些候選姿態執行該路徑最佳化演算法以產生該姿態序列的步驟包括:藉由該數學規劃演算法、該啟發式演算法或該元啟發式演算法,從該些姿態群組選擇各自的最佳姿態以及產生該些最佳姿態的一排列順序;以及根據該些最佳姿態以及該排列順序產生該姿態序列。 A processing path planning simulation method as described in claim 6, wherein the path optimization algorithm is a mathematical planning algorithm, a heuristic algorithm or a meta-heuristic algorithm, wherein the step of executing the path optimization algorithm on the candidate postures to generate the posture sequence includes: selecting the respective best postures from the posture groups and generating a permutation sequence of the best postures by the mathematical planning algorithm, the heuristic algorithm or the meta-heuristic algorithm; and generating the posture sequence according to the best postures and the permutation sequence. 如請求項7所述之加工路徑規劃模擬方法,其中基於該姿態序列以及該障礙物模型執行該蟻群演算法以產生該最佳加工路徑的步驟包括:根據該些最佳姿態中排列相鄰二者的該些最佳位置、該碰撞安全距離以及與該障礙物模型對應多個座標進行該些路徑產生運算以產生多個候選加工段以及多個候選節點,並根據螞蟻數量參數以及一遞迴次數執行該蟻群演算法以 從該些候選加工段以及該些候選節點選擇多個最佳加工段以及多個最佳節點。 The processing path planning simulation method as described in claim 7, wherein the step of executing the ant swarm algorithm based on the posture sequence and the obstacle model to generate the optimal processing path includes: performing the path generation operations according to the optimal positions of the two adjacent ones arranged in the optimal postures, the collision safety distance, and the multiple coordinates corresponding to the obstacle model to generate multiple candidate processing segments and multiple candidate nodes, and executing the ant swarm algorithm according to the ant quantity parameter and the number of iterations to select multiple optimal processing segments and multiple optimal nodes from the candidate processing segments and the candidate nodes. 如請求項6所述之加工路徑規劃模擬方法,更包括:根據該模擬結果調整該最佳加工路徑,其中調整後的最佳加工路徑包括多個調整後的最佳加工段以及多個調整後的最佳節點;以及在該虛擬環境中的該障礙物模型上,基於該調整後的最佳加工路徑,模擬該機械手臂模型上的該加工工具模型的該末端點依序以與該些調整後的最佳節點對應的姿態對該些加工點位置進行該虛擬加工操作以產生調整後的模擬結果。 The processing path planning simulation method as described in claim 6 further includes: adjusting the optimal processing path according to the simulation result, wherein the adjusted optimal processing path includes a plurality of adjusted optimal processing segments and a plurality of adjusted optimal nodes; and on the obstacle model in the virtual environment, based on the adjusted optimal processing path, simulating the end point of the processing tool model on the robot arm model to sequentially perform the virtual processing operation on the processing point positions with the posture corresponding to the adjusted optimal nodes to generate the adjusted simulation result.
TW112110435A 2023-03-21 2023-03-21 Processing path planning simulation device and method TWI856570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW112110435A TWI856570B (en) 2023-03-21 2023-03-21 Processing path planning simulation device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW112110435A TWI856570B (en) 2023-03-21 2023-03-21 Processing path planning simulation device and method

Publications (2)

Publication Number Publication Date
TWI856570B true TWI856570B (en) 2024-09-21
TW202439186A TW202439186A (en) 2024-10-01

Family

ID=93649322

Family Applications (1)

Application Number Title Priority Date Filing Date
TW112110435A TWI856570B (en) 2023-03-21 2023-03-21 Processing path planning simulation device and method

Country Status (1)

Country Link
TW (1) TWI856570B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107160402A (en) * 2017-06-27 2017-09-15 华北电力大学(保定) A kind of mechanical arm mobile route planning system and method
CN107511825A (en) * 2017-08-31 2017-12-26 广州泰行智能科技有限公司 A kind of paths planning method and device based on mechanical arm
TWI650626B (en) * 2017-08-15 2019-02-11 由田新技股份有限公司 Robot processing method and system based on 3d image
TWI723309B (en) * 2018-12-19 2021-04-01 國立臺北科技大學 Manufacturing control system and method thereof
TWI725630B (en) * 2019-11-21 2021-04-21 財團法人工業技術研究院 Processing path generating device and method thereof
US20220402131A1 (en) * 2021-06-09 2022-12-22 eBots Inc. System and method for error correction and compensation for 3d eye-to-hand coordinaton

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107160402A (en) * 2017-06-27 2017-09-15 华北电力大学(保定) A kind of mechanical arm mobile route planning system and method
TWI650626B (en) * 2017-08-15 2019-02-11 由田新技股份有限公司 Robot processing method and system based on 3d image
CN107511825A (en) * 2017-08-31 2017-12-26 广州泰行智能科技有限公司 A kind of paths planning method and device based on mechanical arm
TWI723309B (en) * 2018-12-19 2021-04-01 國立臺北科技大學 Manufacturing control system and method thereof
TWI725630B (en) * 2019-11-21 2021-04-21 財團法人工業技術研究院 Processing path generating device and method thereof
US20220402131A1 (en) * 2021-06-09 2022-12-22 eBots Inc. System and method for error correction and compensation for 3d eye-to-hand coordinaton

Also Published As

Publication number Publication date
TW202439186A (en) 2024-10-01

Similar Documents

Publication Publication Date Title
US9056394B2 (en) Methods and systems for determining efficient robot-base position
JP6576255B2 (en) Robot trajectory generation method, robot trajectory generation apparatus, and manufacturing method
Kaltsoukalas et al. On generating the motion of industrial robot manipulators
JP3604005B2 (en) Optimization tool for laying out assembly workcells
US10414047B2 (en) Method and a data processing system for simulating and handling of anti-collision management for an area of a production plant
CN114800534B (en) Mechanical arm control method and device
CN107553496B (en) Method and device for determining and correcting errors of inverse kinematics solving method of mechanical arm
US11370120B2 (en) Method and system for teaching a robot in reaching a given target in robot manufacturing
JP7628052B2 (en) Decomposition-based assembly planning
EP3753683A1 (en) Method and system for generating a robotic program for industrial coating
JP2023084115A (en) Point-set interference check
WO2024037658A1 (en) Method and apparatus for controlling pointing action of robot, and electronic device and storage medium
JP2019193975A (en) Robot track generation method, robot track generation device, and manufacturing method
TWI856570B (en) Processing path planning simulation device and method
CN113671523B (en) Robot positioning method and device, storage medium and robot
CN116652972B (en) Series robot tail end track planning method based on bidirectional greedy search algorithm
US20240316774A1 (en) Processing path planning simulation device and method
CN107066654A (en) Towards the TRAJECTORY CONTROL dot picking method and apparatus in the enveloped box face of point cloud model
Zhu et al. Online motion generation using accumulated swept volumes
CN116690557A (en) Method and device for controlling humanoid three-dimensional scanning motion based on point cloud
US20230324893A1 (en) A method and a data processing system for multi-state simulation for validating the safety of an industrial scenario
CN114851190A (en) Low-frequency driving and controlling integrated mechanical arm track planning method and system
WO2022259600A1 (en) Information processing device, information processing system, information processing method, and program
JP3391657B2 (en) Inter-object distance calculation device and inter-object distance calculation program storage medium
KR101858108B1 (en) Motion simulating apparatus and method for robot