s40723237 cad2019

  • Home
    • Site Map
    • reveal
    • blog
  • 期末報告
    • week2-5
    • week6-9
    • week10-14
    • week15
    • week16
    • week17
  • note
    • 指令備忘錄
    • 將Solvespace嵌入網頁-1
    • 將Solvespace嵌入網頁-2
  • About
  • Develop
week16 << Previous Next >> note

week17

week17協同任務

  • respondable or non-respondable: a respondable shape will cause a collision reaction with other respondable shapes. They (and/or) their collider, will be influenced in their movement if they are dynamic. On the other hand, non-respondable shapes will not compute a collision response if they collide with other shapes.

 

  • 可回應或不可回應:回應形狀會導致與其他可回應形狀發生碰撞反應。它們(和/或)碰撞器,如果他們是動態的,就會影響它們的運動。另一方面,如果不可回應的形狀與其他形狀碰撞,則它們不會計算碰撞回應。

Above two points are illustrated here. Respondable shapes should be as simple as possible, in order to allow for a fast and stable simulation. A physics engine will be able to simulate following 5 types of shapes with various degrees of speed and stability:

 

上圖所示。回應形狀應盡可能簡單,以便快速、穩定地模擬。物理引擎將能夠類比以下 5 種具有不同速度和穩定性的形狀:

  • Pure shapes:a pure shape will be stable and handled very efficiently by the physics engine. The draw-back is that pure shapes are limited in geometry: mostly cuboids, cylinders and spheres. If possible, use those for items that are in contact with other items for a longer time (e.g. the feet of a humanoid robot, the base of a serial manipulator, the fingers of a gripper, etc.). Pure shapes can be created with [Menu bar --> Add --> Primitive shape].

 

  • 純形狀:純形狀將穩定,物理引擎處理效率很高。回拉是純形狀在幾何中是有限的:主要是立方體、圓柱體和球體。如果可能,將這些物品用於與其他物品接觸更長時間的物品(例如類人機器人的腳、串列操縱器的底座、夾持器的手指等)。可以使用 [功能表列 -- > 添加 -gt; 原始形狀]創建純形狀。

 

  • Pure compound shapes:a pure compound shape is a grouping of several pure shapes. It performs almost as well as pure shapes and shares similar properties. Pure compound shapes can be generated by grouping several pure shapes [Menu bar --> Edit --> Grouping/Merging --> Group selected shapes].

 

  • 純複合形狀:純複合形狀是幾個純形狀的組合。它的性能幾乎與純形狀相同,並且具有相似的屬性。純複合形狀可以通過分組多個純形狀生成 [功能表條 -- > 編輯 --> 分組/合併 -- > 組選定形狀]。

 

  • Convex shapes: a convex shape will be a little bit less stable and take a little bit more computation time when handled by the physics engine. It allows for a more general geometry (only requirement: it need to be convex) than pure shapes. If possible, use convex shapes for items that are sporadically in contact with other items (e.g. the various links of a robot). Convex shapes can be generated with [Menu bar --> Add --> Convex hull of selection] or with [Menu bar --> Edit --> Morph selection into convex shapes].

 

  • 凸形形狀:當物理引擎處理時,凸形狀會稍微不穩定一點,並且需要多一點的計算時間。它允許更一般的幾何形狀(僅要求:它需要凸)而不是純形狀。如果可能,對偶爾與其他專案接觸的專案(例如機器人的各種連結)使用凸形形狀。可以使用 [功能表列 -- > 添加 --gt; 選擇的凸包]或使用 [功能表列 -- > 編輯 --> 將選擇轉換為凸形形狀]生成凸形形狀。

 

  • Compound convex shapes, or convex decomposed shapes: a convex decomposed shape is a grouping of several convex shapes. It performs almost as well as convex shapes and shares similar properties. Convex decomposed shapes can be generated by grouping several convex shapes [Menu bar --> Edit --> Grouping/Merging --> Group selected shapes], with [Menu bar --> Add --> Convex decomposition of selection...], or with [Menu bar --> Edit --> Morph selection into its convex decomposition...].

 

  • 複合凸形或凸分解形狀:凸分解形狀是多個凸形形狀的分組。它的性能幾乎與凸形狀一樣好,並且具有類似的屬性。可以通過對多個凸形形狀進行分組[功能表條 --> 編輯 -- > 分組/合併 -- > 組選定形狀]生成,使用 [功能表列 -- > 添加 --> 選擇的凸分解...],或者使用 [功能表列 -- > 編輯 -- > 變形選擇到其凸分解中...]。

 

  • Random shapes: a random shape is a shape that is not convex nor pure. It generally has poor performance (calculation speed and stability). Avoid using random shapes as much as possible.

 

  • 隨機形狀:隨機形狀是不凸或純的形狀。它的性能通常較差(計算速度和穩定性)。儘量避免使用隨機形狀。

 

So the order of preference would be: pure shapes, pure compound shapes, convex shapes, compound convex shapes, and finally random shapes. Make sure to also read this page. In case of the robot we want to build, we will make the base of the robot as a pure cylinder, and the other links as convex or convex decomposed shapes.

 

因此,偏好的順序是:純形狀、純複合形狀、凸形、複合凸形狀,最後是隨機形狀。請務必也閱讀此頁面。在我們想要構建的機器人的情況下,我們將機器人的底座作為一個純圓柱體,其他連結作為凸或凸分解的形狀。

 

We could use the dynamically enabled shapes also as the visible parts of the robot, but that would probably not look good enough. So instead, we will build for each visible shape we have created in the first part of the tutorial a dynamically enabled counterpart, which we will keep hidden: the hidden part will represent the dynamic model and be exclusively used by the physics engine, while the visible part will be used for visualization, but also for minimum distance calculations, proximity sensor detections, etc.

 

我們可以將動態啟用的形狀用作機器人的可見部分,但可能看起來不夠好。因此,我們將為在本教程的第一部分中創建的每個可見形狀構建一個動態啟用的對應形狀,我們將隱藏該形狀:隱藏部分將表示動態模型,並由物理引擎獨佔使用,而可見部分將用於視覺化,但也用於最小距離計算、接近感應器檢測等。

We select object robot, copy-and-paste it into a new scene (in order to keep the original model intact) and start the triangle edit mode. If object robot was a compound shape, we would first have had to ungroup it ([Menu bar --> Edit --> Grouping/Merging --> Ungroup selected shapes]) then merge the individual shapes ([Menu bar --> Edit --> Grouping/Merging --> Merge selected shapes]) before being able to start the triangle edit mode. Now we select the few triangles that represent the power cable, and erase them. Then we select all triangles in that shape, and click Extract cylinder. We can now leave the edit mode and we have our base object represented as a pure cylinder:

 

我們選擇物件機器人,複製並粘貼到一個新的場景(為了保持原始模型不變),並開始三角形編輯模式。如果物件機器人是複合形狀,我們首先必須取消群組它([功能表列 -- > 編輯 --> 分組/合併 -- > 取消組選定形狀]),然後合併單個形狀([功能表列 -- > 編輯 --> 分組/合併 -- > 合併所選形狀]),然後才能啟動三角形編輯模式。現在,我們選擇表示電源線的幾個三角形,並擦除它們。然後,我們選擇該形狀中的所有三角形,然後按一下"提取圓柱體"。我們現在可以離開編輯模式,並將基本物件表示為純圓柱體:

We rename the new shape (with a double-click on its name in the scene hierarchy) as robot_dyn, assign it to visibility layer 9, then copy it to the original scene. The rest of the links will be modelled as convex shapes, or compound convex shapes. We now select the first mobile link (i.e. object robot_link1) and generate a convex shape from it with [Menu bar --> Add --> Convex hull of selection].

我們將新形狀(在場景層次結構中按兩下其名稱)重命名為robot_dyn,將其分配給可見度層 9,然後將其複製到原始場景。其餘連結將建模為凸形或複合凸形。現在,我們選擇第一個手機連結(即物件robot_link1),並生成一個凸形形狀,從它與 [功能表列 -- > 添加 -> 凸面選擇包]。

DEF-USE Mechanism

DEF-USE 機制

The DEF-USE mechanism allows to define a node in one place and to reuse that definition elsewhere in the scene tree. This is useful to avoid the duplication of identical nodes in world files. Moreover, it also allows users to modify several objects at the same time. Here is how it works: first a node is labeled with a DEF string. Then copies of this node can be reused elsewhere with the USE keyword. Only the fields of the DEF node can be edited, the fields of the USE inherit from the DEF node and cannot be changed. This mechanism is dependent on the order of the nodes in the world file. A DEF node should be defined before any corresponding USE node.

 

DEF-USE 機制允許在一個位置定義節點,並在場景樹的其他位置重用該定義。這對於避免世界檔中相同節點的重複非常有用。此外,它還允許使用者同時修改多個物件。下面是它的工作原理:首先,節點用 DEF 字串標記。然後,此節點的副本可以使用 USE 關鍵字在其他地方重用。只能編輯 DEF 節點的欄位,USE 的欄位從 DEF 節點繼承,不能更改。此機制取決於世界檔中節點的順序。應在任何相應的 USE 節點之前定義 DEF 節點。

The two Sphere definitions that we have used earlier to define the ball, are redundant. We will now merge these two Spheres into only once using the DEF-USE mechanism.

 

 我們之前用於定義球的兩個球體定義是多餘的。現在,我們將使用 DEF-USE 機制僅將這兩個球體合併為一次。

Hands-on #6: Select the first Sphere node (the child of the Shape) in the scene tree view. The field editor of the scene tree view allows you to enter the DEF string.

 

動手#6:在場景樹狀檢視中選擇第一個球體節點(形狀子節點)。  場景樹狀檢視的欄位編輯器允許您輸入 DEF 字串。

  1. Enter BALL_GEOMETRYin this field.
  2. 在此欄位中輸入BALL_GEOMETRY。
  3. Select the boundingObjectfield (containing the second Sphere node), and empty it by right clicking the field in the scene tree and choosing the Delete entry in the context menu that pops up.
  4. 選擇邊界物件欄位(包含第二個 Sphere 節點),然後通過按右鍵場景樹中的欄位並在彈出的內容功能表中選擇"刪除"條目來清空該欄位。
  5. Then, select the boundingObjectfield and click on the Add button, and select the USE / BALL_GEOMETRY in the dialog box.
  6. 然後,選擇"邊界物件"欄位並按一下"添加"按鈕,然後在對話方塊中選擇"使用/BALL_GEOMETRY"。
  7. The result is shown in this figure.
  8. 結果如下圖所示。

week16 << Previous Next >> note

Copyright © All rights reserved | This template is made with by Colorlib