Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added New World Model and Realsense Camera Model #56

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
terrain added
serkanMzlm committed Jan 16, 2025
commit 922c1c699e2730479a1c578840a0eaf3f036d970
Binary file added worlds/media/dem/data.dt2
Binary file not shown.
1 change: 1 addition & 0 deletions worlds/media/materials/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ADD_SUBDIRECTORY(textures)
13 changes: 13 additions & 0 deletions worlds/media/materials/textures/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set (files
dirt_diffusespecular.png
grass_diffusespecular.png
fungus_diffusespecular.png
flat_normal.png
water.jpg
ground.png
green.png
white.png
)


INSTALL(FILES ${files} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/gazebo-${GAZEBO_MAJOR_VERSION}/media/materials/textures/)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added worlds/media/materials/textures/flat_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added worlds/media/materials/textures/green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added worlds/media/materials/textures/ground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions worlds/media/materials/textures/texture_information.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Textures for roads were acquired from http://texturelib.com/.
Binary file added worlds/media/materials/textures/water.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added worlds/media/materials/textures/white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
238 changes: 238 additions & 0 deletions worlds/terrain.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
<?xml version="1.0" encoding="UTF-8"?>
<sdf version="1.9">
<world name="territory">
<physics type="ode">
<max_step_size>0.004</max_step_size>
<real_time_factor>1.0</real_time_factor>
<real_time_update_rate>250</real_time_update_rate>
</physics>
<plugin name="gz::sim::systems::Physics" filename="gz-sim-physics-system" />
<plugin name="gz::sim::systems::UserCommands" filename="gz-sim-user-commands-system" />
<plugin name="gz::sim::systems::SceneBroadcaster" filename="gz-sim-scene-broadcaster-system" />
<plugin name="gz::sim::systems::Contact" filename="gz-sim-contact-system" />
<plugin name="gz::sim::systems::Imu" filename="gz-sim-imu-system" />
<plugin name="gz::sim::systems::AirPressure" filename="gz-sim-air-pressure-system" />
<!-- <plugin name="gz::sim::systems::ApplyLinkWrench"
filename="gz-sim-apply-link-wrench-system" /> -->
<plugin name="gz::sim::systems::NavSat" filename="gz-sim-navsat-system" />
<plugin name="gz::sim::systems::Sensors" filename="gz-sim-sensors-system">
<render_engine>ogre2</render_engine>
</plugin>

<gui fullscreen="false">
<!-- 3D scene -->
<plugin name='3D View' filename='GzScene3D'>
<gz-gui>
<title>3D View</title>
<property type="bool" key="showTitleBar">false</property>
<property type="string" key="state">docked</property>
</gz-gui>
<engine>ogre2</engine>
<scene>scene</scene>
<ambient_light>0.4 0.4 0.4</ambient_light>
<background_color>0.8 0.8 0.8</background_color>
<camera_pose>-6 0 6 0 0.5 0</camera_pose>
<camera_clip>
<near>0.25</near>
<far>25000</far>
</camera_clip>
<scene>scene</scene>
<!-- <horizontal_fov>57.29578</horizontal_fov> -->
</plugin>
<plugin filename="WorldControl" name="World control">
<gz-gui>
<title>World control</title>
<property type="bool" key="showTitleBar">false</property>
<property type="bool" key="resizable">false</property>
<property type="double" key="height">72</property>
<property type="double" key="width">150</property>
<property type="double" key="z">1</property>

<property type="string" key="state">floating</property>
<anchors target="3D View">
<line own="left" target="left" />
<line own="bottom" target="bottom" />
</anchors>
</gz-gui>
<play_pause>true</play_pause>
<step>true</step>
<start_paused>true</start_paused>
<service>/world/world_demo/control</service>
<stats_topic>/world/world_demo/stats</stats_topic>
</plugin>
<plugin filename="WorldStats" name="World stats">
<gz-gui>
<title>World stats</title>
<property type="bool" key="showTitleBar">false</property>
<property type="bool" key="resizable">false</property>
<property type="double" key="height">110</property>
<property type="double" key="width">290</property>
<property type="double" key="z">1</property>

<property type="string" key="state">floating</property>
<anchors target="3D View">
<line own="right" target="right" />
<line own="bottom" target="bottom" />
</anchors>
</gz-gui>

<sim_time>true</sim_time>
<real_time>true</real_time>
<real_time_factor>true</real_time_factor>
<iterations>true</iterations>
<topic>/world/world_demo/stats</topic>
</plugin>

<plugin filename="Shapes" name="Shapes">
<gz-gui>
<property key="resizable" type="bool">false</property>
<property key="x" type="double">0</property>
<property key="y" type="double">0</property>
<property key="width" type="double">250</property>
<property key="height" type="double">50</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
<property key="cardBackground" type="string">#666666</property>
</gz-gui>
</plugin>
<plugin filename="TransformControl" name="Transform control">
<gz-gui>
<property key="resizable" type="bool">false</property>
<property key="x" type="double">0</property>
<property key="y" type="double">50</property>
<property key="width" type="double">250</property>
<property key="height" type="double">50</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
<property key="cardBackground" type="string">#777777</property>
</gz-gui>
</plugin>
<plugin filename="EntityTree" name="Entity tree" />
</gui>

<gravity>0 0 -9.8</gravity>
<magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field>
<atmosphere type="adiabatic" />
<scene>
<sky>
<clouds>
<speed>12</speed>
</clouds>
</sky>
<grid>true</grid>
<ambient>0.5 0.5 0.5 0.3</ambient>
<background>0.3 0.3 0.3 0.3</background>
<shadows>true</shadows>
</scene>

<model name="heightmap">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<box>
<size>400 400 0.5</size>
</box>
</geometry>
</collision>

<visual name="visual">
<geometry>
<heightmap>
<texture>
<diffuse>file://media/materials/textures/water.jpg</diffuse>
<normal>file://media/materials/textures/flat_normal.png</normal>
<size>1</size>
</texture>
<texture>
<diffuse>file://media/materials/textures/dirt_diffusespecular.png</diffuse>
<normal>file://media/materials/textures/flat_normal.png</normal>
<size>1</size>
</texture>
<texture>
<diffuse>file://media/materials/textures/grass_diffusespecular.png</diffuse>
<normal>file://media/materials/textures/flat_normal.png</normal>
<size>1</size>
</texture>
<texture>
<diffuse>file://media/materials/textures/fungus_diffusespecular.png</diffuse>
<normal>file://media/materials/textures/flat_normal.png</normal>
<size>1</size>
</texture>
<blend>
<min_height>0</min_height>
<fade_dist>.7</fade_dist>
</blend>
<blend>
<min_height>.7</min_height>
<fade_dist>1.1</fade_dist>
</blend>
<blend>
<min_height>1.1</min_height>
<fade_dist>1.3</fade_dist>
</blend>
<blend>
<min_height>1.3</min_height>
<fade_dist>1.5</fade_dist>
</blend>
<blend>
<min_height>1.5</min_height>
<fade_dist>1.7</fade_dist>
</blend>
<blend>
<min_height>1.7</min_height>
<fade_dist>2.5</fade_dist>
</blend>

<uri>file://media/dem/data.dt2</uri>
<size>400 400 2</size>
<pos>0 0 -646.5</pos>
</heightmap>
</geometry>
</visual>

</link>
</model>

<light name="sunUTC" type="directional">
<pose>0 0 500 0 -0 0</pose>
<cast_shadows>true</cast_shadows>
<intensity>1</intensity>
<direction>0.001 0.625 -0.78</direction>
<diffuse>0.904 0.904 0.904 1</diffuse>
<specular>0.271 0.271 0.271 1</specular>
<attenuation>
<range>2000</range>
<linear>0</linear>
<constant>1</constant>
<quadratic>0</quadratic>
</attenuation>
<spot>
<inner_angle>0</inner_angle>
<outer_angle>0</outer_angle>
<falloff>0</falloff>
</spot>
</light>
<light type="directional" name="sun_2">
<cast_shadows>true</cast_shadows>
<pose>200 200 200 0 0 0</pose>
<diffuse>0.5 0.5 0.5 0.3</diffuse>
<specular>0.2 0.2 0.2 0.3</specular>
<attenuation>
<range>2000</range>
<constant>1</constant>
<linear>0</linear>
<quadratic>0</quadratic>
</attenuation>
<direction>0.01 0.01 -0.9</direction>
</light>

<spherical_coordinates>
<surface_model>EARTH_WGS84</surface_model>
<world_frame_orientation>ENU</world_frame_orientation>
<latitude_deg>47.397971057728974</latitude_deg>
<longitude_deg> 8.546163739800146</longitude_deg>
<elevation>0</elevation>
</spherical_coordinates>
</world>
</sdf>