-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from MrBearing/feat/ci_and_change_structure
Change structure and add CI
- Loading branch information
Showing
18 changed files
with
216 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: ci_humble | ||
|
||
on: | ||
push: | ||
branches: | ||
- "humble" | ||
pull_request: | ||
types: [opened, synchronize, labeled] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
if: | | ||
((github.event.action == 'labeled') && (github.event.label.name == 'TESTING') && (github.base_ref == 'humble' )) || | ||
((github.event.action == 'synchronize') && (github.base_ref == 'humble') && contains(github.event.pull_request.labels.*.name, 'TESTING')) || | ||
(github.ref_name == 'humble') | ||
container: | ||
image: osrf/ros:${{ matrix.ros_distribution }}-desktop | ||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04] | ||
ros_distribution: [humble] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y wget python3-vcstool python3-colcon-coveragepy-result | ||
- name: Build and Test | ||
uses: ros-tooling/[email protected] | ||
with: | ||
target-ros2-distro: ${{ matrix.ros_distribution }} | ||
import-token: ${{ secrets.GITHUB_TOKEN }} | ||
package-name: | | ||
chatgpt_ros_cpp | ||
chatgpt_ros_cpp_node | ||
chatgpt_ros_cpp_msgs | ||
chatgpt_ros_cpp_bringup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"browse": { | ||
"databaseFilename": "${default}", | ||
"limitSymbolsToIncludedHeaders": false | ||
}, | ||
"includePath": [ | ||
"/opt/ros/humble/include/**", | ||
"~/ws_humble/src/chatgpt_ros_cpp/chatgpt_ros_cpp/include/**", | ||
"/usr/include/**" | ||
], | ||
"name": "ROS", | ||
"intelliSenseMode": "gcc-x64", | ||
"compilerPath": "/usr/bin/gcc", | ||
"cStandard": "gnu11", | ||
"cppStandard": "c++14" | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"python.autoComplete.extraPaths": [ | ||
"/opt/ros/humble/lib/python3.10/site-packages", | ||
"/opt/ros/humble/local/lib/python3.10/dist-packages" | ||
], | ||
"python.analysis.extraPaths": [ | ||
"/opt/ros/humble/lib/python3.10/site-packages", | ||
"/opt/ros/humble/local/lib/python3.10/dist-packages" | ||
], | ||
"files.associations": { | ||
"array": "cpp", | ||
"*.tcc": "cpp", | ||
"memory": "cpp", | ||
"future": "cpp", | ||
"istream": "cpp", | ||
"functional": "cpp", | ||
"tuple": "cpp", | ||
"utility": "cpp", | ||
"variant": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# chatgpt_ros_cpp | ||
ROS for ChatGPT API in c++ | ||
|
||
ROS 2 service for ChatGPT API written in c++ | ||
|
||
## Usage | ||
|
||
``` | ||
ros2 launch chatgpt_ros_cpp chat.launch.py api_key:="YOUR_OPEN_AI_API_KEY" | ||
``` :bash | ||
ros2 launch chatgpt_ros_cpp_bringup chat.launch.py api_key:="YOUR_OPEN_AI_API_KEY" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(chatgpt_ros_cpp) | ||
|
||
# Find dependencies | ||
find_package(ament_cmake_auto REQUIRED) | ||
ament_auto_find_build_dependencies() | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
set(TARGET chatgpt_server) | ||
set(MY_LIB_NAME ${PROJECT_NAME}_${TARGET}) | ||
ament_auto_add_library(${MY_LIB_NAME} SHARED src/${TARGET}.cpp) | ||
rclcpp_components_register_node( | ||
${MY_LIB_NAME} | ||
PLUGIN "${PROJECT_NAME}::ChatGptServer" | ||
EXECUTABLE ${TARGET}_exec) | ||
target_link_libraries(${MY_LIB_NAME} cpprest) | ||
find_package(ament_cmake REQUIRED) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
# the following line skips the linter which checks for copyrights | ||
# comment the line when a copyright and license is added to all source files | ||
set(ament_cmake_copyright_FOUND TRUE) | ||
# the following line skips cpplint (only works in a git repo) | ||
# comment the line when this package is in a git repo and when | ||
# a copyright and license is added to all source files | ||
set(ament_cmake_cpplint_FOUND TRUE) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
ament_auto_package(INSTALL_TO_SHARE launch) | ||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,16 @@ | |
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>chatgpt_ros_cpp</name> | ||
<version>0.0.0</version> | ||
<description>ROS 2 package for ChatGPT API communication</description> | ||
<maintainer email="[email protected]">Takumi Okamoto</maintainer> | ||
<license>Apache License 2.0</license> | ||
<version>0.1.0</version> | ||
<description>meta package for chatgpt_ros_cpp</description> | ||
<maintainer email="[email protected]">takumi</maintainer> | ||
<license>Apache-2.0</license> | ||
|
||
<buildtool_depend>ament_cmake_auto</buildtool_depend> | ||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
<depend>rclcpp</depend> | ||
<depend>rclcpp_components</depend> | ||
<depend>std_msgs</depend> | ||
<depend>cpprestsdk</depend> | ||
<depend>nlohmann-json-dev</depend> | ||
<depend>chatgpt_ros_interface</depend> | ||
<depend>chatgpt_ros_cpp_bringup</depend> | ||
<depend>chatgpt_ros_cpp_msgs</depend> | ||
<depend>chatgpt_ros_cpp_node</depend> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,16 @@ | |
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>chatgpt_ros_cpp_bringup</name> | ||
<version>0.0.0</version> | ||
<description>TODO: Package description</description> | ||
<version>0.1.0</version> | ||
<description>bringup package for chatgpt_ros_cpp</description> | ||
<maintainer email="[email protected]">takumi</maintainer> | ||
<license>A</license> | ||
<license>Apache License 2.0</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
<exec_depend>chatgpt_ros_cpp_node</exec_depend> | ||
<exec_depend>chatgpt_ros_cpp_msgs</exec_depend> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
chatgpt_ros_interface/CMakeLists.txt → chatgpt_ros_cpp_msgs/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
chatgpt_ros_interface/package.xml → chatgpt_ros_cpp_msgs/package.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>chatgpt_ros_interface</name> | ||
<name>chatgpt_ros_cpp_msgs</name> | ||
<version>0.0.0</version> | ||
<description>TODO: Package description</description> | ||
<maintainer email="[email protected]">takumi</maintainer> | ||
<license>Apache License 2.0</license> | ||
<license>Apache License 2.0Apache License 2.0</license> | ||
|
||
<buildtool_depend>ament_cmake_auto</buildtool_depend> | ||
<buildtool_depend>rosidl_default_generators</buildtool_depend> | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(chatgpt_ros_cpp_node) | ||
|
||
# Find dependencies | ||
find_package(ament_cmake_auto REQUIRED) | ||
ament_auto_find_build_dependencies() | ||
|
||
set(TARGET chatgpt_server) | ||
set(MY_LIB_NAME ${PROJECT_NAME}_${TARGET}) | ||
ament_auto_add_library(${MY_LIB_NAME} SHARED src/${TARGET}.cpp) | ||
rclcpp_components_register_node( | ||
${MY_LIB_NAME} | ||
PLUGIN "${PROJECT_NAME}::ChatGptServer" | ||
EXECUTABLE ${TARGET}_exec) | ||
target_link_libraries(${MY_LIB_NAME} cpprest) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
set(ament_cmake_copyright_FOUND TRUE) | ||
set(ament_cmake_cpplint_FOUND TRUE) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
ament_auto_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>chatgpt_ros_cpp_node</name> | ||
<version>0.0.0</version> | ||
<description>ROS 2 package for ChatGPT API communication</description> | ||
<maintainer email="[email protected]">Takumi Okamoto</maintainer> | ||
<license>Apache License 2.0</license> | ||
|
||
<buildtool_depend>ament_cmake_auto</buildtool_depend> | ||
|
||
<build_depend>rclcpp</build_depend> | ||
<build_depend>rclcpp_components</build_depend> | ||
<build_depend>std_msgs</build_depend> | ||
<!-- <build_depend>cpprestsdk</build_depend> --> | ||
<build_depend>libcpprest-dev</build_depend> | ||
<build_depend>nlohmann-json-dev</build_depend> | ||
<build_depend>chatgpt_ros_cpp_msgs</build_depend> | ||
|
||
<exec_depend>rclcpp</exec_depend> | ||
<exec_depend>rclcpp_components</exec_depend> | ||
<exec_depend>std_msgs</exec_depend> | ||
<!-- <exec_depend>cpprestsdk</exec_depend> --> | ||
<exec_depend>libcpprest-dev</exec_depend> | ||
<exec_depend>nlohmann-json-dev</exec_depend> | ||
<exec_depend>chatgpt_ros_cpp_msgs</exec_depend> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.