Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e20ec4a
Replace repository content with ROS2 packages
Cyano0 Mar 31, 2025
719f67d
Update node monitor
Cyano0 May 19, 2025
3753120
Updat README.md
Cyano0 May 21, 2025
db29705
Updat README.md
Cyano0 May 21, 2025
ec020a2
Update sentor/sentor/TopicMonitor.py
Cyano0 Jul 28, 2025
761bc72
restructure for devcontainer etc
marc-hanheide Jul 28, 2025
6e1cd40
Revert "restructure for devcontainer etc"
marc-hanheide Jul 28, 2025
6bdc01c
Merge branch 'master' of https://github.com/Cyano0/sentor into ros2-r…
marc-hanheide Jul 28, 2025
a56fba1
restructure for dev container and CI
marc-hanheide Jul 28, 2025
e9b05b1
Update Dockerfile and devcontainer configuration; change Python sheba…
marc-hanheide Jul 28, 2025
df74cfa
Update Dockerfile and devcontainer.json; install black and flake8, an…
marc-hanheide Jul 28, 2025
e1c8d45
Merge pull request #1 from LCAS/ros2-restructure
Cyano0 Jul 28, 2025
855a8d0
Update package.xml
Cyano0 Jul 28, 2025
a5b5dee
Update SafetyMonitor.py
Cyano0 Jul 28, 2025
d72af8c
Update Executor.py
Cyano0 Jul 28, 2025
3553dae
Update Dockerfile add ros-humble-controller-manager-msgs
Cyano0 Jul 29, 2025
f9aa32a
Update package.xml with ROS dependencies for sentor
Jul 29, 2025
d0a8f9f
Update src/sentor/sentor/ROSTopicHz.py
Cyano0 Jul 29, 2025
724688b
Update src/sentor/scripts/test_sentor.py
Cyano0 Jul 29, 2025
b4c1ad0
Update cache to avoid repeating expensive look‑ups
Jul 29, 2025
c8706b6
Add launch files and update package.xml for Sentor monitoring system
marc-hanheide Jul 30, 2025
184176d
Merge pull request #2 from LCAS/pr/marc-hanheide/60
Cyano0 Jul 30, 2025
54acaa6
Update sentor_node for proper naming
Jul 30, 2025
0e8ad06
delete test_sentor
Jul 30, 2025
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
34 changes: 34 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ARG BASE_IMAGE=lcas.lincoln.ac.uk/lcas/ros-docker-images:humble-2

FROM ${BASE_IMAGE} AS base

USER root

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install -qq -y --no-install-recommends \
git \
python3-pip \
ros-humble-controller-manager-msgs \
python3-rosdep

# get the source tree and analyse it for its package.xml only
FROM base AS sourcefilter
COPY ./src /tmp/src
# remove everything that isn't package.xml
RUN find /tmp/src -type f \! -name "package.xml" -print | xargs rm -rf

# install all dependencies listed in the package.xml
FROM base AS depbuilder
# copy the reduced source tree (only package.xml) from previous stage
COPY --from=sourcefilter /tmp/src /tmp/src
RUN rosdep update --rosdistro ${ROS_DISTRO} && apt-get update
RUN cd /tmp/src && rosdep install --from-paths . --ignore-src -r -y && cd && rm -rf /tmp/src

FROM depbuilder AS final

RUN pip install black flake8

# add sudo without password
ENV DEBIAN_FRONTEND=noninteractive
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "L-CAS ROS Humble Devcontainer for Sentor",
"build": {
"dockerfile": "./Dockerfile",
"args": {
"BASE_IMAGE": "lcas.lincoln.ac.uk/lcas/ros-docker-images:humble-2"
},
"context": ".."
},

"postStartCommand": "/opt/entrypoint.sh /bin/true; .devcontainer/post-create.sh",

"updateRemoteUserUID": true, // ensure internal user has the same UID as the host user and update file permissions
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"GitHub.vscode-pull-request-github",
"ms-vscode.cpptools",
"JaehyunShim.vscode-ros2",
"nonanonno.vscode-ros2",
"deitry.colcon-helper",
"github.vscode-github-actions"
]
}
}
}
34 changes: 34 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

set -xe


function add_config_if_not_exist {
if ! grep -F -q "$1" $HOME/.bashrc; then
echo "$1" >> $HOME/.bashrc
fi
}

function add_git_config_if_not_exist {
if ! git config --global --get "$1" > /dev/null; then
git config --global "$1" "$2"
fi
}

add_config_if_not_exist "source /opt/ros/$ROS_DISTRO/setup.bash"

source /opt/ros/$ROS_DISTRO/setup.bash

colcon build --symlink-install --continue-on-error || true

LOCAL_SETUP_FILE=`pwd`/install/setup.bash
add_config_if_not_exist "if [ -r $LOCAL_SETUP_FILE ]; then source $LOCAL_SETUP_FILE; fi"


add_git_config_if_not_exist "core.autocrlf" "input"
add_git_config_if_not_exist "core.safecrlf" "warn"
add_git_config_if_not_exist "pull.rebase" "false"
add_git_config_if_not_exist "user.name" "Anonymous L-CAS DevContainer User"
add_git_config_if_not_exist "user.email" "[email protected]"
add_git_config_if_not_exist "init.defaultBranch" "main"

31 changes: 31 additions & 0 deletions .github/workflows/dev-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'devcontainer CI'
on:
workflow_dispatch:
pull_request:
branches:
- ros2-devel
- master
push:
branches:
- ros2-devel
- master

jobs:
build_devcontainer:
runs-on: ubuntu-latest
steps:
- name: Checkout from github
uses: actions/checkout@v3
- name: extract the github reference
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: "image name from repo name"
id: docker_image_name
run: echo "docker_image=${{ github.repository }}" | tr '[:upper:]' '[:lower:]' |sed 's/[^0-9,a-z,A-Z,=,_,\/]/-/g' >>${GITHUB_OUTPUT}
- name: Build and run dev container task
uses: devcontainers/[email protected]
with:
imageName: devcontainer/${{ steps.docker_image_name.outputs.docker_image }}
configFile: ./.devcontainer/devcontainer.json
push: never
#imageTag: ${{ matrix.config }}-${{ env.BRANCH }}
#runCmd: "bash .devcontainer/run-ci.sh"
70 changes: 70 additions & 0 deletions .github/workflows/ros-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: ros CI

on:
push:
# you may want to configure the branches that this should be run on here.
branches: [ "master", "ros2-devel" ]
pull_request:
branches: [ "master", "ros2-devel" ]

jobs:
test_docker: # On Linux, iterates on all ROS 1 and ROS 2 distributions.
runs-on: ubuntu-latest
strategy:
matrix:
ros_distribution:
# - noetic
- humble
# - iron

# Define the Docker image(s) associated with each ROS distribution.
# The include syntax allows additional variables to be defined, like
# docker_image in this case. See documentation:
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build
#
# Platforms are defined in REP 3 and REP 2000:
# https://ros.org/reps/rep-0003.html
# https://ros.org/reps/rep-2000.html
include:
# Noetic Ninjemys (May 2020 - May 2025)
# - docker_image: ubuntu:focal
# ros_distribution: noetic
# ros_version: 1

# Humble Hawksbill (May 2022 - May 2027)
- docker_image: ubuntu:jammy
ros_distribution: humble
ros_version: 2

# Iron Irwini (May 2023 - November 2024)
# - docker_image: ubuntu:jammy
# ros_distribution: iron
# ros_version: 2

# # Rolling Ridley (No End-Of-Life)
# - docker_image: ubuntu:jammy
# ros_distribution: rolling
# ros_version: 2

container:
image: ${{ matrix.docker_image }}
steps:
- uses: actions/checkout@v3
- name: setup ROS environment
uses: LCAS/setup-ros@master
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: build and test ROS 1
if: ${{ matrix.ros_version == 1 }}
uses: ros-tooling/[email protected]
with:
import-token: ${{ github.token }}
target-ros1-distro: ${{ matrix.ros_distribution }}
skip-tests: true
- name: build and test ROS 2
if: ${{ matrix.ros_version == 2 }}
uses: ros-tooling/[email protected]
with:
import-token: ${{ github.token }}
target-ros2-distro: ${{ matrix.ros_distribution }}
skip-tests: true
149 changes: 50 additions & 99 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,101 +1,52 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
devel/
log/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
bin/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
install/
msg_gen/
srv_gen/
msg/*Action.msg
msg/*ActionFeedback.msg
msg/*ActionGoal.msg
msg/*ActionResult.msg
msg/*Feedback.msg
msg/*Goal.msg
msg/*Result.msg
msg/_*.py
build_isolated/
devel_isolated/

# Generated by dynamic reconfigure
*.cfgc
/cfg/cpp/
/cfg/*.py

# Ignore generated docs
*.dox
*.wikidoc

# eclipse stuff
.project
.cproject

# qcreator stuff
CMakeLists.txt.user

srv/_*.py
*.pcd
*.pyc
qtcreator-*
*.user

/planning/cfg
/planning/docs
/planning/src

*~

# Emacs
.#*

# Catkin custom files
CATKIN_IGNORE
Loading