Skip to content

Commit

Permalink
Merge branch 'feature/solution_simulation'
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/CMakeLists.txt
#	test/CMakeLists.txt
  • Loading branch information
2maz committed Jul 26, 2024
2 parents 5a46d1e + d697e0c commit 13e6735
Show file tree
Hide file tree
Showing 242 changed files with 184,476 additions and 611 deletions.
3 changes: 3 additions & 0 deletions .ci/deb_blacklist.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
- base/cmake
- knowledge_reasoning/owlapi
- knowledge_reasoning/moreorg
- tools/graph_analysis
- tools/gecode
23 changes: 23 additions & 0 deletions .ci/prepare-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

apt update
apt upgrade -y

export DEBIAN_FRONTEND=noninteractive
apt install -y ruby ruby-dev wget tzdata locales g++ autotools-dev make cmake sudo git python3 pkg-config vim

echo "Europe/Berlin" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata

export LANGUAGE=de_DE.UTF-8
export LANG=de_DE.UTF-8
export LC_ALL=de_DE.UTF-8

locale-gen de_DE.UTF-8
dpkg-reconfigure locales

useradd -ms /bin/bash docker
echo "docker ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

git config --global user.email "[email protected]"
git config --global user.name "Rock CI"
137 changes: 137 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
...

43 changes: 33 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,41 @@ name: test
on: [push]
jobs:
unittests:
runs-on: ubuntu-18.04
strategy:
matrix:
os: ["ubuntu:20.04", "ubuntu:22.04"]
package: ["planning/templ"]
seed_config: [".ci/autoproj-config.yml"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: current_branch
- name: Checkout
uses: actions/checkout@v4
with:
repository: 2maz/rock-github-workflow
path: rock-github-workflow
ref: test

- name: Apply package / branch specific overrides
run:
if [ -d .ci/overrides.d/ ]; then
echo "Copying overrides from .ci/"
cp -R .ci/overrides.d/* rock-github-workflow/docker/overrides.d/;
fi

- name: Build
run: docker build -t rock/${{ matrix.os }} -f rock-github-workflow/docker/Dockerfile .
--build-arg PKG_NAME=${{ matrix.package }}
--build-arg PKG_BRANCH=${{ github.ref_name }}
--build-arg BASE_IMAGE=${{ matrix.os }}
--build-arg SEED_CONFIG=${{ matrix.seed_config }}
--build-arg BUILDCONF_URL=https://github.com/2maz/templ-buildconf
--build-arg BUILDCONF_BRANCH=test

- name: Build 18.04
run: docker build -t 2maz/templ -f Dockerfile . --build-arg PKG_BRANCH=${{ steps.current_branch.outputs.branch }}
- name: Test
run: docker run rock/${{ matrix.os }}
/bin/bash -c
"source /home/docker/rock_test/env.sh; BOOST_TEST_CATCH_SYSTEM_ERRORS=\"no\" /home/docker/rock_test/${{ matrix.package }}/build/test/templ-test --run_test='!solution_simulation*' --log_level=all"

- name: Test-on-ubuntu:18.04
run: docker run 2maz/templ /bin/bash -c "source /home/docker/rock_test/env.sh; cd /home/docker/rock_test/planning/templ; ./build/test/templ-test --log_level=all"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
build/
*.sw?
scripts/output/
scripts/__pycache__
scripts/analyse/__pycache__
scripts/analyse/output
25 changes: 25 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Roehr
given-names: Thomas M.
orcid: https://orcid.org/0000-0002-7715-7052
title: "Active Exploitation of Redundancies in Reconfigurable Multirobot Systems"
version: 1.0.0
doi: 10.1109/TRO.2021.3118284
date-released: 2021-11-01
preferred-citation:
type: article
authors:
- family-names: Roehr
given-names: Thomas M.
orcid: https://orcid.org/0000-0002-7715-7052
doi: 10.1109/TRO.2021.3118284
journal: "IEEE Transactions on Robotics"
month: 11
start: 180 # First page number
end: 196 # Last page number
title: "Active Exploitation of Redundancies in Reconfigurable Multirobot Systems"
issue: 1
volume: 38
year: 2022
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# CMakeLists.txt has to be located in the project folder and cmake has to be
# executed from 'project/build' with 'cmake ../'.
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.10)
project(templ
VERSION 0.1
DESCRIPTION "TemPl - Planning for Reconfigurable Multi-Robot Systems"
)
set(CMAKE_COMPILE_EXPORT_COMMANDS on)
set(ROCK_TEST_ENABLED on)
find_package(Rock)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_definitions(-Wall) # -Wpedantic)
add_definitions(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
set(CMAKE_BUILD_TYPE Release)

if(COVERAGE)
if(CMAKE_BUILD_TYPE MATCHES Debug)
Expand All @@ -34,5 +33,7 @@ if(COVERAGE)
endif()

rock_init()
rock_find_qt4()
rock_feature(NOCURDIR)
rock_find_qt4(OPTIONAL QtCore QtGui QtXml QtSvg)
rock_find_qt5(OPTIONAL Core Gui Xml Widgets PrintSupport Svg)
rock_standard_layout()
28 changes: 15 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

MAINTAINER 2maz "https://github.com/2maz"

Expand All @@ -8,6 +8,12 @@ MAINTAINER 2maz "https://github.com/2maz"

ENV PKG_NAME="planning/templ"

# Github repos
ENV PKG_PROJECT="rock-planning"
ENV PKG_BUILDCONF="planning-templ-buildconf"
# Default buildconf branch
ENV PKG_BUILDCONF_BRANCH=main

# Optional arguments
ARG PKG_BRANCH="main"
ENV PKG_BRANCH=${PKG_BRANCH}
Expand All @@ -16,14 +22,8 @@ ARG PKG_PULL_REQUEST="false"
ENV PKG_PULL_REQUEST=${PKG_PULL_REQUEST}
## END ARGUMENTS

RUN apt update
RUN apt upgrade -y
RUN export DEBIAN_FRONTEND=noninteractive; apt install -y ruby ruby-dev wget tzdata locales g++ autotools-dev make cmake sudo git python3 pkg-config
RUN echo "Europe/Berlin" > /etc/timezone; dpkg-reconfigure -f noninteractive tzdata
RUN export LANGUAGE=de_DE.UTF-8; export LANG=de_DE.UTF-8; export LC_ALL=de_DE.UTF-8; locale-gen de_DE.UTF-8; DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales

RUN useradd -ms /bin/bash docker
RUN echo "docker ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
COPY .ci/prepare-docker.sh prepare-docker.sh
RUN ./prepare-docker.sh

USER docker
WORKDIR /home/docker
Expand All @@ -40,17 +40,19 @@ RUN wget https://raw.githubusercontent.com/rock-core/autoproj/master/bin/autopro

RUN mkdir -p /home/docker/rock_test
WORKDIR /home/docker/rock_test

# Use the existing seed configuration
COPY --chown=docker .ci/autoproj-config.yml seed-config.yml

ENV AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR 1
ENV AUTOPROJ_NONINTERACTIVE 1
RUN ruby /home/docker/autoproj_bootstrap git https://github.com/2maz/templ-buildconf.git branch=main --seed-config=seed-config.yml
RUN if git ls-remote --heads https://github.com/${PKG_PROJECT}/${PKG_BUILDCONF}.git | grep "${PKG_BRANCH}" > /dev/null; then export PKG_BUILDCONF_BRANCH="${PKG_BRANCH}"; fi; ruby /home/docker/autoproj_bootstrap git https://github.com/$PKG_PROJECT/$PKG_BUILDCONF.git branch=${PKG_BUILDCONF_BRANCH} --seed-config=seed-config.yml
RUN sed -i "s#rock\.core#knowledge_reasoning/moreorg\n - ${PKG_NAME}#g" autoproj/manifest
RUN sed -i "s#testing#${PKG_BRANCH}#g" autoproj/overrides.yml
RUN sed -zi "s#planning/templ:\n\(\s\+\)branch:[^\n]\+#planning/templ:\n\1branch: ${PKG_BRANCH}#g" autoproj/overrides.yml
COPY --chown=docker .ci/deb_blacklist.yml autoproj/deb_blacklist.yml

# Activate testing
### Activate testing
RUN /bin/bash -c "source env.sh; autoproj test enable ${PKG_NAME}"
## Update
#### Update
RUN /bin/bash -c "source env.sh; autoproj update; autoproj osdeps"
RUN /bin/bash -c "source env.sh; autoproj osdeps; amake"
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ to deal with the XML format),
and a mission generator to automatically generate simple as well as complex test missions.

## Installation
Please use autoproj to bootstrap and include the package-set
[rock](https://github.com/rock-planning/planning-templ) in your manifest.
Afterwards you can install TemPl via:
Please use autoproj to bootstrap clone and include this package as
[planning/templ](https://github.com/rock-planning/planning-templ) in your manifest.
Afterwards you can build and install TemPl via:
```
amake planning/templ
```
Expand Down Expand Up @@ -96,7 +96,7 @@ TemPl:
```

### Templ GUI
The graphical user interface templ-gui allows you to load solutions, so that you can
The graphical user interface templ-gui-qt5 allows you to load solutions, so that you can
inspect them and achieve a better understanding of the solutions.
The graphical interface will also permit the creation of missions via the
MissionEditor.
Expand Down Expand Up @@ -328,19 +328,21 @@ All new features need to be accompanied by a corresponding unit test.
If you use TemPl for a scientific publication, please cite the following paper:

```bibtex
@article{Roehr:2018:IBERAMIA,
@article{Roehr_Active_Exploitation_of_2022,
author = {Roehr, Thomas M.},
doi = {10.4114/intartif.vol21iss62pp25-39},
journal = {Inteligencia Artificial, Revista Iberoamericana de Inteligencia Artificial},
mendeley-groups = {all},
number = {62},
pages = {25--39},
title = {{A Constraint-based Mission Planning Approach for Reconfigurable Multi-Robot Systems}},
volume = {21},
year = {2018}
doi = {10.1109/TRO.2021.3118284},
journal = {IEEE Transactions on Robotics},
month = nov,
number = {1},
pages = {180--196},
title = {{Active Exploitation of Redundancies in Reconfigurable Multirobot Systems}},
volume = {38},
year = {2022}
}
```

# Copyright

Copyright (c) 2022- Thomas M. Roehr and Contributors, Simula Research Laboratory

Copyright (c) 2015-2021 Thomas M. Roehr, DFKI GmbH Robotics Innovation Center
Loading

0 comments on commit 13e6735

Please sign in to comment.