Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
h3ndrk authored Dec 3, 2023
0 parents commit 24e56b7
Show file tree
Hide file tree
Showing 31 changed files with 1,025 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
Language: Cpp
BasedOnStyle: Google
ColumnLimit: 120
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Add git commit hashes to ignore for blame
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/1_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: "\U0001F41B Bug report"
about: Report a misbehavior or other bug
labels: 'bug'
---
# Summary
<!--- Provide a general summary of the bug report -->

## Expected behavior
<!--- Describe what you expected to happen -->

## Current behavior
<!--- Describe what actually happened instead of the expected behavior -->

## Steps to Reproduce
<!--- An unambiguous set of steps to reproduce this bug. -->
<!--- Code-snippets, screenshots or other details are welcome if needed. -->
1.
2.
3.

## Possible Solution
<!--- Optional: If you already have an idea, you can suggest a fix/reason for the bug -->
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/2_feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "\U0001F680 Feature request"
about: Suggest an idea for this project
labels: 'enhancement'
---
# Summary
<!--- Provide a general summary of the feature request -->

## Is your feature request related to a problem?
<!-- Please describe the problem you are trying to solve. -->

## Describe the solution you'd like
<!-- Please describe the desired behavior. -->

## Describe alternatives you've considered
<!-- Please describe alternative solutions or features you have considered. -->
<!-- This is not strictly necessary but helps all of us get a different point-of-view -->
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/3_need_help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "⁉️ Help me"
about: "Get help with using or improving our software"
labels: 'question'
---
<!--- If you have a question about any of our projects that is not a bug report or feature request, you can write us an issue like this or send a message to info@bit-bots.de -->

# What I'm trying to do
<!--- Please describe what you're trying to do so we know what your problem is about -->

## What I've tried
<!--- If you tell us what you already tried or what documentation you already read, we are able to help you better by not pointing to information you already know.-->

## Additional context
<!--- If there's more to say, feel free to do so :) -->
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Summary
<!--- Provide a general summary of the changes -->

## Proposed changes
<!--- Describe your changes and why they are necessary. -->

## Related issues
<!--- Mention (link) related issues. -->
<!--- If you suggest a new feature, please discuss it in an issue first. -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->

## Checklist

- [ ] Run `colcon build`
- [ ] Write documentation
- [ ] Create issues for future work
- [ ] Test on your machine
- [ ] Test on the robot
- [ ] This PR is on our `Software` project board
16 changes: 16 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Code style checks

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install cppcheck
run: sudo apt install cppcheck -y
- uses: pre-commit/action@v3.0.0
200 changes: 200 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# auto-generated documentation
**/docs/_build
**/docs/_out
**/docs/cppapi
**/docs/pyapi

# auto-generated documentation
**/docs/_build
**/docs/_out
**/docs/cppapi
**/docs/pyapi

# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/*

# Sensitive or high-churn files:
.idea/dataSources/
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# Gradle:
.idea/gradle.xml
.idea/libraries

# Mongo Explorer plugin:
.idea/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### ROS template
build/
bin/
lib/
msg_gen/
srv_gen/
msg/*Action.msg
msg/*ActionFeedback.msg
msg/*ActionGoal.msg
msg/*ActionResult.msg
msg/*Feedback.msg
msg/*Goal.msg
msg/*Result.msg
msg/_*.py

# Generated by dynamic reconfigure
*.cfgc
/cfg/cpp/
/cfg/*.py

*/cfg/cpp/
*/src/*/cfg/*.py

# Ignore generated docs
*.dox
*.wikidoc

# eclipse stuff
.project
.cproject

# qcreator stuff
CMakeLists.txt.user

srv/_*.py
*.pcd
*.pyc
qtcreator-*
*.user

/planning/cfg
/planning/docs
/planning/src

*~

# Emacs
.#*

# Catkin custom files
CATKIN_IGNORE
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
.venv/
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject

# Ruff cache
.ruff_cache
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
hooks:
- id: ruff
args:
- "--fix"
- "--exit-non-zero-on-fix"
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-format
args:
- "-i"
- id: cppcheck
args:
- "--suppress=missingInclude"
- "--suppress=unmatchedSuppression"
- "--suppress=unusedFunction"
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Hamburg Bit-Bots

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
48 changes: 48 additions & 0 deletions bitbots_template_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 3.5)
project(bitbots_template_cpp)

# Add support for C++17
if (NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif ()

find_package(ament_cmake REQUIRED)
find_package(bitbots_docs REQUIRED)
find_package(generate_parameter_library REQUIRED)
find_package(rclcpp REQUIRED)

generate_parameter_library(
bitbots_template_cpp_parameters
config/bitbots_template_cpp_parameters.yaml
)

include_directories(include)

add_compile_options(-Wall -Werror -Wno-unused)

add_executable(template src/template.cpp)

target_link_libraries(
template
rclcpp::rclcpp
bitbots_template_cpp_parameters
)

## Specify libraries to link a library or executable target against
ament_target_dependencies(
template
ament_cmake
bitbots_docs
generate_parameter_library
rclcpp
)

enable_bitbots_docs()

install(TARGETS template
DESTINATION lib/${PROJECT_NAME})

install(DIRECTORY launch
DESTINATION share/${PROJECT_NAME})

ament_package()
Loading

0 comments on commit 24e56b7

Please sign in to comment.