How can combine two .wrl files ?

2 views (last 30 days)
samia ABBOUD
samia ABBOUD on 22 Nov 2017
Commented: samia ABBOUD on 27 Nov 2017
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 ?

Answers (1)

Jan
Jan on 23 Nov 2017
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 Comment
samia ABBOUD
samia ABBOUD on 27 Nov 2017
Hi Jan,
Thank you for your kind and quick answer. I will try to apply these two methods.
With best regards

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!