Skip to content

Commit

Permalink
Merge pull request #14 from osrf/quarkytale/docs
Browse files Browse the repository at this point in the history
Adding tutorials
  • Loading branch information
quarkytale authored Nov 21, 2022
2 parents c25b25c + 5d5f4c9 commit 76d200c
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 1 deletion.
54 changes: 54 additions & 0 deletions docs/docs/Tutorials/Install/Install_apt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
##### Requirements
At the moment, only source installation is supported. Use Ubuntu Focal.

1. Install [ROS 2 Galactic](https://docs.ros.org/en/galactic/index.html)

1. Install [Gazebo Fortress](https://ignitionrobotics.org/docs/fortress)

1. Install necessary tools

```
sudo apt install python3-vcstool python3-colcon-common-extensions python3-pip git wget
```
##### Usage
1. Create a workspace, for example:
```
mkdir -p ~/buoy_ws/src
cd ~/buoy_ws/src
```
1. Clone all source repos with the help of `vcstool`:
```
wget https://raw.githubusercontent.com/osrf/buoy_entrypoint/main/buoy_all.yaml
vcs import < buoy_all.yaml
cd ~/buoy_ws
```
1. Set the Gazebo version to Fortress. This is needed because we're not using an
official ROS + Gazebo combination:
```
export IGNITION_VERSION=fortress
export GZ_VERSION=fortress
```
1. Install ROS dependencies
```
sudo pip3 install -U rosdep
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -r -y -i
```
1. Build and install
```
source /opt/ros/galactic/setup.bash
cd ~/buoy_ws
colcon build
```
44 changes: 44 additions & 0 deletions docs/docs/Tutorials/Install/Install_docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
##### Requirements

1. Install Docker using [installation instructions.](https://docs.docker.com/engine/install/ubuntu/).

1. Install [nvidia-docker](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker).

1. Complete the [Linux Postinstall steps](https://docs.docker.com/engine/install/linux-postinstall/) to allow you to manage Docker as a non-root user.

1. Install `rocker` by `sudo apt-get install python3-rocker`.

##### Usage

1. Clone the buoy_entrypoint repository to download the latest Dockerfile.

```
git clone https://github.com/osrf/buoy_entrypoint.git
cd ~/buoy_entrypoint/docker/
```
1. Build the docker image
```
./build.bash buoy
```
1. Run the container
```
./run.bash [-d|s] buoy:latest
```
where `./run.bash` option:
* -d Use for development with host system volume mount
* -s Simulation purposes only
The development use case enables to either use host system home directory for user's custom workspace, or a fresh clone inside the docker container. If using host system workspace, follow the [On Host System](#on-host-system) instructions to build and run the project in the container.
Regardless the script option, project source files can be found in `/tmp/buoy_ws/' in the container. Note that any changes to files in the container will have limited scope.
1. To have another window running the same docker container, run this command in a new terminal:
```
./join.bash buoy_latest_runtime
```
> The build and run bash scripts are a wrapper around rocker, checkout its [documentation](https://github.com/osrf/rocker) for additional options.
12 changes: 12 additions & 0 deletions docs/docs/Tutorials/Simulation/Simulation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
##### Run

1. Source the workspace

`. ~/buoy_ws/install/setup.sh`

1. Launch the simulation

`ros2 launch buoy_gazebo mbari_wec.launch.py rviz:=True`


![startup](images/Buoy_Gazebo_RViz.png)
2 changes: 1 addition & 1 deletion docs/docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ The system is moored to the seafloor (typically in 80m of water) through a chain
As waves excite the system, a differential motion results between the buoy at the surface and the submerged heave cone.
Resisting this motion results in energy being absorbed by the system, and this energy is converted to electrical form and stored in a battery bank on the buoy. The rest of this section provides details about the various components of the system

![some discription](images/MBARI_WEC_Assembly_12-5-2019-1.png)
![some description](images/MBARI_WEC_Assembly_12-5-2019-1.png)

# Buoy, Heave Cone, and Mooring
The buoy
Expand Down
Binary file added docs/docs/images/Buoy_Gazebo_RViz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 76d200c

Please # to comment.