Skip to content

Implemented initial version of DVL API (backport #1) #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a8f50b0
Added reports
evan-palmer Aug 28, 2024
8d687a9
Cleaned up dockerfile
evan-palmer Aug 28, 2024
58db27f
Fixed dockerignore
evan-palmer Aug 28, 2024
5c382eb
started driver implementation
evan-palmer Aug 28, 2024
1a08934
Implemented commands and async response
evan-palmer Aug 29, 2024
80fa2ac
Added data parsing and started json type support
evan-palmer Aug 31, 2024
c99b5d8
Finished initial implementation of driver and renamed to libwaterlinked
evan-palmer Aug 31, 2024
1b8dc21
Build docker image
evan-palmer Aug 31, 2024
5f1d91f
Started resolving bugs and adding json tests.. also added moms lasagn…
evan-palmer Sep 1, 2024
299bbf6
Finished examples and test cases
evan-palmer Sep 1, 2024
8da08cb
Ran pre-commit
evan-palmer Sep 1, 2024
623efd3
Added readme
evan-palmer Sep 1, 2024
bd9963c
Cleaned up the readme a bit
evan-palmer Sep 1, 2024
c4e5529
dont recreate reports at each callback
evan-palmer Sep 1, 2024
f7ff445
Started ros2 driver
evan-palmer Sep 2, 2024
08d917b
Remove colcon build temporarily for docker
evan-palmer Sep 2, 2024
37752f3
why tf does colcon not support fetchcontent
evan-palmer Sep 2, 2024
754a144
Finished ros api
evan-palmer Sep 4, 2024
b7562a7
Fixed driver build and started adding connection timeout
evan-palmer Sep 4, 2024
ce3be98
Finished connection timeout implementation and renamed packages
evan-palmer Sep 4, 2024
89b2b8f
Updates to dockerignore
evan-palmer Sep 4, 2024
59a983a
testing
evan-palmer Sep 4, 2024
4098554
Fixed install
evan-palmer Sep 5, 2024
5858e1e
Fixed README
evan-palmer Sep 5, 2024
71835e3
Cleaned up driver package
evan-palmer Sep 5, 2024
4d3cdd8
Fix for ci rosdeps
evan-palmer Sep 5, 2024
9e690c6
Removed develop from docker cd triggers
evan-palmer Sep 5, 2024
6a14605
Push image
evan-palmer Sep 6, 2024
c509234
Resolved bug in json parsing
evan-palmer Sep 6, 2024
55e15ed
Added additional log and updated default configs
evan-palmer Sep 6, 2024
0369b38
fix for ci
evan-palmer Sep 7, 2024
a8df4a4
Updated readme to reference networking docs
evan-palmer Sep 7, 2024
6eeec0e
updated readme
evan-palmer Sep 7, 2024
0bcc1c7
Fixed linked and settings file
evan-palmer Sep 7, 2024
94814d5
Added support for loading as a component
evan-palmer Sep 7, 2024
1b63e31
Fixed ci workflow and bumped minimum cmake version
evan-palmer Sep 7, 2024
16d9955
Fixed ci error
evan-palmer Sep 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ AlignAfterOpenBracket: AlwaysBreak
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 2
DerivePointerAlignment: false
AllowAllParametersOfDeclarationOnNextLine: false
PointerAlignment: Middle
PackConstructorInitializers: Never
BinPackArguments: false
BinPackParameters: false

# Configure brace wrapping cases
BreakBeforeBraces: Custom
Expand Down
2 changes: 0 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ Checks: >
-google-readability-namespace-comments,
-google-runtime-references,
-misc-non-private-member-variables-in-classes,
-modernize-return-braced-init-list,
-modernize-use-trailing-return-type,
-readability-braces-around-statements,
-readability-identifier-length,
-readability-magic-numbers,
Expand Down
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[codespell]
# Uncomment and populate the following so that codespell ignores the specified words/files
# skip =
# ignore-words-list =
ignore-words-list = fom
8 changes: 8 additions & 0 deletions .devcontainer/nouveau/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<<<<<<< HEAD
<<<<<<< HEAD
FROM ghcr.io/robotic-decision-making-lab/ros2-template:iron-desktop
=======
FROM ghcr.io/robotic-decision-making-lab/libwaterlinked:rolling-desktop
>>>>>>> cc84fbc (Finished initial implementation of driver and renamed to libwaterlinked)
=======
FROM ghcr.io/robotic-decision-making-lab/waterlinked_dvl:rolling-desktop
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)

# Install ROS dependencies
# This is done in a previous stage, but we include it again here in case anyone wants to
Expand Down
11 changes: 11 additions & 0 deletions .devcontainer/nouveau/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@
"name": "ROS 2 Dev Container",
"dockerFile": "Dockerfile",
"context": "../..",
<<<<<<< HEAD
<<<<<<< HEAD
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ros/ws_ros/src/ros2-template,type=bind",
"workspaceFolder": "/home/ros/ws_ros/src/ros2-template",
"remoteUser": "ros",
=======
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_ros/src/libwaterlinked,type=bind",
"workspaceFolder": "/home/ubuntu/ws_ros/src/libwaterlinked",
=======
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_ros/src/waterlinked_dvl,type=bind",
"workspaceFolder": "/home/ubuntu/ws_ros/src/waterlinked_dvl",
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)
"remoteUser": "ubuntu",
>>>>>>> cc84fbc (Finished initial implementation of driver and renamed to libwaterlinked)
"runArgs": [
"--network=host",
"--cap-add=SYS_PTRACE",
Expand Down
8 changes: 8 additions & 0 deletions .devcontainer/nvidia/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<<<<<<< HEAD
<<<<<<< HEAD
FROM ghcr.io/robotic-decision-making-lab/ros2-template:iron-desktop-nvidia
=======
FROM ghcr.io/robotic-decision-making-lab/libwaterlinked:rolling-desktop-nvidia
>>>>>>> cc84fbc (Finished initial implementation of driver and renamed to libwaterlinked)
=======
FROM ghcr.io/robotic-decision-making-lab/waterlinked_dvl:rolling-desktop-nvidia
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)

# Install ROS dependencies
# This is done in a previous stage, but we include it again here in case anyone wants to
Expand Down
11 changes: 11 additions & 0 deletions .devcontainer/nvidia/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@
"name": "ROS 2 NVIDIA Dev Container",
"dockerFile": "Dockerfile",
"context": "../..",
<<<<<<< HEAD
<<<<<<< HEAD
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ros/ws_ros/src/ros2-template,type=bind",
"workspaceFolder": "/home/ros/ws_ros/src/ros2-template",
"remoteUser": "ros",
=======
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_ros/src/libwaterlinked,type=bind",
"workspaceFolder": "/home/ubuntu/ws_ros/src/libwaterlinked",
=======
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_ros/src/waterlinked_dvl,type=bind",
"workspaceFolder": "/home/ubuntu/ws_ros/src/waterlinked_dvl",
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)
"remoteUser": "ubuntu",
>>>>>>> cc84fbc (Finished initial implementation of driver and renamed to libwaterlinked)
"runArgs": [
"--network=host",
"--cap-add=SYS_PTRACE",
Expand Down
65 changes: 59 additions & 6 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
<<<<<<< HEAD
ARG ROS_DISTRO=iron
FROM ros:$ROS_DISTRO-ros-base as ci
=======
ARG ROS_DISTRO=rolling
<<<<<<< HEAD
FROM ros:$ROS_DISTRO-ros-base AS ci
>>>>>>> db1fbdb (Cleaned up dockerfile)
=======
FROM ros:$ROS_DISTRO-ros-base AS desktop
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)

ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /root/ws_ros

<<<<<<< HEAD
# Update to be your project's name
<<<<<<< HEAD
ENV PROJECT_NAME=ros2-template
=======
ENV PROJECT_NAME=libwaterlinked
>>>>>>> cc84fbc (Finished initial implementation of driver and renamed to libwaterlinked)
=======
ENV PROJECT_NAME=waterlinked_dvl
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)

COPY . src/$PROJECT_NAME

Expand All @@ -27,6 +44,7 @@ RUN apt-get -q update \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

<<<<<<< HEAD
# Install all ROS dependencies needed for CI
RUN apt-get -q update \
&& apt-get -q -y upgrade \
Expand All @@ -37,9 +55,12 @@ RUN apt-get -q update \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

FROM ci as robot
FROM ci AS desktop

# Configure a new non-root user
=======
# Configure the ubuntu non-root user
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)
ARG USERNAME=ubuntu
ARG USER_UID=1000
ARG USER_GID=$USER_UID
Expand All @@ -61,30 +82,59 @@ WORKDIR $USER_WORKSPACE

COPY --chown=$USER_UID:$USER_GID . src/$PROJECT_NAME

<<<<<<< HEAD
# Uncomment to download and install external repos used by the project
# RUN vcs import src < src/$PROJECT_NAME/ros2.repos
RUN vcs import src < src/$PROJECT_NAME/ros2.repos
=======
# Create a new virtual environment for Python
ENV VIRTUAL_ENV=$USER_WORKSPACE/.venv/$PROJECT_NAME
RUN python3 -m venv --system-site-packages $VIRTUAL_ENV \
&& echo "source ${VIRTUAL_ENV}/bin/activate" >> /home/$USERNAME/.bashrc \
&& touch .venv/COLCON_IGNORE \
&& echo "\n# Ensure colcon is run in the venv\nalias colcon='python3 -m colcon'" >> /home/$USERNAME/.bashrc
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
>>>>>>> 7ce605e (testing)

# Install all ROS dependencies
RUN vcs import src < src/$PROJECT_NAME/ros2.repos
WORKDIR $USER_WORKSPACE
<<<<<<< HEAD
<<<<<<< HEAD
RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
&& rosdep update \
&& rosdep install -y --from-paths src --ignore-src -r --rosdistro ${ROS_DISTRO} \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*
=======
# Skip for now while i fix
# RUN sudo apt-get -q update \
# && sudo apt-get -q -y upgrade \
# && rosdep update \
# && rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} \
# && sudo apt-get autoremove -y \
# && sudo apt-get clean -y \
# && sudo rm -rf /var/lib/apt/lists/*
>>>>>>> 7ce605e (testing)
=======
RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
&& rosdep update \
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys nlohmann_json \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*
>>>>>>> f765049 (Fixed install)

RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
&& colcon build \
&& echo "source ${USER_WORKSPACE}/install/setup.bash" >> /home/$USERNAME/.bashrc \
&& echo "if [ -f /opt/ros/${ROS_DISTRO}/setup.bash ]; then source /opt/ros/${ROS_DISTRO}/setup.bash; fi" >> /home/$USERNAME/.bashrc

FROM robot as desktop

ENV DEBIAN_FRONTEND=noninteractive
ENV USER_WORKSPACE=/home/$USERNAME/ws_ros
WORKDIR $USER_WORKSPACE

<<<<<<< HEAD
# Install tools needed for Gazebo installation
RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
Expand Down Expand Up @@ -113,6 +163,9 @@ RUN sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrin
&& sudo rm -rf /var/lib/apt/lists/*

FROM desktop as desktop-nvidia
=======
FROM desktop AS desktop-nvidia
>>>>>>> db1fbdb (Cleaned up dockerfile)

# Install NVIDIA software
RUN sudo apt-get update \
Expand Down
7 changes: 3 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
*

# Except the following
!requirements-dev.txt

# Allow your ROS 2 packages here, e.g.:
!example_pkg
!ros2.repos
!waterlinked_dvl_driver
!libwaterlinked
45 changes: 37 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
name: Continuous Integration
name: Continuous Integration (CI)

on:
pull_request:
push:
branches:
<<<<<<< HEAD
<<<<<<< HEAD
- iron
pull_request:
=======
- ros2
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)
=======
- main
>>>>>>> 1c5df60 (Fixed ci workflow and bumped minimum cmake version)
workflow_dispatch:

env:
CLANG_TIDY: true

jobs:
test:
name: Test Implementation
runs-on: ubuntu-latest

pre-commit:
name: CI
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
env:
<<<<<<< HEAD
- IMAGE: iron-ci
ROS_DISTRO: iron
steps:
Expand All @@ -33,12 +39,35 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
=======
- ROS_DISTRO: rolling
steps:
- name: Checkout repository
uses: actions/checkout@v4
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)

- name: Run ROS Industrial CI
uses: ros-industrial/industrial_ci@master
env:
<<<<<<< HEAD
<<<<<<< HEAD
DOCKER_IMAGE: ghcr.io/robotic-decision-making-lab/ros2-template:${{ matrix.env.IMAGE }}
=======
DOCKER_IMAGE: ghcr.io/robotic-decision-making-lab/libwaterlinked:${{ matrix.env.IMAGE }}
>>>>>>> cc84fbc (Finished initial implementation of driver and renamed to libwaterlinked)
CXXFLAGS: >-
-Wall -Wextra -Wpedantic -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls
CC: ${{ env.CLANG_TIDY && 'clang' }}
CXX: ${{ env.CLANG_TIDY && 'clang++' }}
=======
ROS_DISTRO: ${{ matrix.env.ROS_DISTRO }}
CXXFLAGS: -Wall -Wextra -Wpedantic
CLANG_TIDY: true
UPSTREAM_WORKSPACE: ros2.repos
AFTER_SETUP_UPSTREAM_WORKSPACE: vcs pull $BASEDIR/upstream_ws/src
AFTER_SETUP_DOWNSTREAM_WORKSPACE: vcs pull $BASEDIR/downstream_ws/src
<<<<<<< HEAD
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)
=======
ROSDEP_SKIP_KEYS: nlohmann_json
>>>>>>> 8cedc34 (Fix for ci rosdeps)
28 changes: 28 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,35 @@ name: Docker
on:
push:
branches:
<<<<<<< HEAD
- iron
=======
- main
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
- develop
>>>>>>> db1fbdb (Cleaned up dockerfile)
=======
>>>>>>> 4411139 (Removed develop from docker cd triggers)
=======
- develop
>>>>>>> a70ec26 (Push image)
=======
>>>>>>> d71daa4 (Resolved bug in json parsing)
pull_request:
paths:
- .docker/**
- .github/workflows/docker.yaml
workflow_dispatch:

env:
<<<<<<< HEAD
<<<<<<< HEAD
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'robotic-decision-making-lab/ros2-template') }}
=======
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'robotic-decision-making-lab/libwaterlinked') }}
>>>>>>> cc84fbc (Finished initial implementation of driver and renamed to libwaterlinked)

jobs:
ci:
Expand Down Expand Up @@ -55,6 +75,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
push: ${{ env.PUSH }}

<<<<<<< HEAD
robot:
strategy:
fail-fast: false
Expand Down Expand Up @@ -103,6 +124,13 @@ jobs:
push: ${{ env.PUSH }}
platforms: linux/amd64,linux/arm64

=======
>>>>>>> db1fbdb (Cleaned up dockerfile)
=======
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'robotic-decision-making-lab/waterlinked_dvl') }}

jobs:
>>>>>>> b4ac968 (Finished connection timeout implementation and renamed packages)
desktop:
strategy:
fail-fast: false
Expand Down
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
# ROS 2
<<<<<<< HEAD
build
install
log
=======
build/
install/
log/

# virtualenv
.venv
<<<<<<< HEAD
>>>>>>> 1f14078 (why tf does colcon not support fetchcontent)
=======

# Ruff
.ruff_cache
>>>>>>> acebd1e (Fixed driver build and started adding connection timeout)
3 changes: 0 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ repos:
- id: check-yaml
- id: check-xml
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
Expand Down
Loading
Loading