Commit e714f54c28ffc26bdd99c2ca7cd84ade82764783

Authored by Ricardo Rico Uribe
1 parent d0abee90

spawn correct - flotation incorrect

aquanaute_description/launch/description.launch
1 1 <launch>
2 2 <arg name="robot_namespace" default="aquanaute"/>
3 3  
4   - <param name="robot_description" command="cat $(find aquanaute_description)/urdf/aquanaute.urdf"/>
  4 + <param name="robot_description" command="cat $(find aquanaute_description)/urdf/aquanaute_description.urdf.xacro"/>
5 5  
6 6 <!-- send fake joint values -->
7 7 <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
... ...
aquanaute_description/urdf/aquanaute.urdf renamed to aquanaute_description/urdf/aquanaute_description.urdf.xacro
1 1 <?xml version="1.0"?>
2   -<robot name="aquanaute">
  2 +<robot xmlns:xacro="http://ros.org/wiki/xacro" name="aquanaute">
3 3  
4 4 <material name="blue">
5 5 <color rgba="0 0 0.8 1"/>
... ... @@ -209,7 +209,7 @@
209 209 <kd>100000.0</kd>
210 210 <mu1>10.0</mu1>
211 211 <mu2>10.0</mu2>
212   - <material>Gazebo/Grey</material>
  212 + <material>Gazebo/Red</material>
213 213 </gazebo>
214 214  
215 215 <gazebo reference="left_hull_link">
... ... @@ -217,7 +217,7 @@
217 217 <kd>100000.0</kd>
218 218 <mu1>10.0</mu1>
219 219 <mu2>10.0</mu2>
220   - <material>Gazebo/Grey</material>
  220 + <material>Gazebo/Red</material>
221 221 </gazebo>
222 222  
223 223 <gazebo reference="motor_link">
... ... @@ -225,7 +225,7 @@
225 225 <kd>100000.0</kd>
226 226 <mu1>10.0</mu1>
227 227 <mu2>10.0</mu2>
228   - <material>Gazebo/Grey</material>
  228 + <material>Gazebo/Black</material>
229 229 </gazebo>
230 230  
231 231 <gazebo reference="sensor_frame_link">
... ... @@ -233,35 +233,7 @@
233 233 <kd>100000.0</kd>
234 234 <mu1>10.0</mu1>
235 235 <mu2>10.0</mu2>
236   - <material>Gazebo/Grey</material>
  236 + <material>Gazebo/White</material>
237 237 </gazebo>
238   - <!--
239   - <joint name="pitch_joint" type="revolute">
240   - <parent link="roll_M1_link"/>
241   - <child link="pitch_M2_link"/>
242   - <origin xyz="0 0 0" rpy="0 -1.5708 0"/>
243   - <limit lower="0" upper="0.44" effort="0.1" velocity="0.005"/>
244   - <axis xyz="0 1 0"/>
245   - </joint>
246   -
247   - <joint name="yaw_joint" type="continuous">
248   - <parent link="pitch_M2_link"/>
249   - <child link="yaw_M3_link"/>
250   - <origin xyz="0.01 0 0" rpy="0 1.5708 0"/>
251   - <limit effort="0.1" velocity="0.01"/>
252   - <axis xyz="0 0 1"/>
253   - </joint>
254   - -->
255 238  
256   - <!-- This is for color and physical properties in Gazebo, color won't work with the material tag in gazebo
257   - only for URDF coloring
258   - <gazebo reference="roll_M1_link">
259   - <kp>1000.0</kp>
260   - <kd>10.0</kd>
261   - <mu1>10.0</mu1>
262   - <mu2>10.0</mu2>
263   - <material>Gazebo/Red</material>
264   - </gazebo>
265   - -->
266   -
267 239 </robot>
... ...
aquanaute_gazebo/CMakeList.txt deleted
... ... @@ -1,14 +0,0 @@
1   -cmake_minimum_required(VERSION 2.8.3)
2   -project(aquanaute_gazebo)
3   -
4   -find_package(catkin REQUIRED COMPONENTS roslaunch)
5   -
6   -catkin_package()
7   -
8   -roslaunch_add_file_check(launch)
9   -
10   -install(
11   - DIRECTORY launch worlds
12   - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
13   -)
14   -
aquanaute_gazebo/CMakeLists.txt 0 → 100644
... ... @@ -0,0 +1,21 @@
  1 +cmake_minimum_required(VERSION 2.8.3)
  2 +project(aquanaute_gazebo)
  3 +find_package(catkin REQUIRED COMPONENTS
  4 + aquanaute_description
  5 + usv_gazebo_plugins
  6 + xacro
  7 +)
  8 +catkin_package(
  9 + CATKIN_DEPENDS aquanaute_description usv_gazebo_plugins xacro
  10 +)
  11 +
  12 +# Generate urdf files from xacro and install
  13 +xacro_add_files(
  14 + urdf/aquanaute_gazebo.urdf.xacro
  15 + INORDER INSTALL DESTINATION urdf
  16 +)
  17 +
  18 +# Install xacro files / macros
  19 +install(DIRECTORY urdf/
  20 + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/urdf)
  21 +
... ...
aquanaute_gazebo/launch/empty_world.launch deleted
... ... @@ -1,18 +0,0 @@
1   -<launch>
2   -
3   - <arg name="world_name" default="worlds/empty.world"/>
4   -
5   - <include file="$(find gazebo_ros)/launch/empty_world.launch">
6   - <arg name="world_name" value="$(arg world_name)"/> <!-- world_name is wrt GAZEBO_RESOURCE_PATH environment variable -->
7   - <arg name="paused" value="false"/>
8   - <arg name="use_sim_time" value="true"/>
9   - <arg name="gui" value="true"/>
10   - <arg name="headless" value="false"/>
11   - <arg name="debug" value="false"/>
12   - </include>
13   -
14   - <include file="$(find aquanaute_gazebo)/launch/spawn_aquanaute.launch">
15   - </include>
16   -
17   -</launch>
18   -
aquanaute_gazebo/launch/lac_world.launch deleted
... ... @@ -1,13 +0,0 @@
1   -<launch>
2   -
3   - <include file="$(find gazebo_ros)/launch/empty_world.launch">
4   - <arg name="world_name" value="$(find aquanaute_gazebo)/worlds/lac.world"/>
5   - <arg name="paused" value="false"/>
6   - <arg name="use_sim_time" value="true"/>
7   - <arg name="gui" value="true"/>
8   - <arg name="headless" value="false"/>
9   - <arg name="debug" value="false"/>
10   - </include>
11   -
12   -</launch>
13   -
aquanaute_gazebo/launch/spawn_aquanaute.launch deleted
... ... @@ -1,31 +0,0 @@
1   -<launch>
2   -
3   - <arg name="robot_namespace" default="/"/>
4   -
5   - <arg name="x" default="0.0"/>
6   - <arg name="y" default="0.0"/>
7   - <arg name="z" default="0.0"/>
8   - <arg name="yaw" default="0.0"/>
9   -
10   - <group ns="$(arg robot_namespace)">
11   -
12   - <include file="$(find aquanaute_description)/launch/description.launch" >
13   - <arg name="robot_namespace" value="$(arg robot_namespace)"/>
14   - <!--<arg name="urdf_extras" default="$(arg urdf_extras)"/>-->
15   - </include>
16   -
17   - <!-- Spawn robot in gazebo -->
18   - <node name="spawn_husky_model" pkg="gazebo_ros" type="spawn_model"
19   - args="-x $(arg x)
20   - -y $(arg y)
21   - -z $(arg z)
22   - -Y $(arg yaw)
23   - -unpause
24   - -urdf
25   - -param robot_description
26   - -model $(arg robot_namespace)" />
27   -
28   - </group>
29   -
30   -</launch>
31   -
aquanaute_gazebo/package.xml
1 1 <?xml version="1.0"?>
2   -<package>
  2 +<package format="2">
3 3 <name>aquanaute_gazebo</name>
4   - <version>0.4.2</version>
5   - <description>Aquanaute Simulator bringup</description>
6   -
7   - <author email="ricardo.rico-uribe@ensta-paris.fr">Ricardo RICO URIBE</author>
8   -
  4 + <version>1.3.0</version>
  5 + <description>
  6 + Provides templates and examples for integrating the WAM-V model into gazebo with dynamics, sensors, etc.
  7 + </description>
  8 + <maintainer email="caguero@osrfoundation.org">Carlos Aguero</maintainer>
  9 + <maintainer email="jriveroo@osrfoundation.org">Jose Luis Rivero</maintainer>
  10 + <license>Apache 2.0</license>
  11 + <url type="website">http://wiki.ros.org/wamv_gazebo</url>
  12 + <url type="bugtracker">http://github.com/osrf/vrx/issues</url>
  13 + <author email="briansbingham@gmail.com">Brian Bingham</author>
  14 + <author email="caguero@osrfoundation.org">Carlos Aguero</author>
9 15 <buildtool_depend>catkin</buildtool_depend>
10   - <build_depend>roslaunch</build_depend>
11   - <run_depend>controller_manager</run_depend>
12   - <run_depend>gazebo_plugins</run_depend>
13   - <run_depend>gazebo_ros</run_depend>
14   - <run_depend>gazebo_ros_control</run_depend>
15   - <run_depend>aquanaute_description</run_depend>
16   - <run_depend>rostopic</run_depend>
17   -
18   - <export>
19   - </export>
  16 + <depend>gazebo_plugins</depend>
  17 + <depend>hector_gazebo_plugins</depend>
  18 + <depend>robot_localization</depend>
  19 + <depend>usv_gazebo_plugins</depend>
  20 + <depend>velodyne_gazebo_plugins</depend>
  21 + <depend>aquanaute_description</depend>
  22 + <depend>xacro</depend>
20 23 </package>
21   -
... ...
aquanaute_gazebo/urdf/aquanaute_gazebo.urdf.xacro 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +<?xml version="1.0"?>
  2 +<!-- Basic WAM-V with gazebo plugins for dynamics -->
  3 +<robot xmlns:xacro="http://ros.org/wiki/xacro" name="aquanaute">
  4 + <!-- Include macros for dynamics plugins -->
  5 + <xacro:include filename="$(find aquanaute_gazebo)/urdf/macros.xacro" />
  6 + <!-- Defines the base vehicle -->
  7 + <xacro:include filename="$(find aquanaute_description)/urdf/aquanaute_description.urdf.xacro" />
  8 + <!-- Attach hydrodynamics plugin -->
  9 + <xacro:usv_dynamics_gazebo name="aquanaute_dynamics_plugin"/>
  10 +</robot>
... ...
aquanaute_gazebo/urdf/aquanaute_gazebo.xacro 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +<?xml version="1.0"?>
  2 +<robot xmlns:xacro="http://ros.org/wiki/xacro">
  3 + <xacro:macro name="aquanaute_gazebo">
  4 + <!-- Include macros for dynamics plugins -->
  5 + <xacro:include filename="$(find aquanaute_gazebo)/urdf/macros.xacro" />
  6 + <!-- Defines the base vehicle -->
  7 + <xacro:include filename="$(find aquanaute_description)/urdf/aquanaute_description.urdf.xacro" />
  8 + <!-- Attach hydrodynamics plugin -->
  9 + <xacro:usv_dynamics_gazebo name="aquanaute_dynamics_plugin"/>
  10 + </xacro:macro>
  11 +</robot>
... ...
aquanaute_gazebo/urdf/dynamics/aquanaute_gazebo_dynamics_plugin.xacro 0 → 100644
... ... @@ -0,0 +1,37 @@
  1 +<?xml version="1.0"?>
  2 +<robot xmlns:xacro="http://ros.org/wiki/xacro">
  3 + <xacro:macro name="usv_dynamics_gazebo" params="name">
  4 + <!--Gazebo Plugin for simulating WAM-V dynamics-->
  5 + <gazebo>
  6 + <plugin name="usv_dynamics_${name}" filename="libusv_gazebo_dynamics_plugin.so">
  7 + <bodyName>base_link</bodyName>
  8 + <!-- Must be same as the ocean model!-->
  9 + <waterLevel>0</waterLevel>
  10 + <waterDensity>997.8</waterDensity>
  11 + <!-- Added mass -->
  12 + <xDotU>0.0</xDotU>
  13 + <yDotV>0.0</yDotV>
  14 + <nDotR>0.0</nDotR>
  15 + <!-- Linear and quadratic drag -->
  16 + <xU>51.3</xU>
  17 + <xUU>72.4</xUU>
  18 + <yV>40.0</yV>
  19 + <yVV>0.0</yVV>
  20 + <zW>500.0</zW>
  21 + <kP>50.0</kP>
  22 + <mQ>50.0</mQ>
  23 + <nR>400.0</nR>
  24 + <nRR>0.0</nRR>
  25 + <!-- General dimensions -->
  26 + <!--<boatArea>2.2</boatArea>-->
  27 + <hullRadius>0.19</hullRadius>
  28 + <boatWidth>2</boatWidth>
  29 + <boatLength>3</boatLength>
  30 + <!-- Length discretization, AKA, "N" -->
  31 + <length_n>10</length_n>
  32 + <!-- Wave model -->
  33 + <wave_model>ocean_waves</wave_model>
  34 + </plugin>
  35 + </gazebo>
  36 + </xacro:macro>
  37 +</robot>
... ...
aquanaute_gazebo/urdf/macros.xacro 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?xml version="1.0"?>
  2 +<!-- Includes all macros in this package so they don't need to be included individualy -->
  3 +<robot xmlns:xacro="http://ros.org/wiki/xacro"
  4 + name="Aquanaute">
  5 + <!-- Include dynamics macros -->
  6 + <xacro:include filename="$(find aquanaute_gazebo)/urdf/dynamics/aquanaute_gazebo_dynamics_plugin.xacro" />
  7 +</robot>
... ...
aquanaute_gazebo/worlds/empty.world deleted
... ... @@ -1,108 +0,0 @@
1   -<?xml version="1.0"?>
2   -<!--
3   -Software License Agreement (BSD)
4   -
5   -\file clearpath_playpen.world
6   -\authors Prasenjit Mukherjee <code@clearpathrobotics.com
7   -\copyright Copyright (c) 2015, Clearpath Robotics, Inc., All rights reserved.
8   -
9   -Redistribution and use in source and binary forms, with or without modification, are permitted provided that
10   -the following conditions are met:
11   - * Redistributions of source code must retain the above copyright notice, this list of conditions and the
12   - following disclaimer.
13   - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
14   - following disclaimer in the documentation and/or other materials provided with the distribution.
15   - * Neither the name of Clearpath Robotics nor the names of its contributors may be used to endorse or promote
16   - products derived from this software without specific prior written permission.
17   -
18   -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WAR-
19   -RANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20   -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, IN-
21   -DIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
22   -OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23   -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24   -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25   --->
26   -<sdf version='1.4'>
27   - <world name='default'>
28   - <light name='sun' type='directional'>
29   - <cast_shadows>1</cast_shadows>
30   - <pose>0 0 10 0 -0 0</pose>
31   - <diffuse>0.8 0.8 0.8 1</diffuse>
32   - <specular>0.2 0.2 0.2 1</specular>
33   - <attenuation>
34   - <range>1000</range>
35   - <constant>0.9</constant>
36   - <linear>0.01</linear>
37   - <quadratic>0.001</quadratic>
38   - </attenuation>
39   - <direction>-0.5 0.1 -0.9</direction>
40   - </light>
41   - <model name='ground_plane'>
42   - <static>1</static>
43   - <link name='link'>
44   - <collision name='collision'>
45   - <geometry>
46   - <plane>
47   - <normal>0 0 1</normal>
48   - <size>100 100</size>
49   - </plane>
50   - </geometry>
51   - <surface>
52   - <friction>
53   - <ode>
54   - <mu>100</mu>
55   - <mu2>50</mu2>
56   - </ode>
57   - </friction>
58   - <bounce/>
59   - <contact>
60   - <ode/>
61   - </contact>
62   - </surface>
63   - <max_contacts>10</max_contacts>
64   - </collision>
65   - <visual name='visual'>
66   - <cast_shadows>0</cast_shadows>
67   - <geometry>
68   - <plane>
69   - <normal>0 0 1</normal>
70   - <size>100 100</size>
71   - </plane>
72   - </geometry>
73   - <material>
74   - <script>
75   - <uri>file://media/materials/scripts/gazebo.material</uri>
76   - <name>Gazebo/Grey</name>
77   - </script>
78   - </material>
79   - </visual>
80   - <velocity_decay>
81   - <linear>0</linear>
82   - <angular>0</angular>
83   - </velocity_decay>
84   - <self_collide>0</self_collide>
85   - <kinematic>0</kinematic>
86   - <gravity>1</gravity>
87   - </link>
88   - </model>
89   - <physics type='ode'>
90   - <max_step_size>0.01</max_step_size>
91   - <real_time_factor>1</real_time_factor>
92   - <real_time_update_rate>100</real_time_update_rate>
93   - <gravity>0 0 -9.8</gravity>
94   - </physics>
95   - <scene>
96   - <ambient>0.4 0.4 0.4 1</ambient>
97   - <background>0.7 0.7 0.7 1</background>
98   - <shadows>1</shadows>
99   - </scene>
100   - <gui fullscreen='0'>
101   - <camera name='user_camera'>
102   - <pose>16.2337 1.23674 17.6497 0 0.923643 -3.08299</pose>
103   - <view_controller>orbit</view_controller>
104   - </camera>
105   - </gui>
106   - </world>
107   -</sdf>
108   -
aquanaute_gazebo/worlds/lac.world deleted
... ... @@ -1,108 +0,0 @@
1   -<?xml version="1.0"?>
2   -<!--
3   -Software License Agreement (BSD)
4   -
5   -\file clearpath_playpen.world
6   -\authors Prasenjit Mukherjee <code@clearpathrobotics.com
7   -\copyright Copyright (c) 2015, Clearpath Robotics, Inc., All rights reserved.
8   -
9   -Redistribution and use in source and binary forms, with or without modification, are permitted provided that
10   -the following conditions are met:
11   - * Redistributions of source code must retain the above copyright notice, this list of conditions and the
12   - following disclaimer.
13   - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
14   - following disclaimer in the documentation and/or other materials provided with the distribution.
15   - * Neither the name of Clearpath Robotics nor the names of its contributors may be used to endorse or promote
16   - products derived from this software without specific prior written permission.
17   -
18   -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WAR-
19   -RANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20   -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, IN-
21   -DIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
22   -OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23   -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24   -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25   --->
26   -<sdf version='1.4'>
27   - <world name='default'>
28   - <light name='sun' type='directional'>
29   - <cast_shadows>1</cast_shadows>
30   - <pose>0 0 10 0 -0 0</pose>
31   - <diffuse>0.8 0.8 0.8 1</diffuse>
32   - <specular>0.2 0.2 0.2 1</specular>
33   - <attenuation>
34   - <range>1000</range>
35   - <constant>0.9</constant>
36   - <linear>0.01</linear>
37   - <quadratic>0.001</quadratic>
38   - </attenuation>
39   - <direction>-0.5 0.1 -0.9</direction>
40   - </light>
41   - <model name='ground_plane'>
42   - <static>1</static>
43   - <link name='link'>
44   - <collision name='collision'>
45   - <geometry>
46   - <plane>
47   - <normal>0 0 1</normal>
48   - <size>100 100</size>
49   - </plane>
50   - </geometry>
51   - <surface>
52   - <friction>
53   - <ode>
54   - <mu>100</mu>
55   - <mu2>50</mu2>
56   - </ode>
57   - </friction>
58   - <bounce/>
59   - <contact>
60   - <ode/>
61   - </contact>
62   - </surface>
63   - <max_contacts>10</max_contacts>
64   - </collision>
65   - <visual name='visual'>
66   - <cast_shadows>0</cast_shadows>
67   - <geometry>
68   - <plane>
69   - <normal>0 0 1</normal>
70   - <size>100 100</size>
71   - </plane>
72   - </geometry>
73   - <material>
74   - <script>
75   - <uri>file://media/materials/scripts/gazebo.material</uri>
76   - <name>Gazebo/Grey</name>
77   - </script>
78   - </material>
79   - </visual>
80   - <velocity_decay>
81   - <linear>0</linear>
82   - <angular>0</angular>
83   - </velocity_decay>
84   - <self_collide>0</self_collide>
85   - <kinematic>0</kinematic>
86   - <gravity>1</gravity>
87   - </link>
88   - </model>
89   - <physics type='ode'>
90   - <max_step_size>0.01</max_step_size>
91   - <real_time_factor>1</real_time_factor>
92   - <real_time_update_rate>100</real_time_update_rate>
93   - <gravity>0 0 -9.8</gravity>
94   - </physics>
95   - <scene>
96   - <ambient>0.4 0.4 0.4 1</ambient>
97   - <background>0.7 0.7 0.7 1</background>
98   - <shadows>1</shadows>
99   - </scene>
100   - <gui fullscreen='0'>
101   - <camera name='user_camera'>
102   - <pose>16.2337 1.23674 17.6497 0 0.923643 -3.08299</pose>
103   - <view_controller>orbit</view_controller>
104   - </camera>
105   - </gui>
106   - </world>
107   -</sdf>
108   -
vrx_gazebo/launch/sandisland.launch
... ... @@ -17,7 +17,7 @@
17 17 <!-- Initial USV location and attitude-->
18 18 <arg name="x" default="0" />
19 19 <arg name="y" default="0" />
20   - <arg name="z" default="0" />
  20 + <arg name="z" default="2" />
21 21 <arg name="P" default="0" />
22 22 <arg name="R" default="0" />
23 23 <arg name="Y" default="0" />
... ... @@ -37,9 +37,10 @@
37 37 <arg name="extra_gazebo_args" value="$(arg extra_gazebo_args)"/>
38 38 </include>
39 39  
40   - <!-- Load robot model -->
  40 +<!-- Load robot model -->
  41 + <arg name="urdf" default="$(find aquanaute_gazebo)/urdf/aquanaute_gazebo.urdf.xacro"/>
41 42 <param name="$(arg namespace)/robot_description"
42   - command="cat $(find aquanaute_description)/urdf/aquanaute.urdf"/>
  43 + command="$(find xacro)/xacro '$(arg urdf)'"/>
43 44  
44 45 <!-- Spawn model in Gazebo, script depending on non_competition_mode -->
45 46 <node name="spawn_model" pkg="gazebo_ros" type="spawn_model"
... ...
vrx_gazebo/worlds/ocean.world.xacro
... ... @@ -51,6 +51,5 @@
51 51  
52 52 <!-- World models -->
53 53 <xacro:include filename="$(find wave_gazebo)/world_models/ocean_waves/model.xacro"/>
54   - <xacro:ocean_waves gain="0.6"/>
55 54 </world>
56 55 </sdf>
... ...
vrx_gazebo/worlds/xacros/usv_wind_plugin.xacro
... ... @@ -5,7 +5,7 @@
5 5 direction:=270
6 6 mean_vel:=0
7 7 var_gain:=0
8   - var_time:=1
  8 + var_time:=0
9 9 seed:=''
10 10 ros_update_rate:=10
11 11 " >
... ...
wave_gazebo/world_models/ocean_waves/model.xacro
... ... @@ -22,83 +22,79 @@
22 22 Modified to include wave field model and visual plugins.
23 23 -->
24 24  
25   -
26   -
27 25 <world xmlns:xacro="http://ros.org/wiki/xacro">
28   - <xacro:macro name="ocean_waves" params="gain:=0.1 period:=5
29   - direction_x:=1.0 direction_y:=0.0
30   - angle:=0.4">
31   - <model name='ocean_waves'>
32   - <static>true</static>
33   - <plugin name="wavefield_plugin" filename="libWavefieldModelPlugin.so">
34   - <static>false</static>
35   - <update_rate>30</update_rate>
36   - <size>1000 1000</size>
37   - <cell_count>50 50</cell_count>
38   - <wave>
39   - <model>PMS</model>
40   - <period>${period}</period>
41   - <number>3</number>
42   - <scale>1.5</scale>
43   - S <gain>${gain}</gain>
44   - <direction>${direction_x} ${direction_y}</direction>
45   - <angle>${angle}</angle>
46   - <tau>2.0</tau>
47   - <amplitude>0.0</amplitude> <!-- No effect for the PMS model -->
48   - <steepness>0.0</steepness>
49   - </wave>
50   - </plugin>
  26 + <xacro:macro name="ocean_waves" params="gain:=0.0 period:=5 direction_x:=1.0 direction_y:=0.0 angle:=0.4">
  27 + <model name='ocean_waves'>
  28 + <static>true</static>
  29 + <plugin name="wavefield_plugin" filename="libWavefieldModelPlugin.so">
  30 + <static>false</static>
  31 + <update_rate>30</update_rate>
  32 + <size>500 500</size>
  33 + <cell_count>50 50</cell_count>
  34 + <wave>
  35 + <model>PMS</model>
  36 + <period>${period}</period>
  37 + <number>3</number>
  38 + <scale>1.5</scale>
  39 + <gain>${gain}</gain>
  40 + <direction>${direction_x} ${direction_y}</direction>
  41 + <angle>${angle}</angle>
  42 + <tau>2.0</tau>
  43 + <amplitude>0.0</amplitude> <!-- No effect for the PMS model -->
  44 + <steepness>0.0</steepness>
  45 + </wave>
  46 + </plugin>
51 47  
52   - <link name="ocean_waves_link">
53   - <visual name="ocean_waves_visual">
54   - <plugin name="ocean_waves_visual_plugin" filename="libWavefieldVisualPlugin.so">
55   - <enableRtt>true</enableRtt>
56   - <rttNoise>0.1</rttNoise>
57   - <refractOpacity>0.2</refractOpacity>
58   - <reflectOpacity>0.2</reflectOpacity>
59   - <wave>
60   - <model>PMS</model>
61   - <period>${period}</period>
62   - <number>3</number>
63   - <scale>1.5</scale>
64   - <gain>${gain}</gain>
65   - <direction>${direction_x} ${direction_y}</direction>
66   - <angle>${angle}</angle>
67   - <tau>2.0</tau>
68   - <amplitude>0.0</amplitude> <!-- No effect for the PMS model -->
69   - <steepness>0.0</steepness>
70   - </wave>
71   - </plugin>
72   - <geometry>
73   - <mesh>
74   - <uri>model://ocean_waves/meshes/mesh.dae</uri>
75   - </mesh>
76   - </geometry>
77   - <material>
78   - <script>
79   - <uri>model://ocean_waves/materials/scripts/waves.material</uri>
80   - <name>WaveSim/GerstnerWaves</name>
81   - </script>
82   - </material>
83   - <laser_retro>-1</laser_retro>
84   - </visual>
85   - <visual name="ocean_waves_below_visual">
86   - <pose>0 0 -0.05 0 0 0</pose> <!-- Offset to prevent rendering conflict -->
87   - <geometry>
88   - <mesh>
89   - <uri>model://ocean_waves/meshes/mesh_below.dae</uri>
90   - </mesh>
91   - </geometry>
92   - <material>
93   - <script>
94   - <uri>model://ocean_waves/materials/scripts/waves.material</uri>
95   - <name>WaveSim/GerstnerWaves</name>
96   - </script>
97   - </material>
98   - <laser_retro>-1</laser_retro>
99   - </visual>
100   - </link>
101   - </model>
  48 + <link name="ocean_waves_link">
  49 + <visual name="ocean_waves_visual">
  50 + <plugin name="ocean_waves_visual_plugin" filename="libWavefieldVisualPlugin.so">
  51 + <enableRtt>true</enableRtt>
  52 + <rttNoise>0.1</rttNoise>
  53 + <refractOpacity>0.2</refractOpacity>
  54 + <reflectOpacity>0.2</reflectOpacity>
  55 + <wave>
  56 + <model>PMS</model>
  57 + <period>${period}</period>
  58 + <number>3</number>
  59 + <scale>1.5</scale>
  60 + <gain>${gain}</gain>
  61 + <direction>${direction_x} ${direction_y}</direction>
  62 + <angle>${angle}</angle>
  63 + <tau>2.0</tau>
  64 + <amplitude>0.0</amplitude> <!-- No effect for the PMS model -->
  65 + <steepness>0.0</steepness>
  66 + </wave>
  67 + </plugin>
  68 + <geometry>
  69 + <mesh>
  70 + <uri>model://ocean_waves/meshes/mesh.dae</uri>
  71 + </mesh>
  72 + </geometry>
  73 + <material>
  74 + <script>
  75 + <uri>model://ocean_waves/materials/scripts/waves.material</uri>
  76 + <name>WaveSim/GerstnerWaves</name>
  77 + </script>
  78 + </material>
  79 + <laser_retro>-1</laser_retro>
  80 + </visual>
  81 + <visual name="ocean_waves_below_visual">
  82 + <pose>0 0 -0.05 0 0 0</pose> <!-- Offset to prevent rendering conflict -->
  83 + <geometry>
  84 + <mesh>
  85 + <uri>model://ocean_waves/meshes/mesh_below.dae</uri>
  86 + </mesh>
  87 + </geometry>
  88 + <material>
  89 + <script>
  90 + <uri>model://ocean_waves/materials/scripts/waves.material</uri>
  91 + <name>WaveSim/GerstnerWaves</name>
  92 + </script>
  93 + </material>
  94 + <laser_retro>-1</laser_retro>
  95 + </visual>
  96 + </link>
  97 + </model>
102 98 </xacro:macro>
103 99 </world>
104 100  
... ...