Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into pc
Browse files Browse the repository at this point in the history
  • Loading branch information
costashatz committed Feb 8, 2025
2 parents 2e45055 + 8188beb commit e5b157b
Show file tree
Hide file tree
Showing 946 changed files with 542,565 additions and 1,032 deletions.
65 changes: 65 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
Language: Cpp
# BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: false
AlignEscapedNewlinesLeft: false
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: All
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
BinPackArguments: true
ColumnLimit: 0
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: false
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: true
NamespaceIndentation: All
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: true
Standard: Cpp11
IndentWidth: 4
TabWidth: 4
UseTab: Never
BreakBeforeBraces: Stroustrup
# SortIncludes: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterCStyleCast: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas: '^ IWYU pragma:'
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat: false
...
78 changes: 78 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Contributing to RobotDART

Thank you for your interest in contributing to RobotDART! We appreciate your help in improving the project. Below are some guidelines to help you get started.

## Table of Contents
- [Contributing to RobotDART](#contributing-to-robotdart)
- [Table of Contents](#table-of-contents)
- [How to Contribute](#how-to-contribute)
- [1. Fork the Repository](#1-fork-the-repository)
- [2. Clone the Repository](#2-clone-the-repository)
- [3. Create a Branch](#3-create-a-branch)
- [4. Make Changes](#4-make-changes)
- [5. Commit Your Changes](#5-commit-your-changes)
- [6. Push Your Changes](#6-push-your-changes)
- [7. Create a Pull Request](#7-create-a-pull-request)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Issue Reporting](#issue-reporting)
- [Coding Standards](#coding-standards)
- [License](#license)

## How to Contribute

### 1. Fork the Repository
Start by forking the repository to your GitHub account. This creates a copy of the project under your GitHub user.

### 2. Clone the Repository
Clone your forked repository to your local machine:
```bash
git clone https://github.com/your-username/robot_dart.git
```

### 3. Create a Branch
Create a new branch for your feature or bugfix:
```bash
git checkout -b feature/your-feature-name
```

### 4. Make Changes
Implement your changes in your branch.

### 5. Commit Your Changes
Commit your changes with a descriptive commit message:
```bash
git commit -m "Add feature X"
```

### 6. Push Your Changes
Push your changes to your forked repository:
```bash
git push origin feature/your-feature-name
```

### 7. Create a Pull Request
Go to the original repository on GitHub and open a Pull Request from your branch.

## Pull Request Guidelines
- Ensure your code passes all tests.
- Describe the purpose of the PR and what it aims to solve.
- Include any relevant issue numbers in the PR description.
- Follow the project’s coding standards.
- Make sure your PR is up-to-date with the latest `master` branch.

## Issue Reporting
When reporting an issue, please include:
- A clear and descriptive title.
- A detailed description of the problem.
- Steps to reproduce the issue.
- Any relevant logs or screenshots.
- Your system configuration (OS, compiler, etc.).

## Coding Standards
- Follow the existing [coding style](https://github.com/NOSALRO/robot_dart/blob/master/.clang-format) in the repository.
- Document your code with comments.
- Test your code thoroughly.

## License
By contributing, you agree that your contributions will be licensed under the same [BSD 2-Clause License](https://github.com/NOSALRO/robot_dart?tab=BSD-2-Clause-1-ov-file#readme) that covers the project.

45 changes: 34 additions & 11 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,35 @@ on:
push:
branches:
- "**"
paths:
- 'cmake/**'
- 'src/examples/**'
- 'src/python/**'
- 'src/robot_dart/**'
- 'src/tests/**'
- 'src/utheque/**'
- 'utheque/**'
- 'ci/**'
- 'waf_tools/**'
- 'wscript'
- 'waf'
- '.github/workflows/ci_linux.yml'
pull_request:
branches:
- "**"
paths:
- 'cmake/**'
- 'src/examples/**'
- 'src/python/**'
- 'src/robot_dart/**'
- 'src/tests/**'
- 'src/utheque/**'
- 'utheque/**'
- 'ci/**'
- 'waf_tools/**'
- 'wscript'
- 'waf'
- '.github/workflows/ci_linux.yml'

jobs:
build:
Expand All @@ -18,12 +44,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
os: [ubuntu-22.04]
build_type: [Release]
build_python: [ON]
compiler: [gcc, clang]
magnum_gui: [ON, OFF]
dart_tag: ["v6.12.1"]
dart_tag: ["v6.13.2"]
env:
COMPILER: ${{ matrix.compiler }}
BUILD_TYPE: ${{ matrix.build_type }}
Expand All @@ -34,21 +60,18 @@ jobs:
CI_HOME: ${{github.workspace}}
DART_DIR: "/home/runner/.dart_install/share/dart/cmake"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Ubuntu packages
run: ${{github.workspace}}/ci/install_packages.sh
- name: Cache DART
id: cache-dart
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.dart_install
key: dart-${{ matrix.dart_tag }}-${{ matrix.compiler }}-py3_${{ matrix.build_python }}-${{ matrix.os }}
- name: Build DART
if: steps.cache-dart.outputs.cache-hit != 'true'
run: ${{github.workspace}}/ci/install_dart_latest.sh
- name: Build pybind11
if: steps.cache-dart.outputs.cache-hit == 'true'
run: ${{github.workspace}}/ci/install_pybind11.sh
run: ${{github.workspace}}/ci/install_dart_latest.sh /home/runner/.dart_install ~/.deps $DART_TAG
- name: Build Magnum
run: if [ "$MAGNUM_GUI" = "ON" ]; then ${{github.workspace}}/ci/install_magnum.sh ; fi
- name: Build robot_dart
Expand All @@ -63,9 +86,9 @@ jobs:
fi
cd ${{github.workspace}}
if [ "$BUILD_PYTHON" = "ON" ]; then
./waf configure --python --prefix=/usr --dart=~/.dart_install ;
./waf configure --tests --python --prefix=/usr --dart=~/.dart_install ;
else
./waf configure --prefix=/usr --dart=~/.dart_install ;
./waf configure --tests --prefix=/usr --dart=~/.dart_install ;
fi
./waf
- name: Run tests
Expand All @@ -89,6 +112,6 @@ jobs:
if [ "$BUILD_PYTHON" = "ON" ]; then
python_dist_dir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True, prefix=''))")
export PYTHONPATH=/home/runner/.dart_install/$python_dist_dir
python ${{github.workspace}}/src/python/ci.py
python ${{github.workspace}}/src/examples/python/ci.py
fi
8 changes: 4 additions & 4 deletions .github/workflows/ci_linux_dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
os: [ubuntu-22.04]
build_type: [Release]
build_python: [ON]
compiler: [gcc, clang]
dart_tag: ["v6.12.1"]
dart_tag: ["v6.13.2"]
env:
COMPILER: ${{ matrix.compiler }}
BUILD_TYPE: ${{ matrix.build_type }}
Expand All @@ -28,12 +28,12 @@ jobs:
CI_HOME: ${{github.workspace}}
DART_DIR: "/home/runner/.dart_install/share/dart/cmake"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Ubuntu packages
run: ${{github.workspace}}/ci/install_packages.sh
- name: Cache DART
id: cache-dart
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.dart_install
key: dart-${{ matrix.dart_tag }}-${{ matrix.compiler }}-py3_${{ matrix.build_python }}-${{ matrix.os }}
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/ci_mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# https://help.github.com/en/articles/workflow-syntax-for-github-actions

name: CI MacOS

on:
push:
branches:
- "**"
paths:
- 'cmake/**'
- 'src/examples/**'
- 'src/python/**'
- 'src/robot_dart/**'
- 'src/tests/**'
- 'src/utheque/**'
- 'utheque/**'
- 'ci/**'
- 'waf_tools/**'
- 'wscript'
- 'waf'
- '.github/workflows/ci_mac.yml'
pull_request:
branches:
- "**"
paths:
- 'cmake/**'
- 'src/examples/**'
- 'src/python/**'
- 'src/robot_dart/**'
- 'src/tests/**'
- 'src/utheque/**'
- 'utheque/**'
- 'ci/**'
- 'waf_tools/**'
- 'wscript'
- 'waf'
- '.github/workflows/ci_mac.yml'

jobs:
build:
if: github.event_name != 'workflow_dispatch'
name: OS:${{ matrix.os }}-Magnum:${{ matrix.magnum_gui }}-Build:${{ matrix.build_type }}-Python:${{ matrix.build_python }}-Compiler:${{ matrix.compiler }}-DART:${{ matrix.dart_tag }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-12]
build_type: [Release]
build_python: [OFF] # Let's remove python for now from Mac CI
compiler: [gcc, clang]
magnum_gui: [ON, OFF]
env:
COMPILER: ${{ matrix.compiler }}
BUILD_TYPE: ${{ matrix.build_type }}
BUILD_PYTHON: ${{ matrix.build_python }}
MAGNUM_GUI: ${{ matrix.magnum_gui }}
DART_TAG: ${{ matrix.dart_tag }}
CI_HOME: ${{github.workspace}}
steps:
- uses: actions/checkout@v4
- name: Install deps
run: brew install binutils pybind11
- name: Install numpy
run: python -m pip install --upgrade pip && pip3 install numpy
- name: Install DART
run: |
if [ "$BUILD_PYTHON" = "ON" ]; then
brew install dartsim --only-dependencies && pip3 install dartpy ;
else
brew install dartsim ;
fi
- name: Build Magnum
run: if [ "$MAGNUM_GUI" = "ON" ]; then brew install sdl2 glfw eigen glm bullet assimp devil faad2 freetype glslang harfbuzz libpng libspng jpeg openexr spirv-tools zstd webp python-setuptools && ${{github.workspace}}/ci/install_magnum.sh /usr/local ; fi
- name: Build robot_dart
run: |
if [ "$COMPILER" = "gcc" ]; then
export CC=/usr/bin/gcc && export CXX=/usr/bin/g++
fi
if [ "$COMPILER" = "clang" ]; then
export CC=/usr/bin/clang && export CXX=/usr/bin/clang++
fi
cd ${{github.workspace}}
if [ "$BUILD_PYTHON" = "ON" ]; then
./waf configure --tests --python --prefix=/usr/local ;
else
./waf configure --tests --prefix=/usr/local ;
fi
./waf
- name: Run tests
run: ./waf --tests
- name: Build examples
run: ./waf examples
- name: Install
run: sudo ./waf install
- name: Run CMake
run: |
if [ "$COMPILER" = "gcc" ]; then
export CC=/usr/bin/gcc && export CXX=/usr/bin/g++
fi
if [ "$COMPILER" = "clang" ]; then
export CC=/usr/bin/clang && export CXX=/usr/bin/clang++
fi
cd ${{github.workspace}}/cmake/example && mkdir -p build && cd build && cmake .. && make -j4
cd ${{github.workspace}}/cmake/example_utheque && mkdir -p build && cd build && cmake .. && make -j4
- name: Run Python
run: |
if [ "$BUILD_PYTHON" = "ON" ]; then
python ${{github.workspace}}/src/examples/python/ci.py
fi
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ build
*.pyc
res/nao_meshes
.vscode
paper/*.crossref
paper/*.pdf
paper/*.tex
Loading

0 comments on commit e5b157b

Please sign in to comment.