How can combine two .wrl files ?

3 次查看(过去 30 天)
samia ABBOUD
samia ABBOUD 2017-11-22
评论: samia ABBOUD 2017-11-27
Hi!! I have two wrl files, one contains a robot and the other consists on a virtual world. I have to combine these two file in order that the robot navigate in the virtual world using 3D animation. Any help please ?

回答(1 个)

Jan
Jan 2017-11-23
Hi Samia, There are 2 main methods how to combine robot and the environment scene: Using PROTO (EXTERNPROTO) mechanism and using Inline nodes, see VRML97 standard:
http://www.web3d.org/documents/specifications/14772/V2.0/part1/concepts.html#4.8
http://www.web3d.org/documents/specifications/14772/V2.0/part1/nodesRef.html#Inline
Inline nodes are useful when each robot part is defined in a separate file. PROTO allows you to export only those properties that you want to control from MATLAB/Simulink, leaving all other model properties internal to the robot model.
The Inline method is described here: https://www.mathworks.com/help/sl3d/import-vrml-models-from-cad-tools.html
(files in /rotating_pendulum subdirectory of the Simulink 3D Animation sl3d\sl3ddemos directory)
Examples of using PROTO:
Look at the vr_octavia_2cars.slx model - 2 cars are there modelled as EXTERNPROTOS, 2 cars instantiated in the main scene, the main scene can be very neat and understandable even when editing in a text editor:
octavia_scene_lchg_2cars.wrl
octavia_protos.wrl
With Best Regards,
Jan
  1 个评论
samia ABBOUD
samia ABBOUD 2017-11-27
Hi Jan,
Thank you for your kind and quick answer. I will try to apply these two methods.
With best regards

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Robotics 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by