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

Fixed case sensitivity issue #68

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
extend-ignore = B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202,Q000
import-order-style = google
max-line-length = 125
show-source = true
statistics = true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ about: "For feature requests. Please search for existing issues first. Also see
* Tradeoffs made in design decisions
* Caveats and considerations for the future

If there are multiple solutions, please present each one separately. Save comparisons for the very end.)
If there are multiple solutions, please present each one separately. Save comparisons for the very end.)
65 changes: 65 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build and Test Workflows

on:
pull_request:
branches:
- main
- develop
push:
branches:
- main

jobs:
ament_lint:
name: Lint and Codecheck
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Setup ROS
uses: ros-tooling/setup-ros@master
- name: Ament Copyright Lint
uses: ros-tooling/action-ros-lint@master
with:
distribution: humble
linter: copyright
package-name: "*"
- name: Ament Flake8 Lint
uses: ros-tooling/action-ros-lint@master
with:
distribution: humble
linter: flake8
package-name: "*"
arguments: '--config=${{ github.workspace }}/.flake8'
- name: Ament PEP257 Lint
uses: ros-tooling/action-ros-lint@master
with:
distribution: humble
linter: pep257
package-name: "*"
- name: Ament xmllint Lint
uses: ros-tooling/action-ros-lint@master
with:
distribution: humble
linter: xmllint
package-name: "*"

build_source:
name: Build Docker Image and ROS 2 Packages
runs-on: ubuntu-latest
env:
CONTAINER_NAME: perception_pipeline
PERCEP_WS: /root/percep_ws
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Build Docker Image
run: docker build . --file Dockerfile.ubuntu -t ${{ github.repository }}:latest
- name: Run Docker Image
run: |
docker run -it -d --name $CONTAINER_NAME \
-v ${{ github.workspace }}:$PERCEP_WS/src \
${{ github.repository }}:latest
- name: Build ROS 2 Packages in Container
run: docker exec $CONTAINER_NAME bash -c \
"source /opt/ros/humble/setup.bash && cd $PERCEP_WS && colcon build"
87 changes: 80 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,82 @@
#Ignore the test node
/object_detection/object_detection/test_node.py
# Custom settings asset
*.settings.asset*

#Ignore pycache dirs
object_detection/object_detection/Detectors/__pycache__/
object_detection/object_detection/__pycache__/
# Visual Studio 2015 cache directory
/Project/.vs/

#Ignore .vscode dir
.vscode
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Mm]emoryCaptures/

# Autogenerated VS/MD/Consulo solution and project files
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb

# Unity3D generated meta files
*.pidb.meta

# Builds
*.apk
*.unitypackage
*.app
*.exe
*.x86_64
*.x86

# Generated doc folders
/docs/html

# Mac hidden files
*.DS_Store
*/.ipynb_checkpoints
*/.idea
*.pyc
*.idea/misc.xml
*.idea/modules.xml
*.idea/
*.iml
*.cache
*/build/
*/dist/
*.egg-info*
*.eggs*
*.gitignore.swp

# VSCode hidden files
.vscode/

.DS_Store
.ipynb_checkpoints

# pytest cache
*.pytest_cache/

# Ignore PyPi build files.
dist/
build/

# Python virtual environment
venv/
.mypy_cache/

# Code coverage report
.coverage
coverage.xml
/htmlcov/

**/UserSettings/*

ROSConnectionPrefab.prefab
80 changes: 80 additions & 0 deletions Dockerfile.cuda
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Use cuda_version arg to take CUDA version as input from user
ARG cuda_version=11.8.0

# Use NVIDA-CUDA's base image
FROM nvcr.io/nvidia/cuda:${cuda_version}-devel-ubuntu22.04

# Prevent console from interacting with the user
ARG DEBIAN_FRONTEND=noninteractive

# Prevent hash mismatch error for apt-get update, qqq makes the terminal quiet while downloading pkgs
RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get update -yqqq

# Set folder for RUNTIME_DIR. Only to prevent warnings when running RViz2 and Gz
RUN mkdir tmp/runtime-root && chmod 0700 tmp/runtime-root
ENV XDG_RUNTIME_DIR='/tmp/runtime-root'

RUN apt-get update

RUN apt-get install --no-install-recommends -yqqq \
apt-utils \
nano \
git

# Using shell to use bash commands like 'source'
SHELL ["/bin/bash", "-c"]

# Python Dependencies
RUN apt-get install --no-install-recommends -yqqq \
python3-pip

# Add locale
RUN locale && \
apt update && apt install --no-install-recommends -yqqq locales && \
locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8 && \
locale

# Setup the sources
RUN apt-get update && apt-get install --no-install-recommends -yqqq software-properties-common curl && \
add-apt-repository universe && \
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/nul

# Install ROS 2 Humble
RUN apt update && apt install --no-install-recommends -yqqq \
ros-humble-ros-base \
ros-dev-tools

# Install cv-bridge
RUN apt update && apt install --no-install-recommends -yqqq \
ros-humble-cv-bridge

# Target workspace for ROS2 packages
ARG WORKSPACE=/root/percep_ws

# Add target workspace in environment
ENV WORKSPACE=$WORKSPACE

# Creating the models folder
RUN mkdir -p $WORKSPACE/models && \
mkdir -p $WORKSPACE/src

# Installing Python dependencies
COPY object_detection/requirements.txt .
RUN pip3 install -r requirements.txt

# ROS Dependencies
RUN apt update && apt install --no-install-recommends -yqqq \
ros-humble-cyclonedds \
ros-humble-rmw-cyclonedds-cpp

# Use cyclone DDS by default
ENV RMW_IMPLEMENTATION rmw_cyclonedds_cpp

WORKDIR /root/percep_ws

# Update .bashrc
RUN echo "source /opt/ros/humble/setup.bash" >> /root/.bashrc

77 changes: 77 additions & 0 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Use Ubuntu's base image
FROM ubuntu:22.04

# Prevent console from interacting with the user
ARG DEBIAN_FRONTEND=noninteractive

# Prevent hash mismatch error for apt-get update, qqq makes the terminal quiet while downloading pkgs
RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get update -yqqq

# Set folder for RUNTIME_DIR. Only to prevent warnings when running RViz2 and Gz
RUN mkdir tmp/runtime-root && chmod 0700 tmp/runtime-root
ENV XDG_RUNTIME_DIR='/tmp/runtime-root'

RUN apt-get update

RUN apt-get install --no-install-recommends -yqqq \
apt-utils \
nano \
git

# Using shell to use bash commands like 'source'
SHELL ["/bin/bash", "-c"]

# Python Dependencies
RUN apt-get install --no-install-recommends -yqqq \
python3-pip

# Add locale
RUN locale && \
apt update && apt install --no-install-recommends -yqqq locales && \
locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8 && \
locale

# Setup the sources
RUN apt-get update && apt-get install --no-install-recommends -yqqq software-properties-common curl && \
add-apt-repository universe && \
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/nul

# Install ROS 2 Humble
RUN apt update && apt install --no-install-recommends -yqqq \
ros-humble-ros-base \
ros-dev-tools

# Install cv-bridge
RUN apt update && apt install --no-install-recommends -yqqq \
ros-humble-cv-bridge

# Target workspace for ROS2 packages
ARG WORKSPACE=/root/percep_ws

# Add target workspace in environment
ENV WORKSPACE=$WORKSPACE

# Creating the models folder
RUN mkdir -p $WORKSPACE/models && \
mkdir -p $WORKSPACE/src

# Installing Python dependencies
COPY object_detection/requirements.txt .
RUN pip3 install -r requirements.txt

# ROS Dependencies
RUN apt update && apt install --no-install-recommends -yqqq \
ros-humble-cyclonedds \
ros-humble-rmw-cyclonedds-cpp

# Use cyclone DDS by default
ENV RMW_IMPLEMENTATION rmw_cyclonedds_cpp

WORKDIR /root/percep_ws

# Update .bashrc
RUN echo "source /opt/ros/humble/setup.bash" >> /root/.bashrc

Loading
Loading