Skip to content

Commit

Permalink
Merge pull request Field-Robotics-Lab#9 from Field-Robotics-Lab/sonar…
Browse files Browse the repository at this point in the history
…_launch

add environment with tank and target
  • Loading branch information
BruceMty authored Apr 23, 2020
2 parents 63cf0a1 + 11fd0e8 commit 3c1e512
Show file tree
Hide file tree
Showing 10 changed files with 351 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fls_gazebo/launch/blueview_basement_cylinder.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<launch>
<!-- world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find fls_gazebo)/worlds/blueview_basement_cylinder.world"/>
</include>

<node name="rqt_images" pkg="rqt_gui" type="rqt_gui" output="screen" args = "--perspective-file $(find fls_gazebo)/config/sonar_images.perspective" />

<node type="rviz" name="rviz" pkg="rviz" args="-d $(find fls_gazebo)/config/fls.rviz" />

</launch>
50 changes: 50 additions & 0 deletions fls_gazebo/worlds/blueview_basement_cylinder.world
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<world name="default">
<include>
<uri>model://ground_plane</uri>
</include>
<include>
<uri>model://sun</uri>
</include>

<!-- Include our Blueview p900 model -->
<include>
<uri>model://blueview_p900</uri>
<name>blueview_p900</name>
<pose>2.1 1.0 1.0 0 0 1.5709</pose>
<static>true</static>
</include>

<!-- Include basement tank -->
<include>
<uri>model://basement_tank</uri>
<pose>0 0 0 0 0 0</pose>
<static>true</static>
</include>

<!-- Include cylinder target -->
<include>
<uri>model://cylinder_target</uri>
<pose>2.1 3.0 1.0 0 0 0</pose>
<static>true</static>
</include>

<!-- Include sphere target
<include>
<uri>model://sphere_target</uri>
<pose>2.1 3.0 1.0 0 0 0</pose>
<static>true</static>
</include>
-->

<gui fullscreen='0'>
<camera name='user_camera'>
<pose frame=''>9.0 3.4 7.5 0.0 0.75 3.1</pose>
<view_controller>orbit</view_controller>
<projection_type>perspective</projection_type>
</camera>
</gui>

</world>
</sdf>
1 change: 1 addition & 0 deletions uuv_dave/models/bar/model.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<link name ='link'>
<pose>0 0 -80 0 0 0</pose>
<collision name ='collision'>
<laser_retro>255</laser_retro>
<geometry>
<box><size>0.1 0.1 0.5</size></box>
</geometry>
Expand Down
11 changes: 11 additions & 0 deletions uuv_dave/models/basement_tank/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" ?>
<model>
<name>basement_tank</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>
<author>
<name>Bruce Allen</name>
<email>[email protected]</email>
</author>
<description>basement tank</description>
</model>
131 changes: 131 additions & 0 deletions uuv_dave/models/basement_tank/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
<?xml version='1.0'?>
<sdf version='1.6'>
<model name='basement_tank_model'>
<link name='basement_tank'>
<inertial>
<mass>1</mass>
</inertial>

<collision name='bottom'>
<laser_retro>50</laser_retro>
<pose frame=''>2.135 3.27 0.005 0 -0 0</pose>
<geometry>
<box>
<size>4.27 6.54 0.01</size>
</box>
</geometry>
</collision>
<visual name='visual1'>
<pose frame=''>2.135 3.27 0.005 0 -0 0</pose>
<geometry>
<box>
<size>4.27 6.54 0.01</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/White</name>
</script>
</material>
</visual>

<collision name='left_side'>
<laser_retro>50</laser_retro>
<pose frame=''>-0.005 3.27 1.12 0 -0 0</pose>
<geometry>
<box>
<size>0.01 6.54 2.24</size>
</box>
</geometry>
</collision>
<visual name='visual2'>
<pose frame=''>-0.005 3.27 1.12 0 -0 0</pose>
<geometry>
<box>
<size>0.01 6.54 2.24</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/White</name>
</script>
</material>
</visual>

<collision name='right_side'>
<laser_retro>50</laser_retro>
<pose frame=''>4.275 3.27 1.12 0 -0 0</pose>
<geometry>
<box>
<size>0.01 6.54 2.24</size>
</box>
</geometry>
</collision>
<visual name='visual3'>
<pose frame=''>4.275 3.27 1.12 0 -0 0</pose>
<geometry>
<box>
<size>0.01 6.54 2.24</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/White</name>
</script>
</material>
</visual>

<collision name='front_side'>
<laser_retro>50</laser_retro>
<pose frame=''>2.135 -0.005 1.12 0 -0 0</pose>
<geometry>
<box>
<size>4.27 0.01 2.24</size>
</box>
</geometry>
</collision>
<visual name='visual4'>
<pose frame=''>2.135 -0.005 1.12 0 -0 0</pose>
<geometry>
<box>
<size>4.27 0.01 2.24</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/White</name>
</script>
</material>
</visual>

<collision name='back_side'>
<laser_retro>50</laser_retro>
<pose frame=''>2.135 6.545 1.12 0 -0 0</pose>
<geometry>
<box>
<size>4.27 0.01 2.24</size>
</box>
</geometry>
</collision>
<visual name='visual5'>
<pose frame=''>2.135 6.545 1.12 0 -0 0</pose>
<geometry>
<box>
<size>4.27 0.01 2.24</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/White</name>
</script>
</material>
</visual>

</link>
</model>
</sdf>
16 changes: 16 additions & 0 deletions uuv_dave/models/cylinder_target/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version='1.0'?>

<model>
<name>cylinder_target</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>

<author>
<name>Bruce Allen</name>
<email>[email protected]</email>
</author>

<description>
Cylinder Sonar target.
</description>
</model>
58 changes: 58 additions & 0 deletions uuv_dave/models/cylinder_target/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<model name ='cylinder_target'>
<link name='link'>
<inertial>
<mass>1</mass>
<inertia>
<ixx>0.145833</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.145833</iyy>
<iyz>0</iyz>
<izz>0.125</izz>
</inertia>
<pose frame=''>0 0 0 0 -0 0</pose>
</inertial>
<collision name='cylinder'>
<laser_retro>255</laser_retro>
<geometry>
<cylinder>
<radius>0.25</radius>
<length>1</length>
</cylinder>
</geometry>
<max_contacts>10</max_contacts>
<surface>
<contact>
<ode/>
</contact>
<bounce/>
<friction>
<torsional>
<ode/>
</torsional>
<ode/>
</friction>
</surface>
</collision>
<visual name='visual'>
<geometry>
<cylinder>
<radius>0.25</radius>
<length>1</length>
</cylinder>
</geometry>
<material>
<script>
<name>Gazebo/Grey</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual>
<self_collide>0</self_collide>
<enable_wind>0</enable_wind>
<kinematic>0</kinematic>
</link>
</model>
</sdf>
16 changes: 16 additions & 0 deletions uuv_dave/models/sphere_target/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version='1.0'?>

<model>
<name>sphere_target</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>

<author>
<name>Bruce Allen</name>
<email>[email protected]</email>
</author>

<description>
Sphere Sonar target.
</description>
</model>
48 changes: 48 additions & 0 deletions uuv_dave/models/sphere_target/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version='1.0'?>
<sdf version ='1.6'>
<model name='sphere_target'>
<static>1</static>
<allow_auto_disable>1</allow_auto_disable>
<pose frame=''>3 -1 0.5 0 -0 0</pose>
<link name='link'>
<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>
</inertial>
<visual name='visual'>
<geometry>
<sphere>
<radius>0.25</radius>
</sphere>
</geometry>
<material>
<script>
<name>Gazebo/Grey</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
<shader type='pixel'/>
</material>
<pose frame=''>0 0 0 0 -0 0</pose>
<transparency>0</transparency>
<cast_shadows>1</cast_shadows>
</visual>
<collision name='sphere'>
<laser_retro>255</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<sphere>
<radius>0.25</radius>
</sphere>
</geometry>
</collision>
</link>
</model>
</sdf>
8 changes: 8 additions & 0 deletions uuv_dave/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@

<buildtool_depend>catkin</buildtool_depend>

<depend version_gte="2.5.17">gazebo_ros</depend>
<depend>gazebo_dev</depend>
<depend>uuv_sensor_ros_plugins</depend>
<export>
<gazebo_ros gazebo_model_path="${prefix}/models"/>
<gazebo_ros gazebo_media_path="${prefix}"/>
</export>

</package>

0 comments on commit 3c1e512

Please sign in to comment.