Skip to content

Commit 9318c52

Browse files
authored
Merge pull request #207 from Field-Robotics-Lab/jessica/new_heightmap
Heightmap demo
2 parents 273a246 + 053e45a commit 9318c52

File tree

3 files changed

+256
-0
lines changed

3 files changed

+256
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0"?>
2+
<launch>
3+
<arg name="gui" default="true"/>
4+
<arg name="paused" default="false"/>
5+
<arg name="world_name" default="$(find dave_worlds)/worlds/dave_new_bathy_example.world"/>
6+
<arg name="namespace" default="rexrov"/>
7+
<arg name="set_timeout" default="false"/>
8+
<arg name="timeout" default="0.0"/>
9+
<arg name="velocity_control" default="true"/>
10+
<arg name="joy_id" default="0"/>
11+
12+
<!-- use Gazebo's empty_world.launch with dave_ocean_waves.world -->
13+
<include file="$(find gazebo_ros)/launch/empty_world.launch">
14+
<arg name="world_name" value="$(arg world_name)"/>
15+
<arg name="paused" value="$(arg paused)"/>
16+
<arg name="use_sim_time" value="true"/>
17+
<arg name="gui" value="$(arg gui)"/>
18+
<arg name="headless" value="false"/>
19+
<arg name="debug" value="false"/>
20+
<arg name="verbose" value="false"/>
21+
</include>
22+
23+
<!-- use ned frame north east down -->
24+
<include file="$(find uuv_assistants)/launch/publish_world_ned_frame.launch"/>
25+
26+
<!-- timeout -->
27+
<group if="$(arg set_timeout)">
28+
<include file="$(find uuv_assistants)/launch/set_simulation_timer.launch">
29+
<arg name="timeout" value="$(arg timeout)"/>
30+
</include>
31+
</group>
32+
33+
<!-- rexrov robot with oberon7 arm -->
34+
<include file="$(find rexrov_description)/launch/upload_rexrov_oberon7.launch">
35+
<arg name="namespace" value="rexrov"/>
36+
<arg name="x" value="4"/>
37+
<arg name="y" value="4"/>
38+
<arg name="z" value="-93"/>
39+
<arg name="yaw" value="-1.8"/>
40+
</include>
41+
42+
<!-- Velocity teleop (UUV stays in position when joystick is not used) -->
43+
<include if="$(arg velocity_control)" file="$(find uuv_control_cascaded_pid)/launch/joy_velocity.launch">
44+
<arg name="uuv_name" value="$(arg namespace)" />
45+
<arg name="model_name" value="rexrov" />
46+
<arg name="joy_id" value="$(arg joy_id)"/>
47+
</include>
48+
49+
<!-- joystick control for rexrov and oberon7, no velocity control-->
50+
<include unless="$(arg velocity_control)" file="$(find uuv_control_cascaded_pid)/launch/joy_accel.launch">
51+
<arg name="model_name" value="rexrov"/>
52+
<arg name="joy_id" value="$(arg joy_id)"/>
53+
</include>
54+
55+
<!-- joint control for oberon7 -->
56+
<include file="$(find oberon7_control)/launch/joint_control.launch">
57+
<arg name="uuv_name" value="$(arg namespace)"/>
58+
</include>
59+
60+
</launch>
4.01 MB
Binary file not shown.
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
<?xml version="1.0" ?>
2+
<!--Portions of this world were originally created for the UUV Simulator project:
3+
4+
Copyright (c) 2016 The UUV Simulator Authors.
5+
All rights reserved.
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
-->
19+
<!-- Modified for different Gazebo GUI camera angle -->
20+
21+
<sdf version="1.4">
22+
<world name="oceans_waves">
23+
<physics name="default_physics" default="true" type="ode">
24+
<max_step_size>0.002</max_step_size>
25+
<real_time_factor>1</real_time_factor>
26+
<real_time_update_rate>500</real_time_update_rate>
27+
</physics>
28+
<scene>
29+
<ambient>0.01 0.01 0.01 1.0</ambient>
30+
<sky>
31+
<clouds>
32+
<speed>12</speed>
33+
</clouds>
34+
</sky>
35+
<shadows>1</shadows>
36+
</scene>
37+
38+
<!-- Origin placed somewhere in the middle of the North Sea -->
39+
<spherical_coordinates>
40+
<latitude_deg>56.71897669633431</latitude_deg>
41+
<longitude_deg>3.515625</longitude_deg>
42+
</spherical_coordinates>
43+
44+
<!-- Global light source -->
45+
<light type="directional" name="sun1">
46+
<pose>50 0 150 0 0 0</pose>
47+
<diffuse>1 1 1 1</diffuse>
48+
<specular>.1 .1 .1 1</specular>
49+
<direction>0.3 0.3 -1</direction>
50+
<cast_shadows>false</cast_shadows>
51+
</light>
52+
53+
<!-- Global light source -->
54+
<light type="directional" name="sun_diffuse">
55+
<pose>-50 0 -150 0 0 0</pose>
56+
<diffuse>0.6 0.6 0.6 1</diffuse>
57+
<specular>0 0 0 1</specular>
58+
<direction>-0.3 -0.3 -1</direction>
59+
<cast_shadows>false</cast_shadows>
60+
</light>
61+
62+
<light type="directional" name="sun_diffuse_1">
63+
<pose>-100 500 -20 0 0 0</pose>
64+
<diffuse>0.8 0.8 0.8 1</diffuse>
65+
<specular>1 1 1 1</specular>
66+
<direction>-1 -1 0</direction>
67+
<cast_shadows>false</cast_shadows>
68+
</light>
69+
70+
<light type="directional" name="sun_diffuse_2">
71+
<pose>-150 -130 50 0 0 0</pose>
72+
<diffuse>0.6 0.6 0.6 1</diffuse>
73+
<specular>0.2 0.2 0.2 1</specular>
74+
<direction>0.5 0.5 -1</direction>
75+
<cast_shadows>false</cast_shadows>
76+
</light>
77+
78+
<!-- Virtual NED frame -->
79+
<include>
80+
<uri>model://ned_frame</uri>
81+
<pose>0 0 0 0 0 0</pose>
82+
</include>
83+
84+
<!-- Sea surface, extracted from UUV Simulator ocean model -->
85+
<model name="ocean">
86+
<static>true</static>
87+
<link name="ocean_link">
88+
89+
<visual name="ocean_surface">
90+
<pose>0 0 0 0 0 0</pose>
91+
<cast_shadows>false</cast_shadows>
92+
<geometry>
93+
<mesh>
94+
<uri>file://Media/models/sea_surface_1000m_x_1000m.dae</uri>
95+
<scale>4 4 4</scale>
96+
</mesh>
97+
</geometry>
98+
<material>
99+
<script>
100+
<uri>file://Media/materials/scripts/waves.material</uri>
101+
<name>UUVSimulator/SimpleWaves</name>
102+
</script>
103+
</material>
104+
</visual>
105+
106+
<visual name="ocean_below">
107+
<pose>0 0 0 3.14 0 0</pose>
108+
<cast_shadows>false</cast_shadows>
109+
<geometry>
110+
<mesh>
111+
<uri>file://Media/models/sea_surface_1000m_x_1000m.dae</uri>
112+
<scale>4 4 4</scale>
113+
</mesh>
114+
</geometry>
115+
<material>
116+
<script>
117+
<uri>file://Media/materials/scripts/water.material</uri>
118+
<name>UUVSimulator/StaticWater</name>
119+
</script>
120+
</material>
121+
</visual>
122+
</link>
123+
</model>
124+
125+
<!-- Heightmap -->
126+
<model name="heightmap">
127+
<static>true</static>
128+
<link name="link">
129+
<collision name="collision">
130+
<geometry>
131+
<heightmap>
132+
<uri>file://Santorini_heightmap.tif</uri>
133+
<!-- Scale for original size of terrain segment -->
134+
<size>8090 6000 141</size>
135+
<pos>0 0 1400</pos>
136+
</heightmap>
137+
</geometry>
138+
</collision>
139+
<visual name="visual">
140+
<geometry>
141+
<heightmap>
142+
<texture> <!-- Add sample texture for visualization -->
143+
<diffuse>file://media/materials/textures/dirt_diffusespecular.png</diffuse>
144+
<normal>file://media/materials/textures/flat_normal.png</normal>
145+
<size>1</size>
146+
</texture>
147+
<uri>file://Santorini_heightmap.tif</uri>
148+
<size>8090 6000 141</size>
149+
<pos>0 0 1400</pos>
150+
</heightmap>
151+
</geometry>
152+
</visual>
153+
</link>
154+
</model>
155+
156+
<plugin name="underwater_current_plugin" filename="libuuv_underwater_current_ros_plugin.so">
157+
<namespace>hydrodynamics</namespace>
158+
<constant_current>
159+
<topic>current_velocity</topic>
160+
<velocity>
161+
<mean>0</mean>
162+
<min>0</min>
163+
<max>5</max>
164+
<mu>0.0</mu>
165+
<noiseAmp>0.0</noiseAmp>
166+
</velocity>
167+
168+
<horizontal_angle>
169+
<mean>0</mean>
170+
<min>-3.141592653589793238</min>
171+
<max>3.141592653589793238</max>
172+
<mu>0.0</mu>
173+
<noiseAmp>0.0</noiseAmp>
174+
</horizontal_angle>
175+
176+
<vertical_angle>
177+
<mean>0</mean>
178+
<min>-3.141592653589793238</min>
179+
<max>3.141592653589793238</max>
180+
<mu>0.0</mu>
181+
<noiseAmp>0.0</noiseAmp>
182+
</vertical_angle>
183+
</constant_current>
184+
</plugin>
185+
186+
<plugin name="sc_interface" filename="libuuv_sc_ros_interface_plugin.so"/>
187+
188+
<gui fullscreen='0'>
189+
<camera name='user_camera'>
190+
<pose frame=''>9.0 -3.0 -87.0 0.0 0.7 2.2</pose>
191+
<view_controller>orbit</view_controller>
192+
<projection_type>perspective</projection_type>
193+
</camera>
194+
</gui>
195+
</world>
196+
</sdf>

0 commit comments

Comments
 (0)