Skip to content

Commit

Permalink
Merge pull request #207 from Field-Robotics-Lab/jessica/new_heightmap
Browse files Browse the repository at this point in the history
Heightmap demo
  • Loading branch information
j-herman authored Feb 26, 2022
2 parents 273a246 + 053e45a commit 9318c52
Show file tree
Hide file tree
Showing 3 changed files with 256 additions and 0 deletions.
60 changes: 60 additions & 0 deletions examples/dave_demo_launch/launch/dave_new_environment.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0"?>
<launch>
<arg name="gui" default="true"/>
<arg name="paused" default="false"/>
<arg name="world_name" default="$(find dave_worlds)/worlds/dave_new_bathy_example.world"/>
<arg name="namespace" default="rexrov"/>
<arg name="set_timeout" default="false"/>
<arg name="timeout" default="0.0"/>
<arg name="velocity_control" default="true"/>
<arg name="joy_id" default="0"/>

<!-- use Gazebo's empty_world.launch with dave_ocean_waves.world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(arg world_name)"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="true"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="verbose" value="false"/>
</include>

<!-- use ned frame north east down -->
<include file="$(find uuv_assistants)/launch/publish_world_ned_frame.launch"/>

<!-- timeout -->
<group if="$(arg set_timeout)">
<include file="$(find uuv_assistants)/launch/set_simulation_timer.launch">
<arg name="timeout" value="$(arg timeout)"/>
</include>
</group>

<!-- rexrov robot with oberon7 arm -->
<include file="$(find rexrov_description)/launch/upload_rexrov_oberon7.launch">
<arg name="namespace" value="rexrov"/>
<arg name="x" value="4"/>
<arg name="y" value="4"/>
<arg name="z" value="-93"/>
<arg name="yaw" value="-1.8"/>
</include>

<!-- Velocity teleop (UUV stays in position when joystick is not used) -->
<include if="$(arg velocity_control)" file="$(find uuv_control_cascaded_pid)/launch/joy_velocity.launch">
<arg name="uuv_name" value="$(arg namespace)" />
<arg name="model_name" value="rexrov" />
<arg name="joy_id" value="$(arg joy_id)"/>
</include>

<!-- joystick control for rexrov and oberon7, no velocity control-->
<include unless="$(arg velocity_control)" file="$(find uuv_control_cascaded_pid)/launch/joy_accel.launch">
<arg name="model_name" value="rexrov"/>
<arg name="joy_id" value="$(arg joy_id)"/>
</include>

<!-- joint control for oberon7 -->
<include file="$(find oberon7_control)/launch/joint_control.launch">
<arg name="uuv_name" value="$(arg namespace)"/>
</include>

</launch>
Binary file added models/dave_worlds/media/Santorini_heightmap.tif
Binary file not shown.
196 changes: 196 additions & 0 deletions models/dave_worlds/worlds/dave_new_bathy_example.world
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
<?xml version="1.0" ?>
<!--Portions of this world were originally created for the UUV Simulator project:
Copyright (c) 2016 The UUV Simulator Authors.
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Modified for different Gazebo GUI camera angle -->

<sdf version="1.4">
<world name="oceans_waves">
<physics name="default_physics" default="true" type="ode">
<max_step_size>0.002</max_step_size>
<real_time_factor>1</real_time_factor>
<real_time_update_rate>500</real_time_update_rate>
</physics>
<scene>
<ambient>0.01 0.01 0.01 1.0</ambient>
<sky>
<clouds>
<speed>12</speed>
</clouds>
</sky>
<shadows>1</shadows>
</scene>

<!-- Origin placed somewhere in the middle of the North Sea -->
<spherical_coordinates>
<latitude_deg>56.71897669633431</latitude_deg>
<longitude_deg>3.515625</longitude_deg>
</spherical_coordinates>

<!-- Global light source -->
<light type="directional" name="sun1">
<pose>50 0 150 0 0 0</pose>
<diffuse>1 1 1 1</diffuse>
<specular>.1 .1 .1 1</specular>
<direction>0.3 0.3 -1</direction>
<cast_shadows>false</cast_shadows>
</light>

<!-- Global light source -->
<light type="directional" name="sun_diffuse">
<pose>-50 0 -150 0 0 0</pose>
<diffuse>0.6 0.6 0.6 1</diffuse>
<specular>0 0 0 1</specular>
<direction>-0.3 -0.3 -1</direction>
<cast_shadows>false</cast_shadows>
</light>

<light type="directional" name="sun_diffuse_1">
<pose>-100 500 -20 0 0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>1 1 1 1</specular>
<direction>-1 -1 0</direction>
<cast_shadows>false</cast_shadows>
</light>

<light type="directional" name="sun_diffuse_2">
<pose>-150 -130 50 0 0 0</pose>
<diffuse>0.6 0.6 0.6 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<direction>0.5 0.5 -1</direction>
<cast_shadows>false</cast_shadows>
</light>

<!-- Virtual NED frame -->
<include>
<uri>model://ned_frame</uri>
<pose>0 0 0 0 0 0</pose>
</include>

<!-- Sea surface, extracted from UUV Simulator ocean model -->
<model name="ocean">
<static>true</static>
<link name="ocean_link">

<visual name="ocean_surface">
<pose>0 0 0 0 0 0</pose>
<cast_shadows>false</cast_shadows>
<geometry>
<mesh>
<uri>file://Media/models/sea_surface_1000m_x_1000m.dae</uri>
<scale>4 4 4</scale>
</mesh>
</geometry>
<material>
<script>
<uri>file://Media/materials/scripts/waves.material</uri>
<name>UUVSimulator/SimpleWaves</name>
</script>
</material>
</visual>

<visual name="ocean_below">
<pose>0 0 0 3.14 0 0</pose>
<cast_shadows>false</cast_shadows>
<geometry>
<mesh>
<uri>file://Media/models/sea_surface_1000m_x_1000m.dae</uri>
<scale>4 4 4</scale>
</mesh>
</geometry>
<material>
<script>
<uri>file://Media/materials/scripts/water.material</uri>
<name>UUVSimulator/StaticWater</name>
</script>
</material>
</visual>
</link>
</model>

<!-- Heightmap -->
<model name="heightmap">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<heightmap>
<uri>file://Santorini_heightmap.tif</uri>
<!-- Scale for original size of terrain segment -->
<size>8090 6000 141</size>
<pos>0 0 1400</pos>
</heightmap>
</geometry>
</collision>
<visual name="visual">
<geometry>
<heightmap>
<texture> <!-- Add sample texture for visualization -->
<diffuse>file://media/materials/textures/dirt_diffusespecular.png</diffuse>
<normal>file://media/materials/textures/flat_normal.png</normal>
<size>1</size>
</texture>
<uri>file://Santorini_heightmap.tif</uri>
<size>8090 6000 141</size>
<pos>0 0 1400</pos>
</heightmap>
</geometry>
</visual>
</link>
</model>

<plugin name="underwater_current_plugin" filename="libuuv_underwater_current_ros_plugin.so">
<namespace>hydrodynamics</namespace>
<constant_current>
<topic>current_velocity</topic>
<velocity>
<mean>0</mean>
<min>0</min>
<max>5</max>
<mu>0.0</mu>
<noiseAmp>0.0</noiseAmp>
</velocity>

<horizontal_angle>
<mean>0</mean>
<min>-3.141592653589793238</min>
<max>3.141592653589793238</max>
<mu>0.0</mu>
<noiseAmp>0.0</noiseAmp>
</horizontal_angle>

<vertical_angle>
<mean>0</mean>
<min>-3.141592653589793238</min>
<max>3.141592653589793238</max>
<mu>0.0</mu>
<noiseAmp>0.0</noiseAmp>
</vertical_angle>
</constant_current>
</plugin>

<plugin name="sc_interface" filename="libuuv_sc_ros_interface_plugin.so"/>

<gui fullscreen='0'>
<camera name='user_camera'>
<pose frame=''>9.0 -3.0 -87.0 0.0 0.7 2.2</pose>
<view_controller>orbit</view_controller>
<projection_type>perspective</projection_type>
</camera>
</gui>
</world>
</sdf>

0 comments on commit 9318c52

Please sign in to comment.