generated from Robotic-Decision-Making-Lab/ros-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified dockerfile and added "docking_control" ROS noetic pkg
- Loading branch information
Showing
69 changed files
with
5,416 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
!requirements-dev.txt | ||
|
||
# Allow your ROS packages here, e.g.: | ||
!example_pkg | ||
!bluerov2_docking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,9 @@ | |
devel | ||
install | ||
log | ||
|
||
*.tar.gz | ||
*.png | ||
*.pyc | ||
*.bag | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,126 @@ | ||
# ROS Project Template | ||
# docking_control | ||
|
||
Setting up a new ROS project often requires a significant amount of | ||
preparation and boilerplate configuration, costing you valuable robot | ||
development time 🤖. Recognizing this, we have put together this template | ||
repository configured with a ROS development environment, continuous | ||
integration, and more. This project is the result of much trial and error | ||
across many projects, and we hope that this helps you save some effort in | ||
setting up your own projects. | ||
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. | ||
|
||
## Features | ||
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). | ||
|
||
The main features of this template are: | ||
## Getting Started | ||
|
||
- A development environment for Visual Studio Code including a [development container](https://code.visualstudio.com/docs/devcontainers/containers) | ||
and configurations for linting and auto-formatting your code | ||
- Docker images that support deployment to a variety of systems (e.g., arm64 | ||
systems) | ||
- Continuous integration and deployment pipelines using GitHub Actions | ||
- GitHub Issue and Pull Request templates | ||
### Requirements | ||
|
||
## Quick start | ||
- [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) | ||
|
||
Using this template is as easy as 1, 2, 3... | ||
### Installation | ||
|
||
1. Use this repository [as a template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) | ||
for your project | ||
2. Replace all instances of "ros-template" with your own project's name and all | ||
instances of "robotic-decision-making-lab" with your own user's name | ||
3. Replace the source code with your own project! | ||
#### Installing ROS: *Ubuntu 20.04* (See [ROS wiki](http://wiki.ros.org/ROS/Installation) for other OS) | ||
|
||
Feel free to remove any unused configurations/pipelines and to adjust things as | ||
you see fit for your project! | ||
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` | ||
|
||
## Getting help | ||
#### Building a Catkin Workspace | ||
|
||
If you have questions regarding usage of this project or would like to | ||
contribute, please ask a question on our [Discussions](https://github.com/Robotic-Decision-Making-Lab/ros-template/discussions) | ||
board! | ||
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` | ||
|
||
## Usage | ||
|
||
- Before proceeding further, make sure that all the steps mentioned in the guide for [Software Setup](https://bluerobotics.com/learn/bluerov2-software-setup | ||
) has been followed. | ||
- From a terminal, run `roslaunch bluerov2_dock mission_control.launch` | ||
- If the terminal initially outputs *Controller error:'joy'*, move the sticks to clear the error. | ||
- Press button "A" on the joystick to enable autonomous docking mode. | ||
- To switch back to manual mode, move either of the sticks in any direction. |
Oops, something went wrong.