Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
U2IS
aquanaute
Commits
0beafed9
Commit
0beafed9
authored
Jul 10, 2020
by
Ricardo Rico Uribe
Browse files
modified to be able to work with vrx hosted at ensta - missing thruster
parent
865620f8
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
0beafed9
...
@@ -5,27 +5,18 @@ Repository to simulate the Aquanaute boat in maritime conditions such as wind an
...
@@ -5,27 +5,18 @@ Repository to simulate the Aquanaute boat in maritime conditions such as wind an
## Installation
## Installation
*
Clone this repo to a Catkin Workspace
*
Clone this repo to a Catkin Workspace
*
Clone the VRX repo to the same Workspace (https://github.com/osrf/vrx)
*
In the path
*
Clone the VRX repo (hosted at ensta) to the same Workspace (http://git-u2is.ensta.fr/ssh/vrx) and checkout to the branch "aquanaute"
```
"workspace"/src/vrx/vrx_gazebo/launch/
```
create a new launch file "name".launch and copy the code provided below
*
In the path
```
"workspace"/src/vrx/vrx_gazebo/worlds/ocean.world.xacro
```
delete the contents of the file and replace them with the code provided below
## Usage
## Usage
### modify wind and waves
### modify wind and waves
in the ocean.world.xacro you have
in the ocean.world.xacro you have
found in /vrx_gazebo/worlds
```
xml
```
xml
<!--Waves-->
<!--Waves-->
<xacro:include
filename=
"$(find wave_gazebo)/world_models/ocean_waves/model.xacro"
/>
<xacro:include
filename=
"$(find wave_gazebo)/world_models/ocean_waves/model.xacro"
/>
<xacro:ocean_waves
gain=
"0.0"
period=
"5"
direction_x=
"-1.0"
direction_y=
"0.0"
angle=
"0.0"
/>
<xacro:ocean_waves
gain=
"0.0"
period=
"5"
direction_x=
"-1.0"
direction_y=
"0.0"
angle=
"0.0"
/>
<!--Wind
for the WAM-V. Note, wind parameters are set in the plug.
-->
<!--Wind-->
<xacro:include
filename=
"$(find vrx_gazebo)/worlds/xacros/usv_wind_plugin.xacro"
/>
<xacro:include
filename=
"$(find vrx_gazebo)/worlds/xacros/usv_wind_plugin.xacro"
/>
<xacro:usv_wind_gazebo
direction=
"90"
mean_vel=
"0"
var_gain=
"5"
var_time=
"1"
>
<xacro:usv_wind_gazebo
direction=
"90"
mean_vel=
"0"
var_gain=
"5"
var_time=
"1"
>
<wind_objs>
<wind_objs>
...
@@ -49,149 +40,11 @@ in the workspace run the command at the beginning (and every time you change a p
...
@@ -49,149 +40,11 @@ in the workspace run the command at the beginning (and every time you change a p
then launch the file you created
then launch the file you created
```
bash
```
bash
roslaunch
vrx
_gazebo
name
.launch
roslaunch
aquanaute
_gazebo
world
.launch
```
```
## Author
## Author
Ricardo RICO URIBE intern at U2IS in the summer of 2020
Ricardo RICO URIBE intern at U2IS in the summer of 2020
## Code
### .launch
```
xml
<?xml version="1.0"?>
<launch>
<env
name=
"ROSCONSOLE_CONFIG_FILE"
value=
"$(find vrx_gazebo)/config/custom_rosconsole.conf"
/>
<!-- Gazebo world to load -->
<arg
name=
"world"
default=
"$(find vrx_gazebo)/worlds/ocean.world"
/>
<!-- If true, run gazebo GUI -->
<arg
name=
"gui"
default=
"true"
/>
<!-- If true, run gazebo in verbose mode -->
<arg
name=
"verbose"
default=
"true"
/>
<!-- If true, start in paused state -->
<arg
name=
"paused"
default=
"false"
/>
<!-- Set various other gazebo arguments-->
<arg
name=
"extra_gazebo_args"
default=
""
/>
<!-- Start in a default namespace -->
<arg
name=
"namespace"
default=
"aquanaute"
/>
<!-- Initial USV location and attitude-->
<arg
name=
"x"
default=
"0"
/>
<arg
name=
"y"
default=
"0"
/>
<arg
name=
"z"
default=
"0.1"
/>
<arg
name=
"P"
default=
"0"
/>
<arg
name=
"R"
default=
"0"
/>
<arg
name=
"Y"
default=
"0"
/>
<env
name=
"VRX_DEBUG"
value=
"true"
/>
<!-- Allow user specified thruster configurations
H = stern trusters on each hull
T = H with a lateral thruster
X = "holonomic" configuration -->
<arg
name=
"thrust_config"
default=
"H"
/>
<!-- Do you want to enable sensors? -->
<arg
name=
"camera_enabled"
default=
"false"
/>
<arg
name=
"gps_enabled"
default=
"false"
/>
<arg
name=
"imu_enabled"
default=
"false"
/>
<arg
name=
"lidar_enabled"
default=
"false"
/>
<arg
name=
"ground_truth_enabled"
default=
"false"
/>
<!-- Start Gazebo with the world file -->
<include
file=
"$(find gazebo_ros)/launch/empty_world.launch"
>
<arg
name=
"world_name"
value=
"$(arg world)"
/>
<arg
name=
"verbose"
value=
"$(arg verbose)"
/>
<arg
name=
"paused"
value=
"$(arg paused)"
/>
<arg
name=
"use_sim_time"
value=
"true"
/>
<arg
name=
"gui"
value=
"$(arg gui)"
/>
<arg
name=
"enable_ros_network"
value=
"true"
/>
<arg
name=
"extra_gazebo_args"
value=
"$(arg extra_gazebo_args)"
/>
</include>
<!-- Load robot model -->
<arg
name=
"urdf"
default=
"$(find aquanaute_gazebo)/urdf/aquanaute_gazebo.urdf.xacro"
/>
<param
name=
"$(arg namespace)/robot_description"
command=
"$(find xacro)/xacro '$(arg urdf)'"
/>
<!-- Spawn model in Gazebo, script depending on non_competition_mode -->
<node
name=
"spawn_model"
pkg=
"gazebo_ros"
type=
"spawn_model"
args=
"-x $(arg x) -y $(arg y) -z $(arg z)
-R $(arg R) -P $(arg P) -Y $(arg Y)
-urdf -param $(arg namespace)/robot_description -model aquanaute"
/>
</launch>
```
### ocean.world.xacro
```
xml
<?xml version="1.0" ?>
<!--
Copyright (C) 2019 Rhys Mainwaring
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.
-->
<sdf
version=
"1.6"
xmlns:xacro=
"http://ros.org/wiki/xacro"
>
<world
name=
"ocean_world"
>
<!-- GUI -->
<gui>
<plugin
name=
"keyboard_gui_plugin"
filename=
"libKeyboardGUIPlugin.so"
/>
<camera
name=
'user_camera'
>
<pose
frame=
''
>
40 40 20 0 0.4 180
</pose>
<view_controller>
orbit
</view_controller>
<projection_type>
perspective
</projection_type>
</camera>
</gui>
<!-- Scene -->
<scene>
<sky>
<time>
10
</time>
<sunrise>
6
</sunrise>
<sunset>
18
</sunset>
<clouds>
<speed>
12
</speed>
<direction>
1.57079
</direction>
</clouds>
</sky>
<grid>
false
</grid>
<origin_visual>
false
</origin_visual>
</scene>
<!-- Lights -->
<include>
<uri>
model://sun
</uri>
</include>
<!--Waves-->
<xacro:include
filename=
"$(find wave_gazebo)/world_models/ocean_waves/model.xacro"
/>
<xacro:ocean_waves
gain=
"0.0"
period=
"5"
direction_x=
"-1.0"
direction_y=
"0.0"
angle=
"0.0"
/>
<!--Wind for the WAM-V. Note, wind parameters are set in the plug.-->
<xacro:include
filename=
"$(find vrx_gazebo)/worlds/xacros/usv_wind_plugin.xacro"
/>
<xacro:usv_wind_gazebo
direction=
"90"
mean_vel=
"0.0"
var_gain=
"5"
var_time=
"1"
>
<wind_objs>
<wind_obj>
<name>
aquanaute
</name>
<link_name>
base_link
</link_name>
<coeff_vector>
0.5 0.5 0.33
</coeff_vector>
</wind_obj>
</wind_objs>
</xacro:usv_wind_gazebo>
</world>
</sdf>
```
## License
## License
aquanaute_description/urdf/aquanaute_description.urdf.xacro
View file @
0beafed9
<?xml version="1.0"?>
<?xml version="1.0"?>
<robot
xmlns:xacro=
"http://ros.org/wiki/xacro"
name=
"aquanaute"
>
<robot
xmlns:xacro=
"http://ros.org/wiki/xacro"
>
<material
name=
"blue"
>
<material
name=
"blue"
>
<color
rgba=
"0 0 0.8 1"
/>
<color
rgba=
"0 0 0.8 1"
/>
...
...
aquanaute_gazebo/launch/world.launch
0 → 100644
View file @
0beafed9
<?xml version="1.0"?>
<launch>
<env
name=
"ROSCONSOLE_CONFIG_FILE"
value=
"$(find vrx_gazebo)/config/custom_rosconsole.conf"
/>
<!-- Gazebo world to load -->
<arg
name=
"world"
default=
"$(find vrx_gazebo)/worlds/ocean.world"
/>
<!-- If true, run gazebo GUI -->
<arg
name=
"gui"
default=
"true"
/>
<!-- If true, run gazebo in verbose mode -->
<arg
name=
"verbose"
default=
"true"
/>
<!-- If true, start in paused state -->
<arg
name=
"paused"
default=
"false"
/>
<!-- Set various other gazebo arguments-->
<arg
name=
"extra_gazebo_args"
default=
""
/>
<!-- Start in a default namespace -->
<arg
name=
"namespace"
default=
"aquanaute"
/>
<!-- Initial USV location and attitude-->
<arg
name=
"x"
default=
"0"
/>
<arg
name=
"y"
default=
"0"
/>
<arg
name=
"z"
default=
"0.1"
/>
<arg
name=
"P"
default=
"0"
/>
<arg
name=
"R"
default=
"0"
/>
<arg
name=
"Y"
default=
"0"
/>
<env
name=
"VRX_DEBUG"
value=
"true"
/>
<!-- Start Gazebo with the world file -->
<include
file=
"$(find gazebo_ros)/launch/empty_world.launch"
>
<arg
name=
"world_name"
value=
"$(arg world)"
/>
<arg
name=
"verbose"
value=
"$(arg verbose)"
/>
<arg
name=
"paused"
value=
"$(arg paused)"
/>
<arg
name=
"use_sim_time"
value=
"true"
/>
<arg
name=
"gui"
value=
"$(arg gui)"
/>
<arg
name=
"enable_ros_network"
value=
"true"
/>
<arg
name=
"extra_gazebo_args"
value=
"$(arg extra_gazebo_args)"
/>
</include>
<!-- Load robot model -->
<arg
name=
"urdf"
default=
"$(find aquanaute_gazebo)/urdf/aquanaute_gazebo.urdf.xacro"
/>
<param
name=
"$(arg namespace)/robot_description"
command=
"$(find xacro)/xacro '$(arg urdf)'"
/>
<!-- Spawn model in Gazebo, script depending on non_competition_mode -->
<node
name=
"spawn_model"
pkg=
"gazebo_ros"
type=
"spawn_model"
args=
"-x $(arg x) -y $(arg y) -z $(arg z)
-R $(arg R) -P $(arg P) -Y $(arg Y)
-urdf -param $(arg namespace)/robot_description -model aquanaute"
/>
</launch>
aquanaute_gazebo/urdf/aquanaute_gazebo.urdf.xacro
View file @
0beafed9
<?xml version="1.0"?>
<?xml version="1.0"?>
<!-- Basic WAM-V with gazebo plugins for dynamics -->
<!-- Basic WAM-V with gazebo plugins for dynamics -->
<robot
xmlns:xacro=
"http://ros.org/wiki/xacro"
name=
"aquanaute"
>
<robot
xmlns:xacro=
"http://ros.org/wiki/xacro"
>
<!-- Include macros for dynamics plugins -->
<!-- Include macros for dynamics plugins -->
<xacro:include
filename=
"$(find aquanaute_gazebo)/urdf/macros.xacro"
/>
<xacro:include
filename=
"$(find aquanaute_gazebo)/urdf/macros.xacro"
/>
<!-- Defines the base vehicle -->
<!-- Defines the base vehicle -->
<xacro:include
filename=
"$(find aquanaute_description)/urdf/aquanaute_description.urdf.xacro"
name=
"aquanaute"
/>
<xacro:include
filename=
"$(find aquanaute_description)/urdf/aquanaute_description.urdf.xacro"
/>
<!-- Attach hydrodynamics plugin -->
<!-- Attach hydrodynamics plugin -->
<xacro:usv_dynamics_gazebo
name=
"aquanaute_dynamics_plugin"
/>
<xacro:usv_dynamics_gazebo
name=
"aquanaute_dynamics_plugin"
/>
</robot>
</robot>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment