Skip to content

Commit 5c82573

Browse files
committed
Initial release
0 parents  commit 5c82573

File tree

71 files changed

+7634
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+7634
-0
lines changed

.clang-format

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
AccessModifierOffset: -1
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlines: Left
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: true
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: true
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: true
20+
AlwaysBreakTemplateDeclarations: true
21+
BinPackArguments: true
22+
BinPackParameters: true
23+
BreakBeforeBraces: Custom
24+
BraceWrapping:
25+
AfterClass: true
26+
AfterControlStatement: true
27+
AfterEnum: true
28+
AfterFunction: true
29+
AfterNamespace: true
30+
AfterObjCDeclaration: true
31+
AfterStruct: true
32+
AfterUnion: true
33+
AfterExternBlock: true
34+
BeforeCatch: true
35+
BeforeElse: true
36+
IndentBraces: false
37+
SplitEmptyFunction: true
38+
SplitEmptyRecord: true
39+
SplitEmptyNamespace: true
40+
BreakBeforeBinaryOperators: None
41+
BreakBeforeBraces: Attach
42+
BreakBeforeInheritanceComma: false
43+
BreakBeforeTernaryOperators: true
44+
BreakConstructorInitializersBeforeComma: false
45+
BreakConstructorInitializers: BeforeColon
46+
BreakAfterJavaFieldAnnotations: false
47+
BreakStringLiterals: true
48+
ColumnLimit: 80
49+
CommentPragmas: '^ IWYU pragma:'
50+
CompactNamespaces: false
51+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
52+
ConstructorInitializerIndentWidth: 4
53+
ContinuationIndentWidth: 4
54+
Cpp11BracedListStyle: true
55+
DerivePointerAlignment: true
56+
DisableFormat: false
57+
ExperimentalAutoDetectBinPacking: false
58+
FixNamespaceComments: true
59+
ForEachMacros:
60+
- foreach
61+
- Q_FOREACH
62+
- BOOST_FOREACH
63+
IncludeBlocks: Preserve
64+
IncludeCategories:
65+
- Regex: '^<ext/.*\.h>'
66+
Priority: 2
67+
- Regex: '^<.*\.h>'
68+
Priority: 1
69+
- Regex: '^<.*'
70+
Priority: 2
71+
- Regex: '.*'
72+
Priority: 3
73+
IncludeIsMainRegex: '([-_](test|unittest))?$'
74+
IndentCaseLabels: true
75+
IndentPPDirectives: None
76+
IndentWidth: 2
77+
IndentWrappedFunctionNames: false
78+
JavaScriptQuotes: Leave
79+
JavaScriptWrapImports: true
80+
KeepEmptyLinesAtTheStartOfBlocks: false
81+
MacroBlockBegin: ''
82+
MacroBlockEnd: ''
83+
MaxEmptyLinesToKeep: 1
84+
NamespaceIndentation: None
85+
ObjCBlockIndentWidth: 2
86+
ObjCSpaceAfterProperty: false
87+
ObjCSpaceBeforeProtocolList: false
88+
PenaltyBreakAssignment: 2
89+
PenaltyBreakBeforeFirstCallParameter: 1
90+
PenaltyBreakComment: 300
91+
PenaltyBreakFirstLessLess: 120
92+
PenaltyBreakString: 1000
93+
PenaltyExcessCharacter: 1000000
94+
PenaltyReturnTypeOnItsOwnLine: 200
95+
PointerAlignment: Left
96+
RawStringFormats:
97+
- Delimiters:
98+
- pb
99+
Language: TextProto
100+
BasedOnStyle: google
101+
ReflowComments: true
102+
SortIncludes: true
103+
SortUsingDeclarations: true
104+
SpaceAfterCStyleCast: false
105+
SpaceAfterTemplateKeyword: true
106+
SpaceBeforeAssignmentOperators: true
107+
SpaceBeforeParens: ControlStatements
108+
SpaceInEmptyParentheses: false
109+
SpacesBeforeTrailingComments: 2
110+
SpacesInAngles: false
111+
SpacesInContainerLiterals: true
112+
SpacesInCStyleCastParentheses: false
113+
SpacesInParentheses: false
114+
SpacesInSquareBrackets: false
115+
Standard: Auto
116+
TabWidth: 2
117+
UseTab: Never
118+
...

.clang-tidy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See: http://clang.llvm.org/extra/clang-tidy/
2+
# clang-tidy-4.0 src/pvt_engine/*.cc -- -std=c++14 -Irefactor/common/ -Irefactor/common/libswiftnav -Iinclude/ -Iinclude/libswiftnav/ -isystem -third_party/ -isystem./libfec/include/ -Ithird_party/Optional -isystem./third_party/json/src/ -isystem./third_party/eigen/
3+
#
4+
5+
Checks: "-*,cert-*,google-*,misc-*,readability-*,clang-analyzer-*,modernize-*,performance-*,-clang-analyzer-alpha*,cppcoreguidelines-*,cert-*,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-vararg,-modernize-pass-by-value,-modernize-deprecated-headers,-modernize-use-default-member-init,-modernize-redundant-void-arg,-modernize-use-using,-modernize-use-equals-delete,-modernize-use-equals-default,-modernize-use-bool-literals,-modernize-use-auto,-modernize-use-emplace,-cppcoreguidelines-special-member-functions,-cppcoreguidelines-pro-type-member-init,-readability-avoid-const-params-in-decls,-readability-non-const-parameter,-readability-redundant-member-init,-readability-redundant-declaration,-cert-err34-c,-cert-err58-cpp,-performance-unnecessary-value-param,-google-runtime-references,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-core.uninitialized.Assign,-cppcoreguidelines-owning-memory,-clang-analyzer-core.uninitialized.UndefReturn,-cert-dcl21-cpp,-modernize-return-braced-init-list,-cert-dcl03-c,-misc-static-assert,-cppcoreguidelines-pro-type-static-cast-downcast,-clang-analyzer-optin.performance.Padding,-cppcoreguidelines-pro-type-union-access"
6+
HeaderFilterRegex: '.*'
7+
AnalyzeTemporaryDtors: true
8+
...

.github/workflows/build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
env:
9+
SONAR_SCANNER_VERSION: 4.7.0.2747
10+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
12+
PARALLEL_THREADS: 2
13+
jobs:
14+
build-master:
15+
name: Build master
16+
runs-on: ubuntu-latest
17+
if: github.ref == 'refs/heads/master'
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
22+
- name: Code coverage
23+
run: |
24+
docker build -t swiftnav-ros2 --build-arg UID=$UID --build-arg SONAR_SCANNER_VERSION=$SONAR_SCANNER_VERSION - < Dockerfile
25+
docker run --rm -v $PWD:/mnt/workspace/src/swiftnav-ros2 swiftnav-ros2:latest /bin/bash ./code_coverage.sh $GITHUB_TOKEN \
26+
$SONAR_TOKEN \
27+
$PARALLEL_THREADS
28+
build-pr:
29+
name: Build pull request
30+
runs-on: ubuntu-latest
31+
if: github.ref != 'refs/heads/master'
32+
steps:
33+
- uses: actions/checkout@v2
34+
with:
35+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
36+
- name: Code coverage
37+
env:
38+
PR_BRANCH_NAME: ${{ github.head_ref }}
39+
run: |
40+
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
41+
docker build -t swiftnav-ros2 --build-arg UID=$UID --build-arg SONAR_SCANNER_VERSION=$SONAR_SCANNER_VERSION - < Dockerfile
42+
docker run --rm -v $PWD:/mnt/workspace/src/swiftnav-ros2 swiftnav-ros2:latest /bin/bash ./code_coverage.sh $GITHUB_TOKEN \
43+
$SONAR_TOKEN \
44+
$PARALLEL_THREADS \
45+
$PR_BRANCH_NAME \
46+
$PR_NUMBER
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sonar.projectKey=swift-nav_swiftnav-ros2
2+
sonar.organization=swift-nav
3+
4+
# This is the name and version displayed in the SonarCloud UI.
5+
sonar.projectName=swiftnav-ros2
6+
sonar.projectVersion=1.0
7+
8+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
9+
sonar.sources=src
10+
11+
# Encoding of the source code. Default is default system encoding
12+
sonar.sourceEncoding=UTF-8

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# Code coverage
35+
*.gcov
36+
37+
# Folders
38+
build/
39+
install/
40+
log/
41+
.vscode/

CHANGELOG.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CHANGE LOG
2+
=========
3+
4+
Version 1.0.0 (2023-04-04)
5+
-------------
6+
7+
Changes
8+
9+
- Initial release.
10+
11+
Known Issues
12+
13+
- SBP recording saves all SBP messages with sender ID equal zero.
14+
- Driver builds on ROS 2 Foxy with compilation warnings.

0 commit comments

Comments
 (0)