Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add orchestrator helper library #4

Merged
merged 6 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

RUN apt update && apt install -y texlive texlive-latex-extra texlive-plain-generic python3-pip make ghostscript imagemagick python3-typing-extensions python3-networkx python3-matplotlib sudo
RUN pip install --upgrade sphinx~=7.0 deepdiff jsonschema sphinx-jsonschema
RUN apt update && apt install -y texlive texlive-latex-extra texlive-plain-generic python3-pip make ghostscript imagemagick python3-typing-extensions python3-networkx python3-matplotlib sudo doxygen
RUN pip install --upgrade sphinx~=7.0 deepdiff jsonschema sphinx-jsonschema breathe
RUN sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml

# Create the user
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
container: ros:iron
steps:
- name: Install latex and pip
run: sudo apt update && sudo apt install -y texlive texlive-latex-extra texlive-plain-generic python3-pip make ghostscript imagemagick python3-typing-extensions python3-networkx python3-matplotlib
run: sudo apt update && sudo apt install -y texlive texlive-latex-extra texlive-plain-generic python3-pip make ghostscript imagemagick python3-typing-extensions python3-networkx python3-matplotlib doxygen
- name: Install sphinx
run: pip install --upgrade sphinx~=7.0 deepdiff jsonschema sphinx-jsonschema
run: pip install --upgrade sphinx~=7.0 deepdiff jsonschema sphinx-jsonschema breathe
- name: Adjust imagemagick security policy to allow PDF -> PNG conversion
run: sudo sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml
- name: Check out repository code
Expand All @@ -31,6 +31,12 @@ jobs:
. /opt/ros/$ROS_DISTRO/setup.sh
cd $GITHUB_WORKSPACE
colcon build --packages-up-to orchestrator --packages-skip orchestrator
- name: Build doxygen docs for c++ components
run: |
. /opt/ros/$ROS_DISTRO/setup.sh
. $GITHUB_WORKSPACE/install/setup.sh
cd $GITHUB_WORKSPACE/ros2/orchestrator_helper
doxygen
- name: Build docs
run: |
. /opt/ros/$ROS_DISTRO/setup.sh
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,22 @@ jobs:
cd $GITHUB_WORKSPACE
. ./install/setup.sh
FORCE_COLOR=3 pyright --ignoreexternal --verifytypes orchestrator

cpp-helper-build:
runs-on: ubuntu-22.04
container: ros:iron
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install dependencies
run: |
. /opt/ros/$ROS_DISTRO/setup.sh
cd $GITHUB_WORKSPACE
apt update
rosdep update
rosdep install --from-paths ros2 --ignore-packages-from-source --verbose --default-yes --skip-keys="aduulm_cmake_tools aduulm_messages"
- name: Build orchestrator_helper
run: |
. /opt/ros/$ROS_DISTRO/setup.sh
cd $GITHUB_WORKSPACE
colcon build --packages-up-to orchestrator_helper
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'sphinx.ext.autodoc',
'sphinx-jsonschema',
'sphinx.ext.intersphinx',
'breathe'
]
autoclass_content = 'both'
sys.path.insert(0, '../ros2/orchestrator')
Expand All @@ -36,6 +37,11 @@
}
intersphinx_disabled_reftypes = ["*"]

breathe_projects = {
"orchestrator_helper": "../ros2/orchestrator_helper/docs/xml"
}
breathe_default_project = "orchestrator_helper"

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
numfig = True
Expand Down
14 changes: 14 additions & 0 deletions docs/user_docs/cpp_helpers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
******************
C++ Helper Classes
******************

.. doxygenclass:: OrchestratedPublisher
:project: orchestrator_helper
:members:
:undoc-members:


.. doxygenclass:: OrchestratorHelper
:project: orchestrator_helper
:members:
:undoc-members:
1 change: 1 addition & 0 deletions docs/user_docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ User Docs

adapting_data_sources
adapting_nodes
cpp_helpers
launch_config
16 changes: 3 additions & 13 deletions ros2/orchestrator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
cmake_minimum_required(VERSION 3.10)
project(orchestrator)

find_package(aduulm_cmake_tools)
if (aduulm_cmake_tools_FOUND)
aduulm_init_ros2_package()
else ()
find_package(ament_cmake REQUIRED)
endif ()
find_package(ament_cmake REQUIRED)

install(DIRECTORY
schemas
config
DESTINATION share/${PROJECT_NAME}
)

if (aduulm_cmake_tools_FOUND)
aduulm_install_ros2_python_code("orchestrator")
aduulm_create_ros2_package()
else ()
ament_python_install_package("orchestrator")
ament_package()
endif ()
ament_python_install_package("orchestrator")
ament_package()
1 change: 0 additions & 1 deletion ros2/orchestrator/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>aduulm_cmake_tools</depend>
<depend>orchestrator_interfaces</depend>
<depend>python3-typing-extensions</depend>
<depend>python3-deepdiff</depend>
Expand Down
2 changes: 2 additions & 0 deletions ros2/orchestrator_helper/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# doxygen generated docs
docs
30 changes: 30 additions & 0 deletions ros2/orchestrator_helper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.10)
project(orchestrator_helper)

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

ament_auto_add_library(${PROJECT_NAME} INTERFACE)

target_include_directories(${PROJECT_NAME}
INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")

install(
DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
)

ament_auto_package()
Loading