Coder Social home page Coder Social logo

cwrubotix / rov-23 Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 0.0 228.3 MB

Software for CWRUbotix's 2022-23 MATE ROV

Home Page: https://www.cwrubotix.org/mate_rov.html

License: Apache License 2.0

C++ 8.42% CMake 0.90% Python 88.95% Shell 1.72%
mate-rov python3 ros2-galactic robotics ros

rov-23's Introduction

MATE ROV 2022-23

Build Status Build Status

Setup

First-time setup

Follow this environment setup guide!

Then create a workspace:

If you're using VSCode, access WSL by opening VSCode, pressing ctrl+` (below the esc key), clicking the dropdown arrow on the right and selecting Ubuntu (WSL). You can also view your WSL files by opening File Explorer > Linux (bottom left) > Ubuntu > home > your Ubuntu username.

Run

mkdir -p rov_23_ws/src
cd rov_23_ws/
git clone --recurse-submodules [email protected]:cwruRobotics/rov-23.git src

(the src is important)

If you've never contributed to a git repository before, you might receive an error message saying you don't have access. In that case visit this tutorial to set up SSH for local GitHub access.

If you don't have ros2_video_streamer in the new src folder, run this:

git submodule update --init --recursive

Building for VSCode users

Copy src/.vscode/tasks.json to .vscode/tasks.json:

cp src/.vscode/tasks.json .vscode

Now, anytime you want to build, do the following:

In VSCode, press F1 and enter Tasks: Run Task in the field until you see the corresponding option appear. Click or hit enter on that option.

Now select ๐Ÿƒโ€โ™‚๏ธ ROS All to run all dependency download and building scripts.

This whole process should become F1, Enter, Enter once you've done it once, although the magic of symlink should mean you won't need to build again for most things.

If you're working on package metadata (e.g. package.xml) or interfaces, you'll need to run ๐Ÿƒโ€โ™‚๏ธ ROS Quick Build every time you change something.

Automatic building for non-VSCode heathens

Run this command from your workspace folder

. src/.vscode/easy_all.sh

The magic of symlink should mean you won't need to build again for most things, but if you're working on package metadata (e.g. package.xml) or interfaces, you'll need to run this every time you change something:

. src/.vscode/easy_build.sh

Manual building

Make sure you're updated (only on the first build or if something breaks)

rosdep update --rosdistro=$ROS_DISTRO --include-eol-distros

Install dependecies (only on the first build or if something breaks)

rosdep install --from-paths src --ignore-src -r -y

Build (every time)

colcon build --symlink-install

Source your overlay (every time)

. install/setup.sh

Directory Structure

All packages to be installed on the surface computer live in the surface directory.

All packages to be installed on the pi compute module live in the pi directory.

All packages to be installed on the float live in the float directory.

Documentation Structure

Documentation will take place at 3 levels:

  • High Level - Overarching Design Document outlining our general structure and what goes where.
  • Device Level - ROS Docs as set out in the ROS2 standards.
  • Inline Level - Inline Documentation to the level that someone who has some basic code knowledge can understand what the code does.

rov-23's People

Contributors

benjaminwp18 avatar cwru-rov-laptop avatar dependabot[bot] avatar georgia-martinez avatar invinciblermc avatar kaseyw31 avatar mounjee avatar noahmollerstuen avatar rickyrnt avatar sxj754 avatar tazmania40 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rov-23's Issues

Initial GUI Modules

Create GUI modules for task buttons, log field, backup control buttons, and initial "establish connection" button.
Create all possible ROS connections.

Manipulators

Get PS5 button presses to control I2C IO board.

Autonomous Docking

From the competition manual:

Companies that choose to pilot into the station autonomously are tasked with creating software that
will allow their vehicle to autonomously enter the docking station. Companies will receive 15 points
when they successfully pilot autonomously into the docking station. Successfully piloting autonomously
into the docking station is defined as the ROV positioned completely outside of the docking station, the
company going hands free from the controls, and the ROV moving on its own so that the ROV pushes a
button located on the back of the docking station. The station judge must be able to see the ROV push
the button to receive points.

Gazebo

Get thruster control & camera streaming working for Gazebo simulation. Buoyancy or any other realism features not required.

Seagrass bed operator task

Create a button on the operator GUI which stores and displays the current frame so we can show the judges

"Compare images to determine the recovery of a seagrass bed from an anchor scar"

Update thruster & manipulator controls

Update thruster control mappings to:

  • Match driver preferences (talk to Noah about the scheme we used last year; consider manipulator/ยฟcam switching? controls too)
  • Actually control the correct thrusters (test on ROV)

Cam Display

Display a cam stream in an RQT (PyQt for ROS) plugin. Might need to wait for #12 before setting up stream receiving code.

Decide how to organize:

  • 1 stream per window? Maybe annoying, but very modular
  • Many streams/switch between streams in a window - easier to use? See old GUI:
    Image

ROS Surface-Pi Communication

Set up ROS communication (e.g. pub/sub) between the surface laptop and a Pi. Document the process for other devs.

Coral Head Modeling

SLAM
Depth Cam

From the competition manual:

Companies must measure the dimensions of the coral and create a 3D model of the coral head. The
coral head will be simulated by a colored plastic bowl sitting upside down on a PVC framework at the
bottom of pool. Three squares of diseased tissue, simulated by squares of white tape, will be attached
to the plastic bowl. These areas of tape will be 36 square cm (6 cm x 6 cm), 16 square centimeters (4 cm
x 4 cm), and/or 4 square centimeters (2 cm x 2 cm). Companies choosing to do this task autonomously
must use photogrammetry to create a 3D model of the coral head in a CAD program and display the
proper diameter and height of the coral head, as well as the total area of the diseased tissue.
Companies may maneuver around the coral head to take photos. Companies may transfer any images
from the ROV to a computer or device at the mission station. This transfer does not have to be done
autonomously; it can be accomplished "by hand." Companies are allowed to place an object of known
dimensions (ruler) on or near the coral head to assist in the measurements. Note that this object of
known dimensions would count as debris if it is not under control of the ROV or removed from the pool
by the end of product demonstration time.

Companies will receive up to 30 points for modeling the 3D coral head autonomously. Companies that
successfully model the coral head as a 3D design will receive 15 points. Successfully modeling the coral
head autonomously is defined as the coral head displayed as a 3D design on a screen at the product
demonstration station. All three diseased tissue areas must be included on the image. The image
should be able to be rotated so that the station judge can view it from any angle.

Companies must display the following three dimensions of the coral head on their 3D design: the
diameter of the coral head, the height of the coral head, and the total area of the diseased tissue.
Companies will receive 5 points for successfully displaying each of these three dimensions, 15 points
total. Successfully displaying the diameter and height of the coral head is defined as the diameter and
height measurement included on the model and being within 2 cm of the true length. Note that the
height should be from the bottom of the pool to the topmost point of the coral head. Successfully
displaying the total area of the diseased coral tissue is defined as the total area included on the model
and being within 2 square cm of the actual area of the diseased coral.

Task Selector

Create a background node that requests actions for each task.

Create an RQT plugin with a selector for tasks. Task backlog? Scheduling? Multiple at once?

Vision: Experiment with OpenCV

Display the results of OpenCV filters n' stuff on image files in an RQT plugin.

Attempt live filtering of video files.

Update task selection

Move task selection GUI to operator monitor
Replace dropdown with one set of start/stop buttons for an autonomous docking task, and one label that says what task we're currently on
Update task selection backend stuff so there are exactly two tasks: one manual control task, and one autonomous docking task

Operator GUI

Create second GUI with separate surface_main launch file for operator laptop. Move already created GUI modules & backend stuff to the second launch where appropriate.

Decide whether operator will switch tasks for every task (e.g. taking a picture of the seagrass habitat), or whether they'll have access to general buttons for recording images/videos for later viewing. See the software column of the task list for tasks where we'll do something besides manual control.

Other tickets will be responsible for creating task-specific operator GUI features.

Logging

Discussion required for further implementation of ROSBags

  • The system appears to be "baked into" ROS, and so I think the only required things to get bagging working is to implement a way to bag topics.
    We could bag topics as they're created in the codebase or we could do it in a single file if we feel the need.

I believe there is no further action required at this time.

Xbox Control

Write a node that monitors Xbox controller input in the main RQT window (not just one of our plugins) and then sends the appropriate command velocities down the tether.

See #11.

Leak detection over GPIO

Write a node for the Pi that constantly checks GPIO 26 for a low signal from leak sensor. It should publish on a topic.
A node on the surface should tell us the status on the GUI.
Make it very angry and red when we're leaking.

Shutdown Pi?

GUI beautification & dark mode

Create a dark theme & watermelon theme which can be selected by command line argument on launcher.

Make the GUI a bit prettier/better proportioned; see last year's GUI:
Image

Buoy ropes/frog transect operator task

Create buttons on the operator GUI for storing and displaying a video from the camera streams so we can show the judges

"Inspect the buoy ropes for damage"
"Count the number of frogs in a transect"

Image stream display improvements

  • Make image stream widgets resize dynamically
  • Fix ros2_video_streamer to stream in correct color profile. Right now streamed files need to have their frames converted with this in video_area.py:
     # Rectify weird colors
    cv_img = cv2.cvtColor(cv_img, cv2.COLOR_RGB2RGBA)
    Which is bad because that screws up real camera stream colors.
    Michael's fixing this
  • Look into streaming the binary for cv images directly, rather than using ROS images

Thrusters

Receive a command velocity on the Pi and tell the Pixhawk to make thrusters move.

We have Pixhawk Flight Controller 2.4.5.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.