mbari_wec

Entrypoint to wave harvesting buoy

https://github.com/osrf/mbari_wec

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.1%) to scientific vocabulary

Keywords

gazebo maritime ros simulation wave-energy
Last synced: 7 months ago · JSON representation ·

Repository

Entrypoint to wave harvesting buoy

Basic Info
Statistics
  • Stars: 24
  • Watchers: 8
  • Forks: 7
  • Open Issues: 4
  • Releases: 6
Topics
gazebo maritime ros simulation wave-energy
Created almost 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Citation

README.md

This is the entrypoint for the wave energy harvesting buoy project.

See documentation here.

And MBARI-WEC in action using Gazebo simulator here:

Simulation Repositories

These are the repositories for the project:

  • mbariwecutils: ROS 2 messages, interface API, and examples for receiving and sending data to a physical or simulated buoy.
    • buoy_interfaces: ROS 2 messages to recieve and send data to a physical or simulated buoy
    • buoyapicpp: C++ Interface to MBARI Power Buoy including Controller examples to run against a physical or simulated buoy.
    • buoyapipy: Python Interface to MBARI Power Buoy including Controller examples to run against a physical or simulated buoy.
  • mbariwecgz

Interfaces and Examples

There are two GitHub template repositories set up (cpp/python) for a quick start on writing a custom controller utilizing buoyapicpp and buoyapipy. Please see cpp examples and python examples for example controller implementations.

Install

On Host System

Requirements

At the moment, MBARI WEC is supported by source installation only. Use Ubuntu Jammy (22.04).

  1. Install ROS 2 Humble (preferably binary installation)

    MBARI WEC is tested against cyclonedds rmw implementation (default changed from Galactic to Humble) sudo apt install -y ros-humble-rmw-cyclonedds-cpp export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

  2. Install Gazebo Garden (preferably binary installation)

    Installing the binaries for Gazebo is recommended, but if building Gazebo Garden from source, it is necessary to export the PYTHONPATH for gz-math python bindings when building the mbariwecgz repository below: export PYTHONPATH=$PYTHONPATH:<path to your gz-sim workspace>/install/lib/python

    See gz-math Python Get Started tutorial. This step is needed until PYTHONPATH is automatically exported upstream, tracked in this issue

  3. Install necessary tools

    sudo apt install python3-vcstool python3-colcon-common-extensions python3-pip git wget

  4. Install necessary libraries curl -s --compressed "https://hamilton8415.github.io/ppa/KEY.gpg" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/ppa.gpg >/dev/null sudo curl -s --compressed -o /etc/apt/sources.list.d/my_list_file.list "https://hamilton8415.github.io/ppa/my_list_file.list" sudo apt update sudo apt install libfshydrodynamics=1.3.1

Build

  1. Create a workspace, for example:

    mkdir -p ~/mbari_wec_ws/src cd ~/mbari_wec_ws/src

  2. Clone all source repos with the help of vcstool:

    wget https://raw.githubusercontent.com/osrf/mbari_wec/main/mbari_wec_all.yaml vcs import < mbari_wec_all.yaml cd ~/mbari_wec_ws

  3. Set the Gazebo version to Garden. This is needed because we're not using an official ROS + Gazebo combination:

    export GZ_VERSION=garden

  4. Install ROS dependencies

    sudo pip3 install -U rosdep sudo rosdep init rosdep update rosdep install --from-paths src --ignore-src -r -y -i

  5. Build and install

    source /opt/ros/humble/setup.bash cd ~/mbari_wec_ws colcon build

Using Docker

Requirements

  1. Install Docker using installation instructions.

  2. Complete the Linux Postinstall steps to allow you to manage Docker as a non-root user.

  3. If you have an NVIDIA graphics card, it can help speed up rendering. Install nvidia-container-toolkit.

    1. Follow Installation steps for Ubuntu (currently 3 steps)
    2. Skip down to Configuration and run nvidia-ctk to set up the nvidia container runtime

Use Existing Image on DockerHub

MBARI maintains Docker images for the two most recent releases on their DockerHub: - mbari/mbari_wec:latest - mbari/mbari_wec:previous

  1. Get run.bash script.

git clone -b main https://github.com/osrf/mbari_wec.git cd ~/mbari_wec/docker/ Or wget https://raw.githubusercontent.com/osrf/mbari_wec/main/docker/run.bash chmod +x run.bash

  1. Run the container

If you have an NVIDIA graphics card ./run.bash mbari/mbari_wec:latest Otherwise ./run.bash mbari/mbari_wec:latest --no-nvidia

Build from Dockerfile

An alternative to using the images from MBARI's DockerHub would be to build from a Dockerfile. This is convenient if you would like to make any changes.

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

git clone -b main https://github.com/osrf/mbari_wec.git cd ~/mbari_wec/docker/

  1. Build the docker image

If you have an NVIDIA graphics card ./build.bash nvidia_opengl_ubuntu24 ./build.bash mbari_wec Otherwise ./build.bash mbari_wec --no-nvidia

  1. Run the container

If you have an NVIDIA graphics card ./run.bash mbari_wec_nvidia Otherwise ./run.bash mbari_wec_no_nvidia --no-nvidia

  1. To have another window running the same docker container, run this command in a new terminal:

./join.bash <name of image> where the name of the image is one of mbari_wec_nvidia or mbari_wec_no_nvidia

Quick start

Quick start scripts are provided in the home directory:

This sources the compiled workspace: . setup.bash

This sources the compiled workspace and launches the simulation: ./run_simulation.bash

Logs from the run will be saved to /logs in the container which is mapped to ~/mbari_wec/docker/logs on the host. These logs will be in the same CSV format as generated by the physical buoy. You may also collect rosbags in the /logs folder in the container. The rosbags collected in the sim will also be the same ROS 2 messages collected on the physical buoy.

Run

  1. In a new terminal (whether on host machine or in Docker container), source the workspace

. ~/mbari_wec_ws/install/setup.bash

  1. Set SDF_PATH to allow robot_state_publisher to parse the robot description from the sdformat model:

export SDF_PATH=$GZ_SIM_RESOURCE_PATH

  1. Launch the simulation

ros2 launch buoy_gazebo mbari_wec.launch.py

For maintainers only: To upload to DockerHub

Make sure you have permissions to push to the MBARI organization on DockerHub. This permission is given by the MBARI administrator.

Build the mbari_wec Docker image, as detailed above.

Find the image ID for mbari_wec: docker images

Tag the image with the destination name: docker tag <IMAGE ID> mbari/mbari_wec:latest

Push to the mbari/mbari_wec public image. docker push mbari/mbari_wec:latest

You may have to log in for it to recognize your permissions: docker login

Publications

Dizon, Chris, Ryan Coe, Andrew Hamilton, Dominic Forbush, Michael Anderson, Ted Brekken, and Giorgio Bacelli. 2024. "Analysis on Evaluations of Monterey Bay Aquarium Research Institute’s Wave Energy Converter’s Field Data Using WEC-Sim and Gazebo: A Simulation Tool Comparison" Applied Sciences 14, no. 23: 11169. https://doi.org/10.3390/app142311169

Owner

  • Name: Open Robotics
  • Login: osrf
  • Kind: organization
  • Email: info@openrobotics.org
  • Location: Mountain View, CA

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Hamilton"
  given-names: "Andrew"
- family-names: "Anderson"
  given-names: "Michael"
- family-names: "Poubel"
  given-names: "Louise"
- family-names: "Dutia"
  given-names: "Dharini"
- family-names: "Carroll"
  given-names: "Michael"
- family-names: "Zhang"
  given-names: "Mabel"
- family-names: "McEwen"
  given-names: "Rob"
- family-names: "Mayans"
  given-names: "Joan"
title: "MBARI Wave Energy Conversion Simulation"
version: 1.0.0
date-released: 2023-05-01
url: "https://github.com/osrf/mbari_wec"

GitHub Events

Total
  • Create event: 14
  • Issues event: 1
  • Release event: 2
  • Watch event: 5
  • Delete event: 8
  • Issue comment event: 22
  • Push event: 369
  • Pull request review event: 2
  • Pull request event: 19
Last Year
  • Create event: 14
  • Issues event: 1
  • Release event: 2
  • Watch event: 5
  • Delete event: 8
  • Issue comment event: 22
  • Push event: 369
  • Pull request review event: 2
  • Pull request event: 19

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 85
  • Total Committers: 7
  • Avg Commits per committer: 12.143
  • Development Distribution Score (DDS): 0.659
Past Year
  • Commits: 9
  • Committers: 2
  • Avg Commits per committer: 4.5
  • Development Distribution Score (DDS): 0.111
Top Committers
Name Email Commits
andermi a****n@m****g 29
Andrew Hamilton h****n@m****g 19
Mabel Zhang m****l@o****g 11
Dharini Dutia d****i@o****g 11
Rob McEwen r****b@m****g 6
Michael Carroll m****l@o****g 5
Louise Poubel l****e@o****g 4
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 12
  • Total pull requests: 82
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 6
  • Total pull request authors: 7
  • Average comments per issue: 1.75
  • Average comments per pull request: 2.13
  • Merged pull requests: 66
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 23
  • Average time to close issues: N/A
  • Average time to close pull requests: 6 days
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.35
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mabelzhang (5)
  • andermi (3)
  • t-osu (1)
  • quarkytale (1)
  • chapulina (1)
  • ghk-ap (1)
Pull Request Authors
  • andermi (53)
  • quarkytale (11)
  • mabelzhang (6)
  • mjcarroll (5)
  • hamilton8415 (5)
  • robertmcewen (3)
  • chapulina (3)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/deploy_main.yaml actions
  • JamesIves/github-pages-deploy-action v4 composite
  • actions/checkout v3 composite
  • actions/configure-pages v2 composite
  • actions/setup-python v4 composite
.github/workflows/deploy_preview.yaml actions
  • actions/checkout v3 composite
  • actions/configure-pages v2 composite
  • actions/setup-python v4 composite
  • rossjrw/pr-preview-action v1 composite
docs/requirements.txt pypi
  • mkdocs *
  • python-markdown-math *
docker/mbari_wec/Dockerfile docker
  • ${base} latest build
docker/nvidia_opengl_ubuntu22/Dockerfile docker
  • ubuntu jammy build