Skip to content
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

update udev rules permission to allow launch file to use /dev/rplidar #1

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Test build DEB package
on:
pull_request:
types:
- opened
- reopened
- synchronize
push:
branches:
- "main"

jobs:
build-debian:
runs-on: ARM64
container: asia-docker.pkg.dev/clearbot-360312/clearbot-public/ros-foxy-fastrtpsgen:latest
steps:
- uses: actions/checkout@v3
- name: Setup apt repo
env:
APTSERVER_USER: ${{ secrets.APTSERVER_USER }}
APTSERVER_PASSWORD: ${{ secrets.APTSERVER_PASSWORD }}
run: |
sudo apt -y update
sudo apt install -y wget software-properties-common
wget -qO - https://aptserver.clearbot.dev/pubkey | sudo apt-key add -
echo "machine https://aptserver.clearbot.dev\nlogin $APTSERVER_USER\npassword $APTSERVER_PASSWORD" >> /etc/apt/auth.conf.d/clearbot.conf
sudo add-apt-repository 'deb https://aptserver.clearbot.dev focal main'
- name: Install dependencies
run: |
sudo apt -y update
sudo apt install -y dh-make fakeroot ros-foxy-clearbot-px4-msgs ros-foxy-clearbot-msgs
- name: fakeroot
run: fakeroot debian/rules binary
- name: Debian file
id: deb-file-name
run: |
cd .. && echo DEB_FILE="$(pwd)/$(find . -name "ros-foxy-clearbot-sllidar-ros2*.deb" | sed -r 's/^.{2}//')" >> "$GITHUB_OUTPUT"
- name: Export deb file artifact
uses: actions/upload-artifact@v3
with:
name: built deb file
path: ${{ steps.deb-file-name.outputs.DEB_FILE }}
if-no-files-found: error



40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release DEB package
on:
release:
types: [published]

jobs:
build-debian:
runs-on: ARM64
container: asia-docker.pkg.dev/clearbot-360312/clearbot-public/ros-foxy-fastrtpsgen:latest
steps:
- uses: actions/checkout@v3
- name: Setup apt repo
env:
APTSERVER_USER: ${{ secrets.APTSERVER_USER }}
APTSERVER_PASSWORD: ${{ secrets.APTSERVER_PASSWORD }}
run: |
sudo apt -y update
sudo apt install -y wget software-properties-common curl
wget -qO - https://aptserver.clearbot.dev/pubkey | sudo apt-key add -
echo "machine https://aptserver.clearbot.dev\nlogin $APTSERVER_USER\npassword $APTSERVER_PASSWORD" >> /etc/apt/auth.conf.d/clearbot.conf
sudo add-apt-repository 'deb https://aptserver.clearbot.dev focal main'
- name: Install dependencies
run: |
sudo apt -y update
sudo apt install -y dh-make fakeroot ros-foxy-clearbot-px4-msgs ros-foxy-clearbot-msgs
- name: fakeroot
run: fakeroot debian/rules binary
- name: Debian file
id: deb-file-name
run: |
cd .. && echo DEB_FILE="$(pwd)/$(find . -name "ros-foxy-clearbot-sllidar-ros2*.deb" | sed -r 's/^.{2}//')" >> "$GITHUB_OUTPUT"
- name: Upload to aptserver
env:
APTSERVER_USER: ${{ secrets.APTSERVER_USER }}
APTSERVER_PASSWORD: ${{ secrets.APTSERVER_PASSWORD }}
FILENAME: ${{ steps.deb-file-name.outputs.DEB_FILE }}
run: cd .. && curl -X POST -u $APTSERVER_USER:$APTSERVER_PASSWORD -F file=@$FILENAME https://aptserver.clearbot.dev/api/files/clearbot-sllidar-ros2



2 changes: 1 addition & 1 deletion debian/ros-foxy-clearbot-sllidar-ros2.udev
Original file line number Diff line number Diff line change
@@ -1 +1 @@
KERNEL=="ttyUSB*", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="rplidar"
KERNEL=="ttyUSB*", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE:="0777", SYMLINK+="rplidar"