Skip to content

Commit

Permalink
checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
AOOOOOA committed Jul 26, 2024
0 parents commit 0d81fca
Show file tree
Hide file tree
Showing 241 changed files with 304,294 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: fabianoboril

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Ubuntu 16.04]
- CARLA Version [e.g. CARLA 0.9.6]
- Python version [e.g. 2.7]
- Version [e.g. 0.9.6]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: fabianoboril

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Issue report
about: You have a question, an idea or need some help, then open an normal issue.
title: ''
labels: ''
assignees: ''

---

**Describe our question or idea**
A clear and concise description.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Ubuntu 16.04]
- CARLA Version [e.g. CARLA 0.9.6]
- Python version [e.g. 2.7]
- Version [e.g. 0.9.6]
31 changes: 31 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
Thanks for sending a pull request! Please make sure you click the link above to
view the contribution guidelines, then fill out the blanks below.
Checklist:
- [ ] Your branch is up-to-date with the `master` branch and tested with latest changes
- [ ] Extended the README / documentation, if necessary
- [ ] Code compiles correctly and runs
- [ ] Code is formatted and checked with Utilities/code_check_and_formatting.sh
- [ ] Changelog is updated
-->

#### Description

<!-- Please explain the changes you made here as detailed as possible. -->

Fixes # <!-- If fixes an issue, please add here the issue number. -->

#### Where has this been tested?

* **Platform(s):** ...
* **Python version(s):** ...
* **Unreal Engine version(s):** ...
* **CARLA version:** ...

#### Possible Drawbacks

<!-- What are the possible side-effects or negative impacts of the code change? -->
61 changes: 61 additions & 0 deletions .github/workflows/static_code_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Static Code Analysis

on:
push:
branches: master
pull_request:
branches: master

jobs:
formatJob:
name: Check Code Format
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install pep8 python3-autopep8 python3-pep8 python-is-python3
- name: Check Code Format
run: |
autopep8 srunner/scenariomanager/*.py --in-place --max-line-length=120 --ignore=E731
autopep8 srunner/scenariomanager/scenarioatomics/*.py --in-place --max-line-length=120
autopep8 srunner/scenarios/*.py --in-place --max-line-length=120
autopep8 srunner/tools/*.py --in-place --max-line-length=120
autopep8 srunner/scenarioconfigs/*.py --in-place --max-line-length=120
autopep8 scenario_runner.py --in-place --max-line-length=120
autopep8 srunner/autoagents/*.py --in-place --max-line-length=120
git diff --quiet HEAD --; if [ ! $? -eq 0 ]; then echo "Code is not autopep8 compliant. Please run code_check_and_formatting.sh"; git diff HEAD --; exit 1; fi
qualityJob:
name: Check Code Quality
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install python3-pip pep8 python3-autopep8 python3-pep8 python-is-python3 libgeos-dev
sudo pip3 install pylint --upgrade
sudo pip3 install -r requirements.txt
- name: Check Code Quality with Pylint
run: |
pylint --version
static_code_quality_passed=1
pylint --rcfile=.pylintrc --disable=I srunner/scenariomanager
pylint --rcfile=.pylintrc --disable=I srunner/scenarios
pylint --rcfile=.pylintrc --disable=I srunner/tools
pylint --rcfile=.pylintrc --disable=I srunner/scenarioconfigs
pylint --rcfile=.pylintrc --disable=I scenario_runner.py
score=`pylint --rcfile=.pylintrc --disable=I srunner/scenariomanager | grep -i "rated at" | awk '{print $7}'`; if [ "$score" != "10.00/10" ]; then static_code_quality_passed=0; fi
score=`pylint --rcfile=.pylintrc --disable=I srunner/scenarios | grep -i "rated at" | awk '{print $7}'`; if [ "$score" != "10.00/10" ]; then static_code_quality_passed=0; fi
score=`pylint --rcfile=.pylintrc --disable=I srunner/tools | grep -i "rated at" | awk '{print $7}'`; if [ "$score" != "10.00/10" ]; then static_code_quality_passed=0; fi
score=`pylint --rcfile=.pylintrc --disable=I srunner/scenarioconfigs | grep -i "rated at" | awk '{print $7}'`; if [ "$score" != "10.00/10" ]; then static_code_quality_passed=0; fi
score=`pylint --rcfile=.pylintrc --disable=I scenario_runner.py | grep -i "rated at" | awk '{print $7}'`; if [ "$score" != "10.00/10" ]; then static_code_quality_passed=0; fi
if [ $static_code_quality_passed -eq 0 ]; then echo "Code is not pylint compliant. Please run code_check_and_formatting.sh"; exit 1; fi
28 changes: 28 additions & 0 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Static Code Analysis

on:
push:
branches: master
pull_request:
branches: master

jobs:
formatJob:
name: Run UnitTests
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install pep8 python3-autopep8 python3-pep8 python-is-python3
sudo apt-get install python3-pip pep8 python3-autopep8 python3-pep8 python-is-python3 libgeos-dev
sudo pip3 install pylint --upgrade
sudo pip3 install -r requirements.txt
- name: Check Code Format
run: |
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/srunner/tests/carla_mocks
python3 -m unittest srunner/tests/test_xosc_load.py
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
*.pyc
srunner/autoagents/*.pyc
srunner/autoagents/__pycache__/
srunner/scenariomanager/*.pyc
srunner/scenariomanager/__pycache__/
srunner/scenarios/*.pyc
srunner/scenarios/__pycache__/
srunner/utilities/*.pyc
srunner/utilities/__pycache__/
results*.txt
*.log
.project
.pydevproject
*.png
*.svg
*.dot
temp_data
final_data
record*
7 changes: 7 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[MESSAGES CONTROL]
max-line-length=120
disable=no-self-use,anomalous-backslash-in-string,too-many-arguments,too-few-public-methods,too-many-instance-attributes,redefined-variable-type,unused-argument,bad-continuation,too-many-lines,too-many-branches,locally-disabled,too-many-locals,too-many-statements,duplicate-code,too-many-nested-blocks,fixme,useless-object-inheritance,no-else-raise,no-else-break,unnecessary-pass,no-else-return,super-with-arguments,no-else-continue,bad-option-value,consider-using-dict-items,consider-using-f-string
ignored-modules=carla,carla.command,agents.navigation.basic_agent,agents.navigation.roaming_agent,agents.tools.misc,agents.navigation.local_planner,agents.navigation.global_route_planner,agents.navigation.global_route_planner_dao,shutil,carla_msgs,nav_msgs,sensor_msgs,std_msgs,tf,cv_bridge,geometry_msgs,rosgraph_msgs,rospy
variable-rgx=[a-z0-9_]{1,40}$
function-rgx=[a-z0-9_]{1,40}$
extension-pkg-whitelist=cv2,pygame,numpy
16 changes: 16 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

mkdocs:
configuration: mkdocs.yml

formats: all

python:
version: 3.7
install:
- requirements: Docs/requirements.txt


105 changes: 105 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
from ubuntu:18.04

# Install base libs
run apt-get update && apt-get install --no-install-recommends -y python3.7 python3.7-dev python3-pip


RUN apt-get install --no-install-recommends -y libpng16-16=1.6.34-1ubuntu0.18.04.2 \
libtiff5 libjpeg8=8c-2ubuntu8 build-essential=12.4ubuntu1 wget=1.19.4-1ubuntu2.2 git \
libxerces-c-dev \
&& rm -rf /var/lib/apt/lists/*

# # Install python requirements
run pip3 install --user setuptools==46.3.0

run pip3 install --user wheel==0.34.2

run pip3 install py_trees==0.8.3 networkx==2.2

RUN pip3 install --upgrade pip setuptools wheel

# (Optional) Install additional libraries that might be needed
RUN apt-get update && apt-get install --no-install-recommends -y \
libssl-dev \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*

run pip3 install six==1.14.0 numpy==1.18.4 ephem

run pip3 install shapely==1.7.0 xmlschema==1.1.3 tabulate==0.8.7
# && mkdir -p /app/scenario_runner

COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
# RUN sh requirements.sh

# Set the working directory in the container
WORKDIR /workspace

# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
curl \
libgl1-mesa-glx \
libglib2.0-0 \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libgtk2.0-dev \
pkg-config \
python3 \
python3-pip \
python3-dev \
&& rm -rf /var/lib/apt/lists/*

# Install PyTorch and torchvision
RUN pip3 install torch torchvision

# Install other dependencies for PyTorch3D
RUN pip3 install fvcore iopath

# Install PyTorch3D
RUN pip3 install "git+https://github.com/facebookresearch/pytorch3d.git"

# Copy the rest of your application code to the container
COPY . /workspace

# Install scenario_runner
# copy . /app/scenario_runner

# setup environment :
#
# CARLA_HOST : uri for carla package without trailing slash.
# For example, "https://carla-releases.s3.eu-west-3.amazonaws.com/Linux".
# If this environment is not passed to docker build, the value
# is taken from CARLA_VER file inside the repository.
#
# CARLA_RELEASE : Name of the package to be used. For example, "CARLA_0.9.9".
# If this environment is not passed to docker build, the value
# is taken from CARLA_VER file inside the repository.
#
#
# It's expected that $(CARLA_HOST)/$(CARLA_RELEASE).tar.gz is a downloadable resource.
#

env CARLA_HOST ""
env CARLA_RELEASE ""

# Set environment variables from CARLA_VER
RUN export DEFAULT_CARLA_HOST="$(sed -e 's/^\s*HOST\s*=\s*//;t;d' scenario_runner/CARLA_VER)" && \
export CARLA_HOST="${CARLA_HOST:-$DEFAULT_CARLA_HOST}" && \
export DEFAULT_CARLA_RELEASE="$(sed -e 's/^\s*RELEASE\s*=\s*//;t;d' /scenario_runner/CARLA_VER)" && \
export CARLA_RELEASE="${CARLA_RELEASE:-$DEFAULT_CARLA_RELEASE}" && \
echo "CARLA_HOST=${CARLA_HOST}" >> /etc/environment && \
echo "CARLA_RELEASE=${CARLA_RELEASE}" >> /etc/environment

env PYTHONPATH "${PYTHONPATH}:carla/agents:/carla"
# entrypoint ["/bin/sh" ]
entrypoint ["sh launch_all_FLV.sh" ]


Loading

0 comments on commit 0d81fca

Please sign in to comment.