「Community:Science/Robotics/LinkComponents」の版間の差分
細 (moved Robotics/LinkComponents to Community:Science/Robotics/LinkComponents: moving under Community:Science ("Community" being a new namespace)) |
細 (1版 をインポートしました) |
(相違点なし)
|
2018年6月29日 (金) 03:43時点における最新版
Creating a Scenario in ORS
The current procedure to build a simulation scene consists of creating a new .blend file, and linking all the desired components for the robots and environment.
At the time of this post, simulation scenes are created in the scenarii
directory of the ORS project. Robot parts and components are located in the components
directory. Some predefined scenes, as well as common scene elements are located in components/scenes
.
Linking objects in Blender has several characteristics we have to consider. A linked object will preserve the properties from the source file, but can not be edited directly or parented to other objects in the scene. To create a usable version of a linked object, the current approach is to place it in a separate layer, and to create a duplicate of it in a layer that will be used during the simulation.
To illustrate the work flow with an example:
Assuming the simulation robot will be in layer 1 and the links will be in layer 0.
- Go to layer 0, by pressing 0
- Import the desired objects
- Press ⇧ ShiftF1
- Navigate to the .blend file
- Select the Object category
- Select the objects to be imported, by pressing RMB over them
- Make sure the following toggle buttons are selected at the bottom of the window: Relative Paths, Link, Active Layer At Cursor
- Press the Load Library button at the top right
- Make a duplicate of the linked objects with AltD
- Press Esc to exit the move command that starts automatically
- Move the duplicate to the working layer, by pressing M1
- Make any transformations necessary on the duplicate
The linked objects (blue outline when selected) can be duplicated as many times as necessary to create the scene. After making the duplicates, the links can be deleted, and the duplicates will still keep the properties of the link, and be updated when the original file is modified.
Objects can be chain linked from other .blend files. For example in this diagram showing a robot file (center) with several linked components (left). The complete robot itself is linked in a scene (right). Each individual component is then indirectly linked inside the scene, but still preserve their properties from the original file.
Pros
- Using object links permits keeping a single library of objects and associated scripts
- Modifying an object in the library will automatically change all instances where it is being used
Cons
- The mechanic to link and use an object is not simple
- Linking a complex object requires selection of all individual objects that compose it
- Linking a group does not work
- Linked objects can not be immediately used in a dynamic scene
- Using proxies does not work, since they loose their Game Logic properties
A more detailed description of the current problems with Blender's link functionality can be found here
Examples
Here are two videos showing the process to create first a robot, and then a scenario which includes the robot: http://www.youtube.com/watch?v=YfeWHlKBWIw
http://www.youtube.com/watch?v=LrgJNvNgYR8