-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
696 additions
and
0 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,75 @@ | ||
name: Humble_test_mros_to_mros_String | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "feat/add_ci_config" | ||
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 == 'main' )) || | ||
((github.event.action == 'synchronize') && (github.base_ref == 'main') && contains(github.event.pull_request.labels.*.name, 'TESTING')) || | ||
(github.ref_name == 'main') | ||
container: | ||
image: osrf/ros:${{ matrix.ros_distribution }}-desktop | ||
timeout-minutes: 3 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04] | ||
ros_distribution: [humble] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: update | ||
run: sudo apt-get update | ||
- name: setup and install tools | ||
run: > | ||
sudo apt-get install -y git wget build-essential gcc g++ libssl-dev libreadline-dev | ||
zlib1g-dev make autoconf automake cmake pkg-config curl net-tools netcat python3-jinja2 | ||
- name: Clone Test Stub | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mROS-base/mros2-host-examples | ||
path: ws_host/src/mros2-host-examples | ||
- name: Run IP update script | ||
run: | | ||
chmod +x update_ip.sh | ||
./update_ip.sh | ||
- name: Build echoback mROS | ||
shell: bash | ||
run: | | ||
bash build.bash clean | ||
bash build.bash all test_echoback_string | ||
mv cmake_build/ test_echoback_string/ | ||
- name: Build reply mROS | ||
shell: bash | ||
run: | | ||
bash build.bash clean | ||
bash build.bash all test_echoback_string_responder | ||
- name: Run mROS and Native ROS | ||
shell: bash | ||
run : | | ||
./test_echoback_string/mros2-posix & | ||
mros_pid=$! # テストプログラムのプロセスIDを取得 | ||
# テスト対象をバックグラウンドで実行 | ||
./cmake_build/mros2-posix & | ||
# mROSが終了するまで待つ | ||
wait $mros_pid | ||
mros_status=$? | ||
# 結果に基づいてCIの成否を判断 | ||
if [ $mros_status -eq 0 ] ;then | ||
echo "Succeed pub/sub test process between mros2 and Native ROS" | ||
exit 0 | ||
else | ||
echo "Fail pub/sub test process between mros2 and Native ROS" | ||
exit 1 | ||
fi |
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,75 @@ | ||
name: Humble_test_mros_to_mros_String | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "feat/add_ci_config" | ||
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 == 'main' )) || | ||
((github.event.action == 'synchronize') && (github.base_ref == 'main') && contains(github.event.pull_request.labels.*.name, 'TESTING')) || | ||
(github.ref_name == 'main') | ||
container: | ||
image: osrf/ros:${{ matrix.ros_distribution }}-desktop | ||
timeout-minutes: 3 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04] | ||
ros_distribution: [humble] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: update | ||
run: sudo apt-get update | ||
- name: setup and install tools | ||
run: > | ||
sudo apt-get install -y git wget build-essential gcc g++ libssl-dev libreadline-dev | ||
zlib1g-dev make autoconf automake cmake pkg-config curl net-tools netcat python3-jinja2 | ||
- name: Clone Test Stub | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mROS-base/mros2-host-examples | ||
path: ws_host/src/mros2-host-examples | ||
- name: Run IP update script | ||
run: | | ||
chmod +x update_ip.sh | ||
./update_ip.sh | ||
- name: Build echoback mROS | ||
shell: bash | ||
run: | | ||
bash build.bash clean | ||
bash build.bash all test_echoback_twist | ||
mv cmake_build/ cmake_build_test_echoback_twist/ | ||
- name: Build reply mROS | ||
shell: bash | ||
run: | | ||
bash build.bash clean | ||
bash build.bash all test_echoback_twist_responder | ||
- name: Run mROS and Native ROS | ||
shell: bash | ||
run : | | ||
./cmake_build_test_echoback_twist/mros2-posix & | ||
mros_pid=$! # テストプログラムのプロセスIDを取得 | ||
# テスト対象をバックグラウンドで実行 | ||
./cmake_build/mros2-posix & | ||
# mROSが終了するまで待つ | ||
wait $mros_pid | ||
mros_status=$? | ||
# 結果に基づいてCIの成否を判断 | ||
if [ $mros_status -eq 0 ] ;then | ||
echo "Succeed pub/sub test process between mros2 and Native ROS" | ||
exit 0 | ||
else | ||
echo "Fail pub/sub test process between mros2 and Native ROS" | ||
exit 1 | ||
fi |
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,78 @@ | ||
name: Humble_test_with_nativeROS_String | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "feat/add_ci_config" | ||
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 == 'main' )) || | ||
((github.event.action == 'synchronize') && (github.base_ref == 'main') && contains(github.event.pull_request.labels.*.name, 'TESTING')) || | ||
(github.ref_name == 'main') | ||
container: | ||
image: osrf/ros:${{ matrix.ros_distribution }}-desktop | ||
timeout-minutes: 3 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04] | ||
ros_distribution: [humble] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: update | ||
run: sudo apt-get update | ||
- name: setup and install tools | ||
run: > | ||
sudo apt-get install -y git wget build-essential gcc g++ libssl-dev libreadline-dev | ||
zlib1g-dev make autoconf automake cmake pkg-config curl net-tools netcat python3-jinja2 | ||
- name: Clone Test Stub | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mROS-base/mros2-host-examples | ||
path: ws_host/src/mros2-host-examples | ||
- name: Run IP update script | ||
run: | | ||
chmod +x update_ip.sh | ||
./update_ip.sh | ||
- name: Build mROS | ||
shell: bash | ||
run: | | ||
bash build.bash clean | ||
bash build.bash all test_echoback_string | ||
- name: Build Native ROS | ||
shell: bash | ||
run: | | ||
cd ws_host/ | ||
source /opt/ros/humble/setup.bash | ||
colcon build --packages-select mros2_echoreply_string | ||
- name: Run mROS and Native ROS | ||
shell: bash | ||
run : | | ||
./cmake_build/mros2-posix & | ||
mros_pid=$! # mROSのプロセスIDを取得 | ||
# Native ROSをバックグラウンドで実行 | ||
cd ws_host/ | ||
source /opt/ros/humble/setup.bash | ||
source install/setup.bash | ||
ros2 run mros2_echoreply_string echoreply_node & | ||
# mROSが終了するまで待つ | ||
wait $mros_pid | ||
mros_status=$? | ||
# 結果に基づいてCIの成否を判断 | ||
if [ $mros_status -eq 0 ] ;then | ||
echo "Succeed pub/sub test process between mros2 and Native ROS" | ||
exit 0 | ||
else | ||
echo "Fail pub/sub test process between mros2 and Native ROS" | ||
exit 1 | ||
fi |
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,86 @@ | ||
name: Humble_test_with_nativeROS_twist | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "feat/add_ci_config" | ||
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 == 'main' )) || | ||
((github.event.action == 'synchronize') && (github.base_ref == 'main') && contains(github.event.pull_request.labels.*.name, 'TESTING')) || | ||
(github.ref_name == 'main') | ||
container: | ||
image: osrf/ros:${{ matrix.ros_distribution }}-desktop | ||
timeout-minutes: 3 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04] | ||
ros_distribution: [humble] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: update | ||
run: sudo apt-get update | ||
- name: setup and install tools | ||
run: > | ||
sudo apt-get install -y git wget build-essential gcc g++ libssl-dev libreadline-dev | ||
zlib1g-dev make autoconf automake cmake pkg-config curl net-tools netcat python3-jinja2 | ||
- name: Clone Test Stub | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mROS-base/mros2-host-examples | ||
path: ws_host/src/mros2-host-examples | ||
- name: Run IP update script | ||
run: | | ||
chmod +x update_ip.sh | ||
./update_ip.sh | ||
- name: Generate Header files | ||
shell: bash | ||
run: | | ||
cd workspace | ||
python3 ../mros2/mros2_header_generator/header_generator.py geometry_msgs/msg/Twist.msg | ||
cd - | ||
- name: Build mROS Programs | ||
shell: bash | ||
run: | | ||
pwd | ||
ls -la | ||
bash build.bash clean | ||
bash build.bash all test_echoback_twist | ||
- name: Build Native ROS | ||
shell: bash | ||
run: | | ||
cd ws_host/ | ||
source /opt/ros/humble/setup.bash | ||
colcon build --packages-select mros2_echoreply_twist | ||
- name: Run mROS and Native ROS | ||
shell: bash | ||
run : | | ||
./cmake_build/mros2-posix & | ||
mros_pid=$! # mROSのプロセスIDを取得 | ||
# Native ROSをバックグラウンドで実行 | ||
cd ws_host/ | ||
source /opt/ros/humble/setup.bash | ||
source install/setup.bash | ||
ros2 run mros2_echoreply_twist echoreply_node & | ||
# mROSが終了するまで待つ | ||
wait $mros_pid | ||
mros_status=$? | ||
# 結果に基づいてCIの成否を判断 | ||
if [ $mros_status -eq 0 ] ;then | ||
echo "Succeed pub/sub test process between mros2 and Native ROS" | ||
exit 0 | ||
else | ||
echo "Fail pub/sub test process between mros2 and Native ROS" | ||
exit 1 | ||
fi |
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,27 @@ | ||
#!/bin/bash | ||
|
||
# IPアドレスを取得 | ||
IP_ADDRESS=$(hostname -I | awk '{print $1}') | ||
|
||
# IPアドレスをドットで分割 | ||
IFS='.' read -r -a IP_PARTS <<< "$IP_ADDRESS" | ||
|
||
# include/rtps/config.h のIPアドレス置換 | ||
|
||
echo "Running sed on include/rtps/config.h" | ||
sed -i "s/[[:space:]]*[0-9]\{1,3\},[[:space:]]*[0-9]\{1,3\},[[:space:]]*[0-9]\{1,3\},[[:space:]]*[0-9]\{1,3\}[[:space:]]*}; \ | ||
\/\/ Needs to be set in lwipcfg.h too./\ | ||
${IP_PARTS[0]}, ${IP_PARTS[1]}, ${IP_PARTS[2]}, ${IP_PARTS[3]}};\ | ||
\/\/ Needs to be set in lwipcfg.h too./" \ | ||
include/rtps/config.h | ||
# 変更結果を確認 | ||
|
||
# include/netif.h のIPアドレス置換 | ||
sed -i 's/#define NETIF_IPADDR ".*"/#define NETIF_IPADDR "'$IP_ADDRESS'"/' include/netif.h | ||
|
||
# 結果を表示して確認 | ||
echo "Updated IP Address: $IP_ADDRESS" | ||
echo "Updated include/rtps/config.h:" | ||
grep -E 'Needs to be set in lwipcfg.h too.' include/rtps/config.h | ||
echo "Updated include/netif.h:" | ||
grep -E 'NETIF_IPADDR' include/netif.h |
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,3 @@ | ||
set(apl_SRCS | ||
${PROJECT_SOURCE_DIR}/workspace/${MROS2_APPNAME}/app.cpp | ||
) |
Oops, something went wrong.