Welcome to the Underwater Drone Simulation project! This README provides a guide to setting up and running an underwater drone simulation using Ubuntu 18.04, ROS Melodic, and Gazebo. This simulation environment allows you to test and develop algorithms for underwater robotics in a virtual setting.
Before setting up the simulation, ensure you have the following prerequisites installed:
- Ubuntu 18.04: The operating system used for this setup.
- ROS Melodic: The Robot Operating System (ROS) version for this project.
- Gazebo: The simulation tool used for creating and running the virtual environment.
-
Setup your sources.list:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources.list.d/ros-latest.list'
-
Setup your keys:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key '421C365BD9FF1F71'
-
Install ROS Melodic:
sudo apt update sudo apt install ros-melodic-desktop-full
-
Initialize rosdep:
sudo rosdep init rosdep update
-
Set up your environment:
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc source ~/.bashrc
-
Install rosinstall:
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
Gazebo is included in the ROS Melodic installation, but you can install the latest version if needed:
-
Install Gazebo:
sudo apt install gazebo9 libgazebo9-dev
-
Install Gazebo ROS packages:
sudo apt install ros-melodic-gazebo-ros ros-melodic-gazebo-ros-pkgs
-
Create a ROS workspace:
mkdir -p ~/catkin_ws/src cd ~/catkin_ws/ catkin_make source devel/setup.bash
-
Clone the underwater drone simulation repository:
cd ~/catkin_ws/src git clone https://github.com/Varchasvin10/Underwater_Drone_Simulation.git
-
Install dependencies: If the simulation package has dependencies, install them using:
cd ~/catkin_ws rosdep install --from-paths src --ignore-src -r -y
-
Build the workspace:
cd ~/catkin_ws catkin_make
-
Source the workspace:
source devel/setup.bash
-
Launch Gazebo with the underwater world:
roslaunch uuv_gazebo_worlds ocean_waves.launch
-
Launch the Drone:
roslaunch uuv_descriptions upload_rexrov.launch mode:=default x:=0 y:=0 z:=-20 namespace:=rexrov
-
Use Teleop Keys with the cascaded PID controller
roslaunch uuv_control_cascaded_pid key_board_velocity.launch model_name:=rexrov
- Gazebo crashes or fails to start: Ensure that all dependencies are correctly installed and the ROS workspace is built. Check for error messages in the terminal for clues.
- Missing ROS packages or libraries: Use
rosdep
to install missing dependencies. - Build issues: Verify that all source files and configurations are correct.
If you would like to contribute to this project, please fork the repository, make your changes, and submit a pull request. Make sure to include relevant documentation and test your changes thoroughly.
Happy simulating!