40723144 CD2020

  • Home
    • Site Map
    • reveal
    • blog
  • About
  • 每周紀錄
    • w3
    • w7
    • w8
    • w9.10
    • w11
    • w12.13
    • w14
      • 虛擬主機網路和近端連線配(ipv4)-1
      • 虛擬主機網路和近端連線配(ipv6)-1
    • w15
    • w16
    • w17
  • Assignment 1
    • CoppeliaSim User Manual
      • User interface(用戶界面)
      • Scenes and models(場景和模型)
      • Environment(環境)
      • Entities(實體)
      • Simulation(模擬)
  • Assignment 2
  • Project
    • 可攜系統更新python3.8.2
    • 虛擬主機virtualbox的配置
      • 虛擬主機網路和近端連線配(ipv4)-2
      • 虛擬主機網路和近端連線配(ipv6)-2
    • CoppeliaSim
      • 第一階段失敗品
      • 操作說明(成功!)
    • Remote API
    • 期末影片
User interface(用戶界面) << Previous Next >> Environment(環境)

Scenes and models(場景和模型)

Scenes and models are CoppeliaSim's main simulation elements. A model is a sub-element of a scene, clearly marked as model. A scene may contain any number of models. Following figure illustrates the scene-model relationship:

場景和模型是CoppeliaSim的主要模擬元素。 模型是場景的子元素,明確標記為模型。 場景可以包含任何數量的模型。 下圖說明了場景模型關係:

Scenes(場景)

Compared to models, a scene can contain exactly the same type of elements, but additionally also includes following elements, specific to scenes:

與模型相比,場景可以包含完全相同類型的元素,但另外還包括以下特定於場景的元素:



    • The environment
    • The main script
    • Pages and views

        1. 環境
        2. 主要腳本
        3. 頁面和視圖



A scene or scene image content can be seen through a viewable object associated with a view, itself contained in a page. When creating a new scene ([Menu bar --> File --> New Scene]), the default scene will contain following elements:

可以通過與視圖相關聯的可視對象(本身包含在頁面中)來查看場景或場景圖像內容。創建新場景時([菜單欄->文件->新場景]),默認場景將包含以下元素:



  • Several camera objects: cameras allow to see the scene if they are associated with a view.
  • Several light objects: without a light the scene would be hardly visible. The light is used to illuminate the scene.
  • Several views: a view is associated with a camera and displays what the camera sees. Views are contained in pages.
  • Several pages: a page contains one or several views.
  • The environment: the environment is composed by properties as ambient light, fog, background color, etc.
  • The floor: the floor is made-up by objects grouped in a model.
  • The default main script: the default main script should allow running minimal simulations, without the need of child scripts. A child script copied into the scene at a later stage will then also be automatically executed (called by the main script) if it is associated with a scene object.
  1. 幾個攝影機對象:如果攝影機與視圖關聯,則可以查看場景。
  2. 幾個燈光對象:沒有燈光,幾乎看不到場景。燈光用於照亮場景。
  3. 幾個視圖:一個視圖與相機關聯,並顯示相機看到的內容。視圖包含在頁面中。
  4. 多個頁面:一個頁麵包含一個或多個視圖。
  5. 環境:環境由環境光,霧,背景色等屬性組成。
  6. 地板:地板是由模型中分組的對象組成的。
  7. 默認主腳本:默認主腳本應允許運行最少的模擬,而無需子腳本。如果子腳本與場景對象相關聯,則在稍後階段複製到場景中的子腳本也將自動執行(由主腳本調用)。



Scenes can be opened (loaded) with [Menu bar --> File --> Open Scene...] and saved with [Menu bar --> File --> Save Scene] or [Menu Bar --> File --> Save Scene as...]. Scene files ("*.ttt"-files) also support drag and drop operations between the explorer window and the application window. Scene files can also be double-clicked, in which case they will launch the CoppeliaSim application and be opened.

可以使用[菜單欄->文件->打開場景...]打開(加載)場景,並使用[菜單欄->文件->保存場景]或[菜單欄->文件- >將場景另存為...]。 場景文件(“ * .ttt”文件)還支持資源管理器窗口和應用程序窗口之間的拖放操作。 也可以雙擊場景文件,在這種情況下,它們將啟動CoppeliaSim應用程序並打開。

Switching between opened scene can be achieved with a single click in the upper part of the scene hierarchy (all opened scenes are grouped at the top of the scene hierarchy), or by using the scene selector via its related toolbar button:

只需在場景階層結構的上部單擊即可切換打開的場景(所有打開的場景都在場景階層結構的頂部分組),或者通過與其相關的工具欄按鈕使用場景選擇器來實現:

model(模型)

A model is a sub-element of a scene. A model by itself cannot exist, except in a file ("*.ttm"-file type), nor can it be simulated by itself. A model has to be contained in a scene in order to be operational.

模型是場景的子元素。 除了文件(“ * .ttm”-文件類型)外,模型本身不能存在,也不能通過自身進行模擬。 模型必須包含在場景中才能運行。

Models are defined by a selection of scene objects built on a same hierarchy tree, where the base of the tree has to be an object flagged as object is model base. They can be loaded with [Menu bar --> File --> Load model...]. It is however much easier and convenient to load a model with a drag-and-drop operation between the model browser and a scene view. Models can be saved with [Menu bar --> File --> Save model as...], just make sure one single object flagged as object is model base is selected, otherwise the Save model as...-menu item will not be enabled. Make also sure to follow the tutorial on how to build a clean simulation model.

通過在同一階層樹狀圖上構建的場景對象的選擇來定義模型,其中樹狀圖的基礎必須是已標記對像是模型基礎的對象。 可以通過[菜單欄->文件->加載模型...]加載它們。 但是,通過在模型瀏覽器和場景視圖之間進行拖放操作來加載模型更加容易和方便。 可以使用[菜單欄->文件->將模型另存為...]保存模型,只需要確認已標註的單個對象是不是選擇的基礎模型,否則將模型另存為...-菜單項 未啟用(沒辦法)。 還請確保遵循有關如何構建清晰仿真模型的教程。

A model is defined in following steps:

通過以下步驟定義模型:



  • attach all objects that logically belong to the model to a base object, so that the base object is the base of the model tree.

將邏輯上屬於模型的所有對象附加到基礎對象,以便基礎對像是模型樹狀圖的基礎。

  • check the object is model base-item in the  object common properties.

在通用屬性中檢查對象是不是模型基礎項目

  • in the same dialog as above, check the object/model can transfer or accept DNA-item. This will simplify model re-instanciation if you modify it at a later stage.

在與上述相同的對話框中,檢查對象/模型是否可以轉移或接受DNA項目。 如果稍後進行修改,這將簡化模型的重新實例化。

  • in the same dialog as above, clicking Edit model properties, you can define special overriding properties (e.g. make the whole model invisible, non-collidable, etc.). That allows to quickly disable some properties for all objects defined in the model.

在與上述相同的對話框中,點擊編輯模型屬性,您可以定義特殊的替代屬性(例如,使整個模型不可見,不碰撞等)。 這樣可以快速禁用模型中定義的所有對象的某些屬性。

  • for all objects in the model, except for the base object, check the select base of model instead-item in the  object common properties. This will protect your model: you won't be able to directly select individual objects in your model, and you will be able to manipulate your model almost as a single object.

對於模型中的所有對象(基礎對象除外),請檢查對象通用屬性中的模型選擇基礎代替項目。 這將保護您的模型:您將無法直接選擇模型中的單個對象,並且幾乎可以將其作為單個對象來操作模型。

  • for all objects that are normally not visible, check the Don't show as inside model selection-item. This will make the model bounding box appear in the right size around the model.

對於通常不常見的所有對象,請選中“不顯示內部模型”選擇項。 這將使模型邊界框在模型周圍以正確的尺寸顯示。

  • think about the role of the model: will you be able to attach it to some other object? (e.g. your model is a gripper that you could attach to a manipulator wrist). Or will you be able to attach some other model to it? (e.g. your model is a manipulator that could accept a gripper model). Once the role is decided, define the model's assembling behaviour. Refer also to this dynamics design consideration.

考慮一下模型的作用:您能否將其附加到其他對像上? (例如,您的模型是可以連接到機械手腕上的抓手)。 還是可以附加一些其他模型? (例如,您的模型是可以接受機械手模型的操縱器)。 確定角色後,定義模型的組裝行為。 另請參閱此動力學設計注意事項。



Now, individual objects build on the model base cannot be selected anymore in the scene (selecting them will select the base of the model instead), however they can still be individually selected by holding down the ctrl- and shift-key during selection, or by selecting them in the scene hierarchy. In addition to that, when the base object is selected, a stippled bounding box encompassing the whole model is displayed as can be seen in following figure:

現在,無法在場景中選擇建立在模型基礎上的單個對象(選擇它們將改為選擇模型的基礎),但是仍然可以通過在選擇過程中按住ctrl和Shift鍵來單獨選擇它們,或者 通過在場景層次中選擇它們。 除此之外,當選擇基礎對象時,將顯示一個包圍整個模型的點畫邊界框,如下圖所示:

Notice the model tag on the left-hand side of the icon of the object flagged as model base:

注意標記為模型庫的對像圖標左側的模型標籤:

A double-click on a model tag opens the model dialog, where model properties can be adjusted. It is also good practice to collapse a model's hierarchy once the model was edited in order to easily identify the number of logically grouped elements/models:

雙擊模型標籤可打開模型對話框,可在其中調整模型屬性。 修改模型的階層結構後,就是還不錯折疊模型的階層結構,以輕鬆識別邏輯分組的元素/模型的數量:

Grouping several objects as a model is also important when a child script accesses the objects programmatically; remember that in CoppeliaSim, objects/models can be duplicated at any time, also during a simulation. In order for the duplicated child script to be able to access the correct objects (not the original objects but the duplicated objects), the child script should always be duplicated at the same time as the objects it accesses. One way to guaranty that is to create a model (as described above) and to make sure the child scripts that access objects in the model are associated with objects that are contained in the model. Best is to associate one child script (there might be secondary child scripts too) with the the base of the model. Refer to the accessing objects programmatically section for more information.

當子腳本以編程方式進入對象時,將多個對象分組成模型也很重要。 請記住,在CoppeliaSim中,對象/模型可以隨時復制,甚至在模擬過程中也可以復制。 為了使復制的子腳本能夠進入正確的對象(不是原始對象,而是複制的對象),應始終在進入子腳本的同時復制子腳本。 保證的一種方法是創建模型(如上所述),並確保進入模型中對象的子腳本與模型中包含的對象相關聯。最好是基礎的模型與子腳本(也可能有第二個子腳本)相關聯。 有關更多信息,請參考以編程方式進入對象部分。

In order for models to be easily combined (i.e. built on top of each other) without any additional modification, it is important to consider what role the model will be playing: will it be dynamically simulated? Will it be attached to other models, or will it accept other models attached to it? The answer to those questions will allow you to select the best object type to work as a model base. Refer to the section on designing dynamic simulations for more information.

為了使模型易於組合(即彼此構建)而無需進行任何其他修改,重要的是要考慮模型將扮演什麼角色:可以動態模擬嗎? 它會被附加到其他型號,還是會接受其他附加模型? 這些問題的答案將使您能夠選擇最佳的對像類型作為模型基礎。 有關更多信息,請參考設計動態仿真部分。

Copy and pasting a model behaves exactly like saving the model, then loading it (using however a memory buffer instead of the disk space). Models can be copied from one scene to another like any other object. Model files ("*.ttm"-files) also support drag-and-drop operations between the explorer window and the application window. Model files can also be double-clicked, in which case they will launch the CoppeliaSim application and be loaded into a default scene.

複製和粘貼模型的行為其實很像是在保存模型,然後加載(完全使用內存緩衝區而不是磁盤空間)。可以像其他任何對像一樣將模型從一個場景複製到另一個場景。 模型文件(“ * .ttm”文件)還支持資源管理器窗口和應用程序窗口之間的拖放操作。 還可以雙擊模型文件,在這種情況下,它們將啟動CoppeliaSim應用程序並加載到默認場景中。

The properties of a model can be individually adjusted in the model dialog.

可以在模型對話框中單獨調整模型的屬性。

Model dialog(模型文字框)

The properties of a model can be individually adjusted in the model dialog. It can be opened with a double-click on a model icon in the scene hierarchy:

可以在模型對話框中單獨調整模型的屬性。 可以雙擊場景層次中的模型圖標來打開它:

Some of above objects can have special properties allowing other objects or calculation modules to interact with them. Objects can be:

以上某些對象可以具有特殊的屬性,從而允許其他對像或計算模塊與它們進行交互。對象可以是:

  • Collidable: collidable objects can be tested for collision against other collidable objects.
  • Measurable: measurable objects can have the minimum distance between them and other measurable objects calculated.
  • Detectable: detectable objects can be detected by proximity sensors.
  • Renderable: renderable objects can be seen or detected by vision sensors.
  • Viewable: viewable objects can be looked through, looked at, or their image content can be visualized in views. Refer to the pages and views-section for more information
  1. 可碰撞的:可以測試可碰撞的物體與其他可碰撞物體的碰撞。
  2. 可測量的:可測量的對象與所計算的其他可測量對象之間的距離最小。
  3. 可檢測的:可檢測的物體可以被接近傳感器檢測到。
  4. 可渲染:視覺傳感器可以看到或檢測可渲染對象。(渲染的意思:在我們假象的三维空間中,但是我們要在二维的顯示器中看到他,我們就稱之為把三角形從三维空間渲染到二维空間中 。)
  5. 可視對象:可以查看,查看可視對象,或者可以在視圖中可視化其圖像內容。請參閱頁面和視圖部分以獲取更多信息



  • Select model thumbnail: when saving a model, a dialog pops open asking for a model thumbnail (that will be displayed in the model browser). If however you wish to save a thumbnail of your model in a different configuration (e.g. you wish to save a model of a snake robot in straight configuration, but you want the thumbnail to visualize the snake robot in a bent configuration), then you can specify the thumbnail here.

選擇模型縮略圖:保存模型時,會彈出一個對話框,要求您提供模型縮略圖(將在模型瀏覽器中顯示)。但是,如果您希望以其他配置保存模型的縮略圖(例如,希望以直線配置保存蛇形機器人的模型,但是希望縮略圖以彎曲的形態可視化蛇形機器人),則可以在此處指定縮略圖。

  • Override properties: here you can disable (override) specific properties for the whole model (i.e. for all objects in the model hierarchy tree). This is convenient to quickly disable a model that takes too much calculation time for instance. See also the sections on collidable objects, measurable objects, renderable objects and detectable objects, and the sim.setModelProperty API function.

覆蓋屬性:您可以在此處為整個模型(即模型層次結構樹中的所有對象)禁用(覆蓋)特定屬性。例如,這可以方便地快速禁用需要太多計算模型的時間。另請參見有關可碰撞對象,可測量對象,可呈現對象和可檢測對象的部分,以及sim.setModelProperty API函數。

  • Model content acknowledgments/Info: information related to a model. It is always good practice to acknowledge the original author of a model, or imported mesh. When a model that contains acknowledgment information is opened, it will automatically display that information.

模型內容確認/信息:與模型有關的信息。 確認模型的原始作者或導入的網格物體始終是一種好習慣。 當包含確認信息的模型打開時,它將自動顯示該信息。


User interface(用戶界面) << Previous Next >> Environment(環境)

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