Skip to content

Commit

Permalink
Merge pull request #36 from sonia-auv/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
supertoto29 authored Jun 27, 2022
2 parents 3d43e60 + ba35e8e commit 4538351
Show file tree
Hide file tree
Showing 81 changed files with 394 additions and 196 deletions.
3 changes: 1 addition & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
],
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"--security-opt", "seccomp=unconfined",
"--privileged",
"seccomp=unconfined",
"--rm",
"--network",
"host"
Expand Down
16 changes: 7 additions & 9 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
blank_issues_enabled: false
# TODO: enter appropriate contacts
"""

contact_links:
- name: GitHub Community Forum
url: https://github.community/
about: Please ask and answer questions here.
- name: GitHub Security Bug Bounty
url: https://bounty.github.com/
about: Please report security vulnerabilities here.
"""
- name: SONIA AUV official documentation
url: https://wiki.sonia.etsmtl.ca/
about: Visit our documentation for more information.
- name: SONIA AUV website
url: https://sonia.etsmtl.ca/
about: Visit our website and feel free to ask any questions.
30 changes: 0 additions & 30 deletions .github/workflows/docker-image-perception-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,33 +81,3 @@ jobs:
- name: Push Image to Github Packages Registry
run: |
docker push --all-tags ${GITHUB_REMOTE_URL}/${IMAGE_NAME}
notify-success:
name: "Notify Slack - Success"
runs-on: ubuntu-latest
needs: [build-ros-perception-x86-64, build-ros-perception-arm64]
if: success()
steps:
- name: Notify Slack Success
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: github-ci-notifications
status: SUCCESS
color: good

notify-fail:
name: "Notify Slack - Failure"
runs-on: ubuntu-latest
needs: [build-ros-perception-x86-64, build-ros-perception-arm64]
if: failure()
steps:
- name: Notify Slack Fail
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: github-ci-notifications
status: FAILED
color: danger
29 changes: 0 additions & 29 deletions .github/workflows/docker-image-perception-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,32 +73,3 @@ jobs:
run: |
docker push --all-tags ${GITHUB_REMOTE_URL}/${IMAGE_NAME}
notify-success:
name: "Notify Slack - Success"
runs-on: ubuntu-latest
needs: [build-ros-perception-x86-64, build-ros-perception-arm64]
if: success()
steps:
- name: Notify Slack Success
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: github-ci-notifications
status: SUCCESS
color: good

notify-fail:
name: "Notify Slack - Failure"
runs-on: ubuntu-latest
needs: [build-ros-perception-x86-64, build-ros-perception-arm64]
if: failure()
steps:
- name: Notify Slack Fail
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: github-ci-notifications
status: FAILED
color: danger
75 changes: 75 additions & 0 deletions .github/workflows/docker-image-perception-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Docker Image CI - Fix Branch

on:
push:
branches: [fix/**]

jobs:
build-ros-perception-x86-64:
name: "Build ROS perception X86/64"
runs-on: ubuntu-latest
env:
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:x86-perception-latest"
ARCH: x86
TARGET_TYPE: perception
TARGET_VERSION: fix
IMAGE_NAME: provider_vision
GITHUB_REMOTE_URL: docker.pkg.github.com/${{ github.repository }}
steps:
- uses: actions/checkout@v2
- name: Login to Github Package Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Build the docker image (perception based)
run: |
docker build . --tag build-fix-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE} --build-arg TARGET_ARCH=${ARCH}
- name: Create Docker Image Tag
run: |
docker tag build-fix-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} ${GITHUB_REMOTE_URL}/${IMAGE_NAME}:${ARCH}-${TARGET_TYPE}-${TARGET_VERSION}-${GITHUB_REF##*/}
- name: Push Image to Github Packages Registry
run: |
docker push --all-tags ${GITHUB_REMOTE_URL}/${IMAGE_NAME}
build-ros-perception-arm64:
name: "Build ROS perception AMR64"
runs-on: ubuntu-latest
env:
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:arm64-perception-latest"
ARCH: arm64
TARGET_TYPE: perception
TARGET_VERSION: fix
IMAGE_NAME: provider_vision
GITHUB_REMOTE_URL: docker.pkg.github.com/${{ github.repository }}
steps:
- uses: actions/checkout@v2
- name: Login to Github Package Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Enable Docker Daemon Experimental features
run: |
sudo rm /etc/docker/daemon.json
echo '{"experimental": true , "cgroup-parent": "/actions_job" }' | sudo tee -a /etc/docker/daemon.json
sudo service docker restart
docker version
- name: Install QEMU to be able to compile on X86 into ARM64
run: |
sudo apt-get update
sudo apt-get install qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build the docker image (perception based)
run: |
docker build . --tag build-fix-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE} --build-arg TARGET_ARCH=${ARCH}
docker inspect build-fix-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER}
- name: Create Docker Image Tag
run: |
docker tag build-fix-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} ${GITHUB_REMOTE_URL}/${IMAGE_NAME}:${ARCH}-${TARGET_TYPE}-${TARGET_VERSION}-${GITHUB_REF##*/}
- name: Push Image to Github Packages Registry
run: |
docker push --all-tags ${GITHUB_REMOTE_URL}/${IMAGE_NAME}
31 changes: 0 additions & 31 deletions .github/workflows/docker-image-perception-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,34 +113,3 @@ jobs:
draft: false
prerelease: false

notify-success:
name: "Notify Slack - Success"
runs-on: ubuntu-latest
needs:
[build-ros-perception-x86-64, build-ros-perception-arm64, create-release]
if: success()
steps:
- name: Notify Slack Success
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: github-ci-notifications
status: SUCCESS
color: good

notify-fail:
name: "Notify Slack - Failure"
runs-on: ubuntu-latest
needs:
[build-ros-perception-x86-64, build-ros-perception-arm64, create-release]
if: failure()
steps:
- name: Notify Slack Fail
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: github-ci-notifications
status: FAILED
color: danger
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"python.autoComplete.extraPaths": [
"/home/sonia/base_lib_ws/devel/lib/python2.7/dist-packages",
"/opt/ros/melodic/lib/python2.7/dist-packages"
]
],
"files.associations": {
"vector": "cpp"
}
}
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.0.2)
project(provider_vision)

add_compile_options(-std=c++11)
Expand All @@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
###
# camera Acquisition specific
###
#SET("OpenCV_DIR" "~/apps/opencv-2.4.13/")
#SET("OpenCV_DIR" "~/apps/opencv-4.2.0/")
set(PROJECT_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include" CACHE PATH "Project Include Directory")
set(SPINNAKER_INCLUDE_DIR "/opt/spinnaker/include" CACHE PATH "Spinnaker Include Directory")
set(SPINNAKER_LIB_DIR "/opt/spinnaker/lib" CACHE PATH "Spinnaker Libs Directory")
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE="docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:x86-perception-latest"
ARG BASE_IMAGE="ghcr.io/sonia-auv/sonia_common/sonia_common:x86-perception-latest"

FROM ${BASE_IMAGE}

Expand Down Expand Up @@ -29,7 +29,7 @@ ENV ENTRYPOINT_ABSPATH=${NODE_PATH}/scripts/${ENTRYPOINT_FILE}
ENV SONIA_WS_SETUP=${SONIA_WS}/devel/setup.bash

RUN apt-get update \
&& apt-get install -y libunwind-dev ros-melodic-cv-bridge ros-melodic-image-transport
&& apt-get install -y libunwind-dev ros-noetic-cv-bridge ros-noetic-image-transport qt5-default

WORKDIR ${NODE_PATH}/drivers/${TARGET_ARCH}

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/sonia-auv/provider_vision.svg)


*Please read the instructions and fill in the blanks*


One Paragraph of project description goes here

Expand Down
Binary file removed drivers/arm64/.install_spinnaker.sh.swp
Binary file not shown.
65 changes: 53 additions & 12 deletions drivers/arm64/README_ARM
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,24 @@ user$: sudo apt-get install libusb-1.0-0
===============================================================================

Once all the dependencies are installed, just install the Spinnaker deb files.
There are eight different packages that need to be installed.
There are fifteen different packages that need to be installed.

The Spinnaker packages are:
- libspinnaker-<version>_<platform>.deb
- libspinnaker-<version>_<platform>-dev.deb
- libspinnaker-c-<version>_<platform>.deb
- libspinnaker-c-<version>_<platform>-dev.deb
- spinupdate-<version>_<platform>.deb
- spinupdate-<version>_<platform>-dev.deb
- spinnaker-<version>_<platform>.deb
- spinnaker-doc-<version>_<platform>.deb
- libgentl_<version>_<platform>.deb
- libspinnaker_<version>_<platform>.deb
- libspinnaker-dev_<version>_<platform>.deb
- libspinnaker-c_<version>_<platform>.deb
- libspinnaker-c-dev_<version>_<platform>.deb
- libspinvideo_<version>_<platform>.deb
- libspinvideo-dev_<version>_<platform>.deb
- libspinvideo-c_<version>_<platform>.deb
- libspinvideo-c-dev_<version>_<platform>.deb
- spinnaker_<version>_<platform>.deb
- spinnaker-doc_<version>_<platform>.deb
- spinupdate_<version>_<platform>.deb
- spinupdate-dev_<version>_<platform>.deb
- spinview-qt_<version>_<platform>.deb
- spinview-qt-dev_<version>_<platform>.deb

The packages with a preceding 'lib' are all the shared objects and their
respective dev packages. The spinnaker-doc package contains our documentation in
Expand Down Expand Up @@ -183,6 +190,37 @@ If using multiple USB3 cameras, the USB-FS memory limit may need to exceed 1000.
More information on these changes can be found at:
<https://www.flir.com/support-center/iis/machine-vision/application-note/understanding-usbfs-on-linux>

On some ARM platforms, the number of buffers that can be submitted to libusb
is further limited by the following two kernel settings.

1. coherent_pool
If Spinnaker fails to begin acquisition and you find messages in dmesg similar to
"xhci_hcd 0000:01:00.0: Ring expansion failed" or
"usb 2-1: usbfs: usb_submit_urb returned -12",
You may want to increase the coherent atomic allocation pool by:

1.1 Opening /boot/firmware/cmdline.txt with elevated permission in any text editor.

1.2 Add the following line at the end of the file or modify the existing entry if it exists:

coherent_pool=5M

1.3 Restart the machine.

2. swiotlb
If Spinnaker fails to begin acquisition and you find messages in dmesg similar to
"xhci_hcd 0000:01:00.0: swiotlb buffer is full (sz: 16384 bytes), total 32768 (slots), used 32414 (slots)" or
"usb 2-1: usbfs: usb_submit_urb returned -11",
You may want to increase the swiotlb buffer by:

1.1 Opening /boot/firmware/cmdline.txt with elevated permission in any text editor.

1.2 Add the following line at the end of the file or modify the existing entry if it exists:

swiotlb=32768

1.3 Restart the machine.

===============================================================================
4. GIGE CAMERA SETUP
===============================================================================
Expand Down Expand Up @@ -266,6 +304,9 @@ the output difference, in order to find the network adapter name.
To PERMANENTLY enable Jumbo Packet for a specific network adapter (eg. enp15s0), follow
one of the methods below.

Note that when the following methods are used in conjunction with each other on Ubuntu 20.04 or newer,
your interface may sometimes be assigned 2 IP addresses, thus showing up twice in Spinnaker.

Method 1: Netplan (Ubuntu 20.04 or newer)

1. Open up your netplan YAML configuration in /etc/netplan/ in a text editor (as sudo):
Expand All @@ -283,11 +324,11 @@ one of the methods below.
enp15s0:
mtu: 9000
addresses: 169.254.0.64/16
dhcp: no
dhcp4: no

3. Restart the network by entering the command in the terminal
$ sudo netplan apply

Method 2: /etc/network/interfaces (Ubuntu 18.04 or older)

1. Open up /etc/network/interfaces in a text editor (as sudo)
Expand Down
6 changes: 6 additions & 0 deletions drivers/arm64/input
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Y
yes
Y
sonia




Loading

0 comments on commit 4538351

Please sign in to comment.