User`s guide
5 Build Virtual Reality Worlds
5-40
DEF Robot_Arm1 Transform {
children [
Inline {
url ["robot_arm1.wrl"]
}
]
}
These object names are used in the Simulink 3D Animation functions and in the user
interface such as the descriptions of inputs to the VR Sink block. Therefore, it is good
practice to give the parts descriptive names to help you manage the orientation in the
object hierarchy.
Note: Sometimes it is necessary to correct bugs introduced in the file by the CAD tool
export filter. As the VRML format is a text-based format codified by an ISO standard,
these bugs are relatively easy to identify and correct. If problems occur when you are
using exported VRML files in the Simulink 3D Animation software, consult technical
support.
Creating a Virtual World
The VRML file, adjusted manually in the previous steps, is now ready for association
with Simulink or SimMechanics models. To work with the virtual world effectively,
however, you may want to make additional modifications to the scene file. These changes
can be added on an ongoing basis, in parallel with developing and using the dynamic
model.
These modifications can be done using a text editor, V-Realm, or any other VRML editor:
1
Add the WorldInfo node with a scene title (used as the virtual world description in
the Simulink 3D Animation software).
2
Add the NavigationInfo node defining the scene default navigation speed and
avatar size that ensures correct display of the object from near and far distances.
3
Add the Background node to specify a color backdrop that simulates the ground and
sky, as well as optional background textures, such as panoramas for the scene.
4
Add several viewpoints to be able to observe the object conveniently from different
positions. The viewpoints can be static (defined as independent objects at the
top level of the scene hierarchy) or attached to objects that move in the scene for
observation during simulation. Such viewpoints are defined as siblings of moving