Gazebo中的世界文件(.world)包含模拟环境中的所有对象。这些对象是机器人模型、环境、照明、传感器和其他对象等。

Gazebo使用SDF xml文件格式来保存模拟配置。世界文件通常具有.world扩展名。以下是世界文件的基本格式。

<?xml version="1.0" ?>
<sdf version='1.6'><world name="default"><physics type="ode">...</physics><scene>...</scene><model name="box">...</model><model name="sphere">...</model><light name="spotlight">...</light></world>
</sdf>

粘贴以下代码到mobot_room.world,其中包含使用Building Editor搭建的模拟对象的描述,例如灯光、地平面、墙壁和白球。

<?xml version="1.0" ?>
<sdf version='1.6'><world name='default'><light name='sun' type='directional'><cast_shadows>1</cast_shadows><pose frame=''>0 0 10 0 -0 0</pose><diffuse>0.8 0.8 0.8 1</diffuse><specular>0.2 0.2 0.2 1</specular><attenuation><range>1000</range><constant>0.9</constant><linear>0.01</linear><quadratic>0.001</quadratic></attenuation><direction>-0.5 0.1 -0.9</direction></light><model name='ground_plane'><static>1</static><link name='link'><collision name='collision'><geometry><plane><normal>0 0 1</normal><size>100 100</size></plane></geometry><surface><contact><collide_bitmask>65535</collide_bitmask><ode/></contact><friction><ode><mu>100</mu><mu2>50</mu2></ode><torsional><ode/></torsional></friction><bounce/></surface><max_contacts>10</max_contacts></collision><visual name='visual'><cast_shadows>0</cast_shadows><geometry><plane><normal>0 0 1</normal><size>100 100</size></plane></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script></material></visual><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link></model><gravity>0 0 -9.8</gravity><magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field><atmosphere type='adiabatic'/><physics name='default_physics' default='0' type='ode'><max_step_size>0.001</max_step_size><real_time_factor>1</real_time_factor><real_time_update_rate>1000</real_time_update_rate></physics><scene><ambient>0.4 0.4 0.4 1</ambient><background>0.7 0.7 0.7 1</background><shadows>1</shadows></scene><audio><device>default</device></audio><wind/><spherical_coordinates><surface_model>EARTH_WGS84</surface_model><latitude_deg>0</latitude_deg><longitude_deg>0</longitude_deg><elevation>0</elevation><heading_deg>0</heading_deg></spherical_coordinates><model name='sudhir.building'><pose frame=''>-1.27854 7.44696 0 0 -0 0</pose><link name='Wall_0'><collision name='Wall_0_Collision'><geometry><box><size>4 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_0_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>4 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Bricks</name></script><ambient>1 1 1 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>-7.92943 1.85 0 0 -0 -1.5708</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_10'><collision name='Wall_10_Collision'><geometry><box><size>2.5 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_10_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>2.5 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.996078 0.47451 0.0196078 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>-0.891787 -0.14494 0 0 -0 -1.5708</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_11'><collision name='Wall_11_Collision'><geometry><box><size>2.5 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_11_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>2.5 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.996078 0.47451 0.0196078 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>-2.06679 -1.31994 0 0 -0 3.14159</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_13'><collision name='Wall_13_Collision'><geometry><box><size>1.75 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_13_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>1.75 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.921569 0.807843 0.615686 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>-0.908613 2.9996 0 0 -0 -1.5708</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_14'><collision name='Wall_14_Collision'><geometry><box><size>2.75 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_14_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>2.75 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.996078 0.47451 0.0196078 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>0.391387 2.19961 0 0 -0 0</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_17'><collision name='Wall_17_Collision'><geometry><box><size>1.75 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_17_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>1.75 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.921569 0.807843 0.615686 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>2.63138 3.01972 0 0 -0 -1.5708</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_18'><collision name='Wall_18_Collision'><geometry><box><size>2.5 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_18_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>2.5 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.996078 0.47451 0.0196078 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>3.80638 2.21972 0 0 -0 0</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_20'><collision name='Wall_20_Collision'><geometry><box><size>2.5 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_20_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>2.5 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.921569 0.807843 0.615686 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>5.74898 2.68495 0 0 -0 -1.5708</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_22'><collision name='Wall_22_Collision'><geometry><box><size>2.25 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_22_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>2.25 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.921569 0.807843 0.615686 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>6.81909 0.722229 0 0 -0 0</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_24'><collision name='Wall_24_Collision'><geometry><box><size>1.75 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_24_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>1.75 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.996078 0.47451 0.0196078 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>5.82943 -0.902428 0 0 -0 -1.5708</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_25'><collision name='Wall_25_Collision'><geometry><box><size>2.25 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_25_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>2.25 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.921569 0.807843 0.615686 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>6.87943 -1.70243 0 0 -0 0</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_3'><collision name='Wall_3_Collision'><geometry><box><size>4 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_3_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>4 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Bricks</name></script><ambient>1 1 1 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>-7.92943 -2 0 0 -0 -1.5708</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_4'><collision name='Wall_4_Collision'><geometry><box><size>16 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_4_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>16 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Bricks</name></script><ambient>1 1 1 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>-0.004434 -3.925 0 0 -0 0</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_5'><pose frame=''>7.92057 0 0 0 -0 1.5708</pose><visual name='Wall_5_Visual_0'><pose frame=''>-3.92553 0 1.25 0 -0 0</pose><geometry><box><size>0.148947 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Bricks</name></script><ambient>1 1 1 1</ambient></material><meta><layer>0</layer></meta></visual><collision name='Wall_5_Collision_0'><geometry><box><size>0.148947 0.15 2.5</size></box></geometry><pose frame=''>-3.92553 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_5_Visual_1'><pose frame=''>0.524473 0 1.25 0 -0 0</pose><geometry><box><size>6.95105 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Bricks</name></script><ambient>1 1 1 1</ambient></material><meta><layer>0</layer></meta></visual><collision name='Wall_5_Collision_1'><geometry><box><size>6.95105 0.15 2.5</size></box></geometry><pose frame=''>0.524473 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_5_Visual_2'><pose frame=''>-3.40105 0 2.25 0 -0 0</pose><geometry><box><size>0.9 0.15 0.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Bricks</name></script><ambient>1 1 1 1</ambient></material><meta><layer>0</layer></meta></visual><collision name='Wall_5_Collision_2'><geometry><box><size>0.9 0.15 0.5</size></box></geometry><pose frame=''>-3.40105 0 2.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_6'><pose frame=''>-0.004434 3.925 0 0 -0 3.14159</pose><visual name='Wall_6_Visual_0'><pose frame=''>-0.655307 0 1.25 0 -0 0</pose><geometry><box><size>14.6894 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Bricks</name></script><ambient>1 1 1 1</ambient></material><meta><layer>0</layer></meta></visual><collision name='Wall_6_Collision_0'><geometry><box><size>14.6894 0.15 2.5</size></box></geometry><pose frame=''>-0.655307 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_6_Visual_1'><pose frame=''>7.79469 0 1.25 0 -0 0</pose><geometry><box><size>0.410614 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Bricks</name></script><ambient>1 1 1 1</ambient></material><meta><layer>0</layer></meta></visual><collision name='Wall_6_Collision_1'><geometry><box><size>0.410614 0.15 2.5</size></box></geometry><pose frame=''>7.79469 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_6_Visual_2'><pose frame=''>7.13939 0 2.25 0 -0 0</pose><geometry><box><size>0.9 0.15 0.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Bricks</name></script><ambient>1 1 1 1</ambient></material><meta><layer>0</layer></meta></visual><collision name='Wall_6_Collision_2'><geometry><box><size>0.9 0.15 0.5</size></box></geometry><pose frame=''>7.13939 0 2.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_8'><collision name='Wall_8_Collision'><geometry><box><size>3 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_8_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>3 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.996078 0.47451 0.0196078 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>-3.24179 2.45506 0 0 -0 -1.5708</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><link name='Wall_9'><collision name='Wall_9_Collision'><geometry><box><size>2.5 0.15 2.5</size></box></geometry><pose frame=''>0 0 1.25 0 -0 0</pose><max_contacts>10</max_contacts><surface><contact><ode/></contact><bounce/><friction><torsional><ode/></torsional><ode/></friction></surface></collision><visual name='Wall_9_Visual'><pose frame=''>0 0 1.25 0 -0 0</pose><geometry><box><size>2.5 0.15 2.5</size></box></geometry><material><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><ambient>0.921569 0.807843 0.615686 1</ambient></material><meta><layer>0</layer></meta></visual><pose frame=''>-2.06679 1.03006 0 0 -0 0</pose><self_collide>0</self_collide><enable_wind>0</enable_wind><kinematic>0</kinematic></link><static>1</static></model><state world_name='default'><sim_time>232 785000000</sim_time><real_time>118 702538223</real_time><wall_time>1551031600 831011974</wall_time><iterations>118381</iterations><model name='ground_plane'><pose frame=''>0 0 0 0 -0 0</pose><scale>1 1 1</scale><link name='link'><pose frame=''>0 0 0 0 -0 0</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link></model><model name='my_ball'><pose frame=''>3.55994 -1.22025 0.1 0.018695 -0 0</pose><scale>1 1 1</scale><link name='link_0'><pose frame=''>3.55994 -1.22025 0.1 0.018695 -0 0</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link></model><model name='sudhir.building'><pose frame=''>0.673102 -0.134423 0 0 -0 0</pose><scale>1 1 1</scale><link name='Wall_0'><pose frame=''>-7.25633 1.71558 0 0 0 -1.5708</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_10'><pose frame=''>-0.218688 -0.279363 0 0 0 -1.5708</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_11'><pose frame=''>-1.39369 -1.45436 0 0 -0 3.14159</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_13'><pose frame=''>-0.235508 2.86522 0 0 0 -1.5708</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_14'><pose frame=''>1.06449 2.06519 0 0 -0 0</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_17'><pose frame=''>3.30448 2.88532 0 0 0 -1.5708</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_18'><pose frame=''>4.47948 2.0853 0 0 -0 0</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_20'><pose frame=''>6.42208 2.55052 0 0 0 -1.5708</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_22'><pose frame=''>7.49219 0.587807 0 0 -0 0</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_24'><pose frame=''>6.50253 -1.03685 0 0 0 -1.5708</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_25'><pose frame=''>7.55253 -1.83685 0 0 -0 0</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_3'><pose frame=''>-7.25633 -2.13442 0 0 0 -1.5708</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_4'><pose frame=''>0.668672 -4.05942 0 0 -0 0</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_5'><pose frame=''>8.59367 -0.134423 0 0 -0 1.5708</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_6'><pose frame=''>0.668672 3.79062 0 0 -0 3.14159</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_8'><pose frame=''>-2.56869 2.32064 0 0 0 -1.5708</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link><link name='Wall_9'><pose frame=''>-1.39369 0.895637 0 0 -0 0</pose><velocity>0 0 0 0 -0 0</velocity><acceleration>0 0 0 0 -0 0</acceleration><wrench>0 0 0 0 -0 0</wrench></link></model><light name='sun'><pose frame=''>0 0 10 0 -0 0</pose></light></state><gui fullscreen='0'><camera name='user_camera'><pose frame=''>15.4065 -7.32713 9.3415 -0 0.531643 2.6842</pose><view_controller>orbit</view_controller><projection_type>perspective</projection_type></camera></gui><model name='my_ball'><link name='link_0'><inertial><mass>1</mass><inertia><ixx>0.1</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.1</iyy><iyz>0</iyz><izz>0.1</izz></inertia><pose frame=''>0 0 0 0 -0 0</pose></inertial><pose frame=''>-0 -0 0 0 -0 0</pose><gravity>1</gravity><self_collide>0</self_collide><kinematic>0</kinematic><enable_wind>0</enable_wind><visual name='visual'><pose frame=''>0 0 0 0 -0 0</pose><geometry><sphere><radius>0.1</radius></sphere></geometry><material><lighting>1</lighting><script><uri>file://media/materials/scripts/gazebo.material</uri><name>Gazebo/Grey</name></script><shader type='vertex'><normal_map>__default__</normal_map></shader><ambient>1 1 1 1</ambient><diffuse>1 1 1 1</diffuse><specular>1 1 1 1</specular><emissive>1 1 1 1</emissive></material><transparency>0</transparency><cast_shadows>1</cast_shadows></visual><collision name='collision'><laser_retro>0</laser_retro><max_contacts>10</max_contacts><pose frame=''>0 0 0 0 -0 0</pose><geometry><sphere><radius>0.1</radius></sphere></geometry><surface><friction><ode><mu>1</mu><mu2>1</mu2><fdir1>0 0 0</fdir1><slip1>0</slip1><slip2>0</slip2></ode><torsional><coefficient>1</coefficient><patch_radius>0</patch_radius><surface_radius>0</surface_radius><use_patch_radius>1</use_patch_radius><ode><slip>0</slip></ode></torsional></friction><bounce><restitution_coefficient>0</restitution_coefficient><threshold>1e+06</threshold></bounce><contact><collide_without_contact>0</collide_without_contact><collide_without_contact_bitmask>1</collide_without_contact_bitmask><collide_bitmask>1</collide_bitmask><ode><soft_cfm>0</soft_cfm><soft_erp>0.2</soft_erp><kp>1e+13</kp><kd>1</kd><max_vel>0.01</max_vel><min_depth>0</min_depth></ode><bullet><split_impulse>1</split_impulse><split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold><soft_cfm>0</soft_cfm><soft_erp>0.2</soft_erp><kp>1e+13</kp><kd>1</kd></bullet></contact></surface></collision></link><static>0</static><allow_auto_disable>1</allow_auto_disable><pose frame=''>3.55994 1.41227 0 0 -0 0</pose></model></world>
</sdf>

此时,运行如下命令在Gazebo中启动世界环境:

$ gazebo mobot_room.world

一切正常应该看到下图。稍后解释为什么会有白球。

另外,可以按照以下教程创建自定义世界环境。

  • 建立世界环境
  • 在世界环境中创造建筑物

请确保在世界环境的文件保存为mobot_room.world在mobot/src/mobot/worlds文件中。


mobot_room.world-ROS2Gazebo9附1相关推荐

  1. 使用机器人操作系统ROS 2和仿真软件Gazebo 9搭建机器人教程(一)

    参考链接:https://github.com/bunchofcoders/basic_bocbot 本文为使用ROS 2和Gazebo9搭建仿真机器人详细指南. 确保已按如下说明安装ROS和Gaze ...

  2. Pytorch实现MNIST(附SGD、Adam、AdaBound不同优化器下的训练比较) adabound实现

     学习工具最快的方法就是在使用的过程中学习,也就是在工作中(解决实际问题中)学习.文章结尾处附完整代码. 一.数据准备   在Pytorch中提供了MNIST的数据,因此我们只需要使用Pytorch提 ...

  3. 计算机视觉系列最新论文(附简介)

    计算机视觉系列最新论文(附简介) 目标检测 1. 综述:深度域适应目标检测标题:Deep Domain Adaptive Object Detection: a Survey作者:Wanyi Li, ...

  4. python3 turtle_最新版Python 3.8.6 版本发布,跨界程序员零压力学Python之道!(附下载)...

    Python 3.8.6 发布了,它是 Python 3.8 的第六个维护版本. 3.8 系列的维护版本将每两个月定期更新一次,3.8.7 计划于 2020 年 11 月中旬发布. 随着维护版本的发布 ...

  5. 计算机英语考试试题一附答案,计算机英语考试试题一附答案

    计算机英语考试试题一附答案 ================精选公文范文,管理类,工作总结类,工作计划类文档,欢迎阅读下载============== 计算机英语考试试题一附答案 计算机英语考试试题一 ...

  6. android 网络编程实现,Android开发使用HttpURLConnection进行网络编程详解【附源码下载】...

    本文实例讲述了Android开发使用HttpURLConnection进行网络编程.分享给大家供大家参考,具体如下: --HttpURLConnection URLConnection已经可以非常方便 ...

  7. php校友录毕业论文,基于WEB的同学校友录的设计(PHP,MySQL)(附答辩记录)

    基于WEB的同学校友录的设计(PHP,MySQL)(附答辩记录)(选题审批表,任务书,开题报告,中期报告,毕业论文7700字,文献综述,答辩记录,成绩评定册) 摘 要:通过提供便捷的校友录平台和人性化 ...

  8. 【机器视觉案例】(5) AI视觉,手势调节物体尺寸,附python完整代码

    各位同学好,今天和大家分享一下如何使用opencv+mediapipe完成远程手势调节图片尺寸的案例.先放张图看效果.当拇指和食指竖起时,根据食指间的连线的长度自由缩放图片尺寸.图片的中点始终位于指尖 ...

  9. 【机器视觉案例】(5) AI视觉,远程手势控制虚拟计算器,附python完整代码

    各位同学好,今天和大家分享一下如何使用MediaPipe+Opencv完成虚拟计算器,先放张图看效果.FPS值为29,食指和中指距离小于规定阈值则认为点击按键,为避免重复数字出现,规定每20帧可点击一 ...

最新文章

  1. 【汇总】ElementUI中高频次使用代码片段
  2. 大神程序员,夜夜coding到天明?Python之父昼伏夜出,PHP创始人24小时都在线
  3. C语言中的枚举和联合体
  4. 进程调试--进程启动VS自动附加
  5. [MEGA DEAL] 2020年完整的Java Master Class Bundle(96%)
  6. Python中如何创建元素为ndarray的list
  7. [Node.js] mySQL数据库 -- NPM包
  8. linux6.5配置ssh,CentOS 6.5 配置 SSH 免密登录
  9. CMake使用详解一(单文件编译)
  10. 如何使用Idea导入jar包
  11. 问题三十:《Ray Tracing In One Weekend》封面图形生成
  12. Windows解除网速限制,Windows性能提升,性能优化
  13. 不为人知的Nothing和Is
  14. python图片标记_python提取那些被“标记”照片的实例详解
  15. 电商购物评论的情感分析
  16. 现代网页的灵魂 —— JavaScript
  17. 如何把epub转mobi?
  18. 【Linux】进程间通讯
  19. docker 中安装 MySQL 以及使用
  20. pybullet机器人仿真环境搭建 1.安装pybullet,测试官方示例,基础环境搭建

热门文章

  1. 2《小学数学教材解读策略研究》开题报告
  2. java加载tensorflow训练的PB模型记录
  3. 毕业求职:求职面试前不知如何准备? 4 个秘诀助你自信面试!
  4. Java8 ConcurrentHashMap的get()方法真的不需要加锁吗?
  5. vue实现textarea框,文字高度自适应
  6. Verilog——Chipscope简单实用的使用方法(基于ISE14.7 )
  7. python中的怎么打出来_如何在Python中打印上标?
  8. 英文参考文献按照首字母排序使用matlab实现
  9. GBase 8d证书查看
  10. 100天精通Andriod逆向——第3天:真机环境配置