Skip to content

Commit

Permalink
Updated dockerfile and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshv24 committed Jun 10, 2024
1 parent 9dc9ed9 commit 8b3764c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 112 deletions.
1 change: 1 addition & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUN apt-get -q update \
nano \
vim \
apt-utils \
wget \
software-properties-common \
&& apt-get autoremove -y \
&& apt-get clean -y \
Expand Down
114 changes: 2 additions & 112 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,120 +1,10 @@
# docking_control
# Autonomous Underwater Docking using MPC

This package was developed to control a BlueROV2 to perform autonomous underwater docking. This package utilizes Model Predictive Control (MPC) to achieve optimal control of the vehicle.

This repository is a modified version of the [bluerov_ros_playground](https://github.com/patrickelectric/bluerov_ros_playground) repo authored by [patrickelectric](https://github.com/patrickelectric).

## Getting Started

### Requirements

- [Python](https://www.python.org/downloads/) 3.6 or newer
- [Numpy](https://pypi.org/project/numpy/)
- [OpenCV](https://pypi.org/project/opencv-python/)
- [PyYAML](https://pypi.org/project/PyYAML/)
- [Gi & Gobject](https://wiki.ubuntu.com/Novacut/GStreamer1.0)
- [CasADi](https://pypi.org/project/casadi/)
- [acados](https://docs.acados.org/index.html)
- [Pandas](https://pypi.org/project/pandas/)
- [ROS](http://wiki.ros.org/ROS/Installation)
- kinetic or newer
- Geographlib
- [imutils](https://github.com/PyImageSearch/imutils)
- [MAVROS](http://wiki.ros.org/mavros)

### Installation

#### Installing ROS: *Ubuntu 20.04* (See [ROS wiki](http://wiki.ros.org/ROS/Installation) for other OS)

1. Set up sources.list
- `sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'`
2. Set up keys
- `sudo apt install curl`
- `curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -`
3. Installation
- `sudo apt update`
- Pick how much ROS you want to install: must be either Desktop or Desktop-Full
- ROS Desktop (includes rqt and rviz)
- `sudo apt install ros-noetic-desktop`
- Desktop-Full (includes Desktop and 2D/3D simulators)
- `sudo apt install ros-noetic-desktop-full`
4. Set up environment
- You must source this script in every bash terminal you use ROS in
- `source /opt/ros/noetic/setup.bash`
- To automatically source this script every time a new shell is launched, run
- `echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc`
- `source ~/.bashrc`
- Check that *source /opt/ros/noetic/setup.bash* has been added to the end of .bashrc
5. Install dependencies for building packages
- `sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential`
6. Initialize rosdep
- `sudo apt install python3-rosdep`
- `sudo rosdep init`
- `rosdep update`

#### Building a Catkin Workspace

1. Create and build workspace
- `mkdir -p ~/catkin_ws/src`
- `cd ~/catkin_ws/`
- `catkin_make`
- This will create a workspace with 'build', 'devel', and 'src' folders and a *CMakeLists.txt* in 'src'
2. Source
- `source devel/setup.bash`
- To automatically source this script every time a new shell is launched, run
- `echo "source /home/<username>/catkin_ws/devel/setup.bash" >> ~/.bashrc`
- `source ~/.bashrc`
- Check that *source /home/< username>/catkin_ws/devel/setup.bash* has been added to the end of .bashrc
3. Make sure the ROS_PACKAGE_PATH includes the directory
- `echo $ROS_PACKAGE_PATH`
/home/youruser/catkin_ws/src:/opt/ros/noetic/share

#### Installing CasADi

`pip install casadi`

#### Installing acados

Please follow the instructions provided in the following two links:

- [Source Installation](https://docs.acados.org/installation/index.html)
- [Python Interface](https://docs.acados.org/python_interface/)

#### Installing MAVROS

`sudo apt-get install ros-noetic-mavros ros-noetic-mavros-extras`

#### Installing Geographlib

`sudo /opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh`

#### Installing imutils

`pip install imutils`

#### Installing Pandas

`pip install pandas`

#### Installing OpenCV

1. Make sure python-opencv is not installed
- `pip uninstall opencv-python`
2. Install opencv-contrib-python
- `pip install opencv-contrib-python`

#### Cloning Project

1. Go to your ROS package source directory:
- `cd catkin_ws/src`
2. Clone this project
- `git clone https://github.com/rakeshv24/bluerov2_dock`
3. Go back to your workspace:
- `cd ../`
4. Build and install the project:
- `catkin_make --pkg bluerov2_dock`
5. Reload your ROS env.
- `source devel/setup.sh`
TODO: Add instructions here

## Usage

Expand Down

0 comments on commit 8b3764c

Please sign in to comment.