Gazebo Simulator Installation Instructions

  • Minnebot Gazebo Simulator

Files to Download

From the IRVLab_home_drive/Aqua-Minnebot Google Drive, download "aqua8.tar.bz2" from the "Base Aqua8 Code" folder and the "aqua_related_march_9_2018.zip" in the base folder. Extract both files in the directory in which you wish to install the simulator. From here on out the "aqua_stock_catkin_workspace" directory generated from extracting the first file will be referred to as the "base directory".

Installation Instructions

1.   In terminal, change your working directory to the base directory and run the following command:

export AQUA_WS_PATH='pwd'

2.   Now change directory to the "RoboDevel" subdirectory and run the following commands:

source aqua-environment-linux-aqua5
./install_ubuntu_dependencies.sh
find . -iname '*.d' -exec rm {} \;
make

*The third command listed above deletes remnant files from an older version of ROS that contain hard-coded links for another computer.

3.   Change directory to the "OCULite" subdirectory of the base directory

A.   Change to the "build" subdirectory and open the file "cmake_install.cmake" to edit

B.   Change the second last line of the "cmake_install.cmake" file to the path of the base directory on your machine, save, and quit

C.   If a file named "CMakeCache.txt" is in this directory, delete it

D.   Return to the "OCULite" directory and run the following command:

make

4.   Change directory to the "src" directory of the base directory

A.   As of the date of making these instructions, none of the contents of the "aqua_related" directory in the stock workspace are needed; delete them all

B.   Replace the just deleted "aqua_related" directory with the "aqua_related" directory generated when the "aqua_related_march_9_2018.zip" was extracted at the beginning

C.   Depending on Gazebo version, the "aqua_description" and "aqua_gazebo" branches may need to be separately updated via the following instructions:

i.   Change directory to the "aqua_related/aqua_description" directory and run the following command:

hg update gazebo2

ii. Change directory to the "aqua_related/aqua_gazebo" directory and run the following command:

hg update gazebo2

D.   Return to the base directory and run the following command: 

catkin_make

*The above command may need to be run multiple times to resolve some dependency issues. If it runs into an error while compiling, run it a few more times, and the error likely will not persist

5.   Change directory to the "aqua_related/aqua_description/urdf" subdirectory of the "src" directory

A.   Open "aqua.urdf.xacro" to edit

B.   Change all three camera's "box size" values to 0.01 instead of 0 (three values for each of the three cameras)

C.   This change prevents Gazebo from crashing on startup since it apparently doesn't like objects with no size

6.   It is recommended to add the following command to your ".bashrc" file (where $(AQUA_BASE_DIR) is the base directory of the catkin workspace), otherwise the command will have to be run for every terminal window to enable the terminal to access ROS information about the Aqua simulator

source $(AQUA_BASE_DIR)/devel/setup.bash

Starting the Simulator

1.   Open a terminal window and run the following command:

roscore

2.   Open a second terminal window and run the following command:

roslaunch aqualaunch sim_ap_joy.launch

Assuming Direct Control

  • To enable keyboard control, open a new terminal and run the following command:
rosrun aquajoy aqua_key3D
  • To enable joystick control with a ROS-compatible gamepad, open a new terminal and run the following command:
rosrun joy joy_node

Gamepad Controller Tips & Tricks

  • The autopilot mode is determined by holding down one of the following combinations of L1 (left button), L2 (left bumper), and R1 (right button):
    • L1: constant-angle mode
    • L2: constant-depth mode
    • L1+L2: constant-depth-and-angular-rate mode
    • R1: flatswim mode (roll and pitch held at zero)
    • None: default mode
  • Each of the joysticks' directions control different types of motion for Aqua as follows:
    • Left joystick up/down (LY): controls speed/surge (Aqua cannot move backwards
    • Left joystick left/right (LX): controls yaw
    • Right joystick up/down (RY): controls pitch; if R2 (right bumper) is held down, this controls heave (if the current autopilot mode permits it)
    • Right joystick left/right (RX): controls roll

Known Issues

  • No color is displayed in Gazebo on the robot despite the presence of code for implementing material color in Gazebo
  • Water dynamics in this version are better than the previous version but still appear to have issues with rotational inertia
Last updated 7/6/2018