function StartWorldFile(this)

fid = fopen(this.worldFile, 'wt');
cleanup = onCleanup(@()fclose(fid));

[~,worldTitle,~] = fileparts(this.worldFile);

fprintf(fid, ...
    ['#VRML_SIM V6.0 utf8\n ' ...
    'WorldInfo {\n ' ...
    '  title "' worldTitle '"\n' ... 
    '  info [\n' ...
    '    "CheckRobotPose: ' num2str(this.checkRobotPose) '",\n' ...
    '    "Cozmo Vision System Test world. All rights reserved. Copyright (c) Anki, Inc.",\n' ...
    '    "Author: <auto-generated by CozmoTestWorld class in Matlab>",\n ' ...
    '    "Date: ' datestr(now,29) '"\n' ...
    '    ]\n\n' ...
    '  physics "cozmo_physics"\n\n' ...
    '  basicTimeStep 5\n\n' ...
    '  gravity 0 0 -9.81\n\n' ...
    '  contactProperties [\n' ...
    '    DEF FLOOR_FRONTWHEEL ContactProperties {\n' ...
    '      material1 "cmat_floor"\n' ...
    '      material2 "highfriction"\n' ...
    '      coulombFriction 50\n' ...
    '      bounce 0.01\n' ...
    '    }\n' ...
    '    DEF RAMP_FRONTWHEEL ContactProperties {\n' ...
    '      material1 "cmat_ramp"\n' ...
    '      material2 "highfriction"\n' ...
    '      coulombFriction 50\n' ...
    '    }\n' ...
    '    DEF BLOCK_FRONTWHEEL ContactProperties {\n' ...
    '      material1 "cmat_block"\n' ...
    '      material2 "highfriction"\n' ...
    '      coulombFriction 50\n' ...
    '      bounce 0.01\n' ...
    '    }\n' ...
    '    DEF BLOCK_REARWHEEL ContactProperties {\n' ...
    '      material1 "cmat_block"\n' ...
    '      material2 "nofriction"\n' ...
    '      coulombFriction 0.0001\n' ...
    '      bounce 0.001\n' ...
    '    }\n' ...
    '    DEF FLOOR_REARWHEEL ContactProperties {\n' ...
    '      material1 "cmat_floor"\n' ...
    '      material2 "nofriction"\n' ...
    '      coulombFriction 0.0001\n' ...
    '      bounce 0.001\n' ...
    '    }\n' ...
    '    DEF RAMP_REARWHEEL ContactProperties {\n' ...
    '      material1 "cmat_ramp"\n' ...
    '      material2 "nofriction"\n' ...
    '      coulombFriction 5\n' ...
    '      bounce 0.001\n' ...
    '    }\n' ...
    '    DEF FLOOR_BLOCK ContactProperties {\n' ...
    '      material1 "cmat_floor"\n' ...
    '      material2 "cmat_block"\n' ...
    '      coulombFriction 5000\n' ...
    '      bounce 0.001\n' ...
    '    }\n' ...
    '    DEF BLOCK_BLOCK ContactProperties {\n' ...
    '      material1 "cmat_block"\n' ...
    '      material2 "cmat_block"\n' ...
    '      coulombFriction 5000\n' ...
    '      bounce 0.001\n' ...
    '    }\n' ...
    '    DEF RAMP_BLOCK ContactProperties {\n' ...
    '      material1 "cmat_ramp"\n' ...
    '      material2 "cmat_block"\n' ...
    '      coulombFriction 5000\n' ...
    '      bounce 0.001\n' ...
    '    }\n' ...
    '    DEF RAMP_RAMP ContactProperties {\n' ...
    '      material1 "cmat_ramp"\n' ...
    '      material2 "cmat_ramp"\n' ...
    '      coulombFriction 5000\n' ...
    '      bounce 0.001\n' ...
    '    }\n' ...
    '    DEF FLOOR_RAMP ContactProperties {\n' ...
    '      material1 "cmat_ramp"\n' ...
    '      material2 "cmat_block"\n' ...
    '      coulombFriction 5000\n' ...
    '      bounce 0.001\n' ...
    '    }\n' ...
    '  ] # ContactProperties\n' ...
    '} # WorldInfo \n\n' ...
    'Viewpoint {\n' ...
    '  fieldOfView 0.785398\n' ...
    '  orientation 0.225533 0.521621 0.822828 2.45799\n' ...
    '  position 1.37409 1.36507 0.903049\n' ...
    '}\n\n' ...
    'Background { skyColor [0.4 0.7 1] }\n\n' ...
    'DirectionalLight {\n' ...
    '  ambientIntensity 1\n' ...
    '  intensity 0.8\n' ...
    '  direction 1 .2 -2\n' ...
    '  castShadows FALSE\n' ...
    '}\n\n' ...
    'CozmoMat {\n' ...
    '}\n\n' ...
    'XYaxesDisplay {\n' ...
    '}\n\n' ...
  ]);


end % function StartWorldFile()