Skip to content

Commit

Permalink
Merge branch 'ament-mypy' into move-pynput-dep
Browse files Browse the repository at this point in the history
  • Loading branch information
InvincibleRMC committed Jun 29, 2024
2 parents afef279 + 3022f74 commit a478c17
Show file tree
Hide file tree
Showing 145 changed files with 3,038 additions and 1,065 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/linux/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "ROV Linux",
"image": "ghcr.io/cwrurobotics/rov-24:iron",
"image": "ghcr.io/cwrurobotics/rov-25:iron",
"containerEnv": {
"DISPLAY": "${localEnv:DISPLAY}"
},
Expand All @@ -12,7 +12,7 @@
// gitconfig
"type=bind,source=/home/${localEnv:USER}/.gitconfig,target=/home/rov/.gitconfig,readonly"
],
"workspaceFolder": "/home/rov/rov-24",
"workspaceFolder": "/home/rov/rov-25",
"customizations": {
"vscode" : {
"extensions": ["ms-python.flake8", "ms-azuretools.vscode-docker",
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/linux_test_environment/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached",
"type=bind,source=/home/${localEnv:USER}/.gitconfig,target=/home/rov/.gitconfig,readonly"
],
"workspaceFolder": "/home/rov/rov-24",
"workspaceFolder": "/home/rov/rov-25",
"customizations": {
"vscode": {
"extensions": [
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/macos/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name" : "ROV macOS",
"image": "ghcr.io/cwrurobotics/rov-24:iron",
"image": "ghcr.io/cwrurobotics/rov-25:iron",
"containerEnv": {
"DISPLAY": "unix:0"
},
"mounts": [
"type=bind,source=/Users/${localEnv:USER}/.ssh,target=/home/rov/.ssh,readonly",
],
"workspaceFolder": "/home/rov/rov-24",
"workspaceFolder": "/home/rov/rov-25",
"customizations": {
"vscode" : {
"extensions": ["ms-python.flake8", "ms-azuretools.vscode-docker",
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/windows/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name" : "ROV Windows",
"image": "ghcr.io/cwrurobotics/rov-24:iron",
"image": "ghcr.io/cwrurobotics/rov-25:iron",
"containerEnv": {
"DISPLAY": "${localEnv:DISPLAY}"
},
"workspaceFolder": "/home/rov/rov-24",
"workspaceFolder": "/home/rov/rov-25",
"customizations": {
"vscode" : {
"extensions": ["ms-python.flake8", "ms-azuretools.vscode-docker",
Expand Down
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
; Change line length to ros standard for project
max-line-length=100
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/industrial_ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ jobs:
env: # either pass all entries explicitly
# Added back so testing without Dockerfile can be done
ROS_DISTRO: ${{ matrix.ROS_DISTRO }}
DOCKER_IMAGE: ghcr.io/cwrurobotics/rov-24:iron
DOCKER_IMAGE: ghcr.io/cwrurobotics/rov-25:iron
# Done to avoid permssion errors in the ros-industrial ci.
DOCKER_RUN_OPTS: -u root
ROS_REPO: ${{ matrix.ROS_REPO }}
# Install missing libxcb-cursor0 xvfb for PyQt unit testing
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html
ADDITIONAL_DEBS: 'libxcb-cursor0 xvfb'
# Crazy one liner for install python dependencies
AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'pip install --upgrade pip && pip install /root/target_ws/src/rov-24 --user && rm -r /root/target_ws/src/rov-24/build'
# Used for running our CI but don't necessarily want to run others failing unit tests (ej. robot_upstart)
UPSTREAM_WORKSPACE: 'github:clearpathrobotics/robot_upstart#foxy-devel github:InvincibleRMC/ament_pep257#main'
AFTER_INSTALL_TARGET_DEPENDENCIES_EMBED: 'pip install --upgrade pip && pip install /root/target_ws/src/rov-25 --user && rm -r /root/target_ws/src/rov-25/build'
# Used for running our CI but don't necessarily want to run others failing unit tests (ej. ament_pep257)
UPSTREAM_WORKSPACE: 'github:InvincibleRMC/ament_pep257#main'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ eeprom.bin

# Mac Files @Georgia
*.DS_Store

# Mavproxy Files
*.parm
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
[submodule "src/surface/ros2_video_streamer"]
path = src/surface/ros2_video_streamer
url = git@github.com:cwruRobotics/ros2_video_streamer.git
[submodule "src/pi/robot_upstart"]
path = src/pi/robot_upstart
url = git@github.com:clearpathrobotics/robot_upstart.git
branch = foxy-devel
[submodule "src/util/ament_pep257"]
path = src/util/ament_pep257
url = git@github.com:InvincibleRMC/ament_pep257.git
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
{
"label": "Docker Pull",
"type": "shell",
"command": "sudo docker pull ghcr.io/cwrurobotics/rov-24:iron",
"command": "sudo docker pull ghcr.io/cwrurobotics/rov-25:iron",
"windows": {
"command": "docker pull ghcr.io/cwrurobotics/rov-24:iron"
"command": "docker pull ghcr.io/cwrurobotics/rov-25:iron"
},
"hide": true
},
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ RUN ./ardupilot_gazebo.sh \
# Update Pip
RUN pip install --no-cache-dir --upgrade pip==24.0

WORKDIR /home/${USER_NAME}/rov-24
WORKDIR /home/${USER_NAME}/rov-25

# One might wonder why the following is done.
# It is done so that the dependencies can be cached without needing to be reinstalled
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MATE ROV 2023-24

<a href="https://github.com/cwruRobotics/rov-24/actions"><img src="https://github.com/cwruRobotics/rov-24/workflows/Continuous Integration/badge.svg" alt="Build Status"></a>
[![Continuous Integration](https://github.com/cwruRobotics/rov-25/actions/workflows/industrial_ci_action.yml/badge.svg)](https://github.com/cwruRobotics/rov-25/actions/workflows/industrial_ci_action.yml)
<a href=" https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="Apache License"></a>

# Table of Contents
Expand All @@ -24,7 +24,7 @@
Start by opening up a terminal and navigating to where you want the code to be saved and entering the following command.

```bash
git clone --recurse-submodules git@github.com:cwruRobotics/rov-24.git
git clone --recurse-submodules git@github.com:cwruRobotics/rov-25.git
```

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](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh) to set up SSH for local GitHub access.
Expand All @@ -47,7 +47,7 @@ To open the container use `F1` or `ctrl+shift+p` to open the command bar and use

For gui apps run `xhost + local:docker` before launching docker or add to `.bashrc`.

To reopen after a build Go to File > Open Recent /stuff/rov-24 \[Dev Container]
To reopen after a build Go to File > Open Recent /stuff/rov-25 \[Dev Container]

#### Bare Metal

Expand Down Expand Up @@ -79,13 +79,13 @@ Then open up Command Prompt and type `ipconfig`.

Then in the terminal of the docker container use `export DISPLAY={IPV4 of WSL}:0.0` where the IPV4 is from the `ipconfig` command.

To reopen after a build Go to File > Open Recent /stuff/rov-24 \[Dev Container]
To reopen after a build Go to File > Open Recent /stuff/rov-25 \[Dev Container]

#### WSL

Follow [this](https://learn.microsoft.com/en-us/windows/wsl/install) guide to install WSL.

After WSL has been installed follow [this](https://code.visualstudio.com/docs/remote/wsl) guide to get VSCode and WSL to properly communicate and navigate to the rov-24 folder.
After WSL has been installed follow [this](https://code.visualstudio.com/docs/remote/wsl) guide to get VSCode and WSL to properly communicate and navigate to the rov-25 folder.

Then run the install script.

Expand Down Expand Up @@ -120,7 +120,7 @@ Make the settings look like this:

To open the container use `F1` or `ctrl+shift+p` to open the command bar and use `Tasks: Runs Task`. Then from the Task selection choose `Docker Rebuild`. This will build and run the docker container. Make sure to choose `ROV macOS` for which type to run.

To reopen after a build Go to File > Open Recent /stuff/rov-24 \[Dev Container]
To reopen after a build Go to File > Open Recent /stuff/rov-25 \[Dev Container]

<!-- https://gist.github.com/cschiewek/246a244ba23da8b9f0e7b11a68bf3285 -->

Expand Down
16 changes: 9 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
[project]
name = "rov-24"
name = "rov-25"
# I know Ben hates this but this required lol
version = "1.1.0"
version = "1.2.0"

dependencies = [
'setuptools',
'flake8==7.0.0',
'flake8==7.1.0',
'mypy >= 1.7',
'pyqt6',
'pyqtgraph',
'pyqtdarktheme',
'opencv-python>=4.8.1',
'numpy>=1.26',
'numpy < 2.0.0',
'pytest-qt',
'pytest-xvfb',
'Pyside2', # can be removed when ament_pep257 is gone
'serial',
'TCA9555@git+https://github.com/InvincibleRMC/TCA9555'
'TCA9555@git+https://github.com/InvincibleRMC/TCA9555',
'bluerobotics-tsys01@git+https://github.com/bluerobotics/tsys01-python',
'pymavlink',
'mavproxy'
]

[tool]
Expand Down
31 changes: 31 additions & 0 deletions src/float/.clang-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# Start based off ament_clang_formats .yaml
Language: Cpp
BasedOnStyle: Google

IndentPPDirectives: BeforeHash

AlignConsecutiveMacros: true
AlignArrayOfStructures: Left
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true

AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
BraceWrapping:
AfterClass: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterEnum: false
BeforeElse: true
BeforeCatch: true
BeforeWhile: true
BreakBeforeBraces: Custom
ColumnLimit: 100
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 2
DerivePointerAlignment: false
PointerAlignment: Left
ReflowComments: false
...
9 changes: 9 additions & 0 deletions src/float/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Transceiver Arduino Sketches

These sketches must include files from `include/`, but that's impossible with the Arduino IDE. We hardlink the each file in `include/` manually.

If you add more files to `include/`, do something like this to hardlink them:

```bash
source remake_links.sh
```
File renamed without changes.
Loading

0 comments on commit a478c17

Please sign in to comment.