From f6f89fc99494fa4f799ba33972fa0c244bb9b38b Mon Sep 17 00:00:00 2001 From: Wojciech Kwolek Date: Fri, 19 Mar 2021 10:48:07 +0100 Subject: [PATCH] initial commit --- .devcontainer/Dockerfile | 17 +++++++++++ .devcontainer/devcontainer.json | 37 +++++++++++++++++++++++ .gitignore | 53 +++++++++++++++++++++++++++++++++ .vscode/c_cpp_properties.json | 17 +++++++++++ .vscode/settings.json | 5 ++++ src/ros2aria/CMakeLists.txt | 43 ++++++++++++++++++++++++++ src/ros2aria/package.xml | 18 +++++++++++ src/ros2aria/src/ros2aria.cpp | 10 +++++++ 8 files changed, 200 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .gitignore create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json create mode 100644 src/ros2aria/CMakeLists.txt create mode 100644 src/ros2aria/package.xml create mode 100644 src/ros2aria/src/ros2aria.cpp diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..a34445d --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,17 @@ +FROM athackst/ros2:foxy-dev + +# ** [Optional] Uncomment this section to install additional packages. ** +# +# ENV DEBIAN_FRONTEND=noninteractive +# RUN apt-get update \ +# && apt-get -y install --no-install-recommends \ +# # +# # Clean up +# && apt-get autoremove -y \ +# && apt-get clean -y \ +# && rm -rf /var/lib/apt/lists/* +# ENV DEBIAN_FRONTEND=dialog + +# Set up auto-source of workspace for ros user +ARG WORKSPACE +RUN echo "if [ -f ${WORKSPACE}/install/setup.bash ]; then source ${WORKSPACE}/install/setup.bash; fi" >> /home/ros/.bashrc diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..362c149 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,37 @@ +// See https://aka.ms/vscode-remote/devcontainer.json for format details. +{ + "dockerFile": "Dockerfile", + "build": { + "args": { + "WORKSPACE": "${containerWorkspaceFolder}" + } + }, + "remoteUser": "ros", + "runArgs": [ + "--network=host", + "--cap-add=SYS_PTRACE", + "--security-opt=seccomp:unconfined", + "--security-opt=apparmor:unconfined", + "--volume=/tmp/.X11-unix:/tmp/.X11-unix" + ], + "containerEnv": { + "DISPLAY": "${localEnv:DISPLAY}" + }, + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + }, + "extensions": [ + "dotjoshjohnson.xml", + "laurenttreguier.uncrustify", + "ms-azuretools.vscode-docker", + "ms-iot.vscode-ros", + "ms-python.python", + "ms-vscode.cpptools", + "redhat.vscode-yaml", + "smilerobotics.urdf", + "streetsidesoftware.code-spell-checker", + "twxs.cmake", + "yzhang.markdown-all-in-one" + ] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc99fc9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,53 @@ +devel/ +logs/ +build/ +install/ +bin/ +lib/ +log/ +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 +build_isolated/ +devel_isolated/ + +# Generated by dynamic reconfigure +*.cfgc +/cfg/cpp/ +/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 diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..e083a4a --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "browse": { + "databaseFilename": "", + "limitSymbolsToIncludedHeaders": true + }, + "includePath": [ + "/opt/ros/foxy/include/**", + "/workspaces/ros2aria/src/ros2aria/include/**", + "/usr/include/**" + ], + "name": "ROS" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6b40311 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "python.autoComplete.extraPaths": [ + "/opt/ros/foxy/lib/python3.8/site-packages" + ] +} \ No newline at end of file diff --git a/src/ros2aria/CMakeLists.txt b/src/ros2aria/CMakeLists.txt new file mode 100644 index 0000000..0f92bfb --- /dev/null +++ b/src/ros2aria/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 3.5) +project(ros2aria) + +# Default to C99 +if(NOT CMAKE_C_STANDARD) + set(CMAKE_C_STANDARD 99) +endif() + +# Default to C++14 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 14) +endif() + +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic) +endif() + +# find dependencies +find_package(ament_cmake REQUIRED) +# uncomment the following section in order to fill in +# further dependencies manually. +# find_package( REQUIRED) + +add_executable(ros2aria src/ros2aria.cpp) +target_include_directories(ros2aria PUBLIC + $ + $) + +install(TARGETS ros2aria + DESTINATION lib/${PROJECT_NAME}) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + # the following line skips the linter which checks for copyrights + # uncomment the line when a copyright and license is not present in all source files + #set(ament_cmake_copyright_FOUND TRUE) + # the following line skips cpplint (only works in a git repo) + # uncomment the line when this package is not in a git repo + #set(ament_cmake_cpplint_FOUND TRUE) + ament_lint_auto_find_test_dependencies() +endif() + +ament_package() diff --git a/src/ros2aria/package.xml b/src/ros2aria/package.xml new file mode 100644 index 0000000..50e5751 --- /dev/null +++ b/src/ros2aria/package.xml @@ -0,0 +1,18 @@ + + + + ros2aria + 0.0.0 + TODO: Package description + ros + TODO: License declaration + + ament_cmake + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/src/ros2aria/src/ros2aria.cpp b/src/ros2aria/src/ros2aria.cpp new file mode 100644 index 0000000..1906f0f --- /dev/null +++ b/src/ros2aria/src/ros2aria.cpp @@ -0,0 +1,10 @@ +#include + +int main(int argc, char ** argv) +{ + (void) argc; + (void) argv; + + printf("hello world ros2aria package\n"); + return 0; +}