-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/make_runnable_zenoh_router_in_launch
- Loading branch information
Showing
21 changed files
with
691 additions
and
24 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
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 |
---|---|---|
@@ -1,36 +1,82 @@ | ||
name: Run MoveIt Middleware Benchmarks and Push Results | ||
name: Run MoveIt Middleware Benchmarks | ||
|
||
on: [push] | ||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
run_middleware_benchmarks: | ||
name: run_benchmarks | ||
run_all_benchmarks: | ||
name: run_all_benchmarks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
permissions: | ||
contents: write | ||
deployments: write | ||
container: | ||
image: ghcr.io/cihataltiparmak/moveit_middleware_benchmark:latest | ||
steps: | ||
- name: run perception benchmark | ||
- name: run benchmarks for rmw_fastrtps | ||
run: | | ||
cd /ws | ||
cd ${ROS_UNDERLAY}/.. | ||
. /opt/ros/rolling/setup.sh | ||
. install/setup.sh | ||
ros2 launch moveit_middleware_benchmark scenario_perception_pipeline_benchmark.launch.py | ||
sh src/moveit_middleware_benchmark/scripts/run_all_benchmarks.sh -i ./src/moveit_middleware_benchmark/middleware_configurations/rmw_fastrtps/config_rmw_fastrtps.sh -d /benchmark_results -m rmw_fastrtps_cpp | ||
- name: run benchmarks for rmw_cyclonedds | ||
run: | | ||
cd ${ROS_UNDERLAY}/.. | ||
. /opt/ros/rolling/setup.sh | ||
. install/setup.sh | ||
sh src/moveit_middleware_benchmark/scripts/run_all_benchmarks.sh -i ./src/moveit_middleware_benchmark/middleware_configurations/rmw_cyclonedds/config_rmw_cyclonedds.sh -d /benchmark_results -m rmw_cyclonedds_cpp | ||
- name: clone repo | ||
uses: actions/checkout@v3 | ||
- name: add to safe directory | ||
run: | | ||
git config --global --add safe.directory /__w/moveit_middleware_benchmark/moveit_middleware_benchmark | ||
- name: push perception benchmark results to github pages | ||
- name: push perception benchmark results for rmw_fastrtps to github pages | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: Perception Pipeline Benchmark | ||
tool: 'googlecpp' | ||
output-file-path: /benchmark_results/scenario_perception_pipeline/rmw_fastrtps_cpp.json | ||
# Access token to deploy GitHub Pages branch | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# Push and deploy GitHub pages branch automatically | ||
auto-push: true | ||
gh-pages-branch: "gh-pages" | ||
benchmark-data-dir-path: "rmw_fastrtps" | ||
- name: push simple service client benchmark results for rmw_fastrtps to github pages | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: Basic Service Client Benchmark | ||
tool: 'googlecpp' | ||
output-file-path: /benchmark_results/scenario_basic_service_client/rmw_fastrtps_cpp.json | ||
# Access token to deploy GitHub Pages branch | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# Push and deploy GitHub pages branch automatically | ||
auto-push: true | ||
gh-pages-branch: "gh-pages" | ||
benchmark-data-dir-path: "rmw_fastrtps" | ||
|
||
- name: push perception benchmark results for rmw_cyclonedds to github pages | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: Perception Pipeline Benchmark | ||
tool: 'googlecpp' | ||
output-file-path: /benchmark_results/scenario_perception_pipeline/rmw_cyclonedds_cpp.json | ||
# Access token to deploy GitHub Pages branch | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# Push and deploy GitHub pages branch automatically | ||
auto-push: true | ||
gh-pages-branch: "gh-pages" | ||
benchmark-data-dir-path: "rmw_cyclonedds" | ||
- name: push simple service client benchmark results for rme_cyclonedds to github pages | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: Movet Middleware Benchmark Project Perception Pipeline Benchmark | ||
name: Basic Service Client Benchmark | ||
tool: 'googlecpp' | ||
output-file-path: /ws/middleware_benchmark_results.json | ||
output-file-path: /benchmark_results/scenario_basic_service_client/rmw_cyclonedds_cpp.json | ||
# Access token to deploy GitHub Pages branch | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# Push and deploy GitHub pages branch automatically | ||
auto-push: true | ||
gh-pages-branch: "gh-pages" | ||
benchmark-data-dir-path: "rmw_cyclonedds" |
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
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,25 +1,22 @@ | ||
FROM ros:rolling | ||
FROM moveit/moveit2:rolling-source | ||
|
||
RUN apt-get update && \ | ||
apt install wget -y | ||
|
||
RUN mkdir ws/src -p | ||
|
||
RUN . /opt/ros/rolling/setup.sh && \ | ||
cd ws/src && \ | ||
git clone https://github.com/CihatAltiparmak/moveit_middleware_benchmark.git -b development && \ | ||
cd ${ROS_UNDERLAY}/../src && \ | ||
git clone https://github.com/CihatAltiparmak/moveit_middleware_benchmark.git && \ | ||
vcs import < moveit_middleware_benchmark/moveit_middleware_benchmark.repos --recursive | ||
|
||
RUN cd ws/src && \ | ||
# git clone https://github.com/ros2/rmw_zenoh.git && \ | ||
git clone https://github.com/ros2/rmw_cyclonedds.git | ||
|
||
RUN . /opt/ros/rolling/setup.sh && \ | ||
cd ws && \ | ||
cd ${ROS_UNDERLAY}/.. && \ | ||
rosdep update --rosdistro=$ROS_DISTRO && \ | ||
apt-get update && \ | ||
apt upgrade -y && \ | ||
rosdep install --from-paths src --ignore-src -r -y | ||
|
||
RUN . /opt/ros/rolling/setup.sh && \ | ||
cd ws && \ | ||
cd ${ROS_UNDERLAY}/.. && \ | ||
colcon build --mixin release --packages-skip test_dynmsg dynmsg_demo |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
## How To Run Basic Service Client Benchmark | ||
|
||
Firstly, source your ros version. It's suggested to test with rolling version of ROS 2. | ||
|
||
For instance, to test with rmw_zenoh, start to zenoh router using following command in the terminal. | ||
```sh | ||
# go to your workspace | ||
cd ws | ||
# Be sure that ros2 daemon is killed. | ||
pkill -9 -f ros && ros2 daemon stop | ||
# Then start zenoh router | ||
source /opt/ros/rolling/setup.bash | ||
source install/setup.bash | ||
export RMW_IMPLEMENTATION=rmw_zenoh_cpp | ||
ros2 run rmw_zenoh_cpp rmw_zenohd | ||
``` | ||
|
||
Select your rmw_implementation as `rmw_zenoh_cpp` and run the perception benchmark launch file in the another terminal. | ||
```sh | ||
# go to your workspace | ||
cd ws | ||
source /opt/ros/rolling/setup.bash | ||
source install/setup.bash | ||
export RMW_IMPLEMENTATION=rmw_zenoh_cpp # select your rmw_implementation to benchmark | ||
ros2 launch moveit_middleware_benchmark scenario_basic_service_client_benchmark.launch.py | ||
``` | ||
|
||
It will be defaultly benchmarked with 6 repetitions. It will be created the json file named `middleware_benchmark_results.json` for benchmarking results after finishing benchmark code execution. You can see the benchmark results in more detail inside this json file. | ||
|
||
If you want to customize your benchmark arguments or select different test case, you can use below command. | ||
|
||
```shell | ||
ros2 launch moveit_middleware_benchmark scenario_basic_service_client_benchmark.launch.py benchmark_command_args:="--benchmark_out=middleware_benchmark_results.json --benchmark_out_format=json --benchmark_repetitions=1" sending_request_number:=50000 | ||
``` | ||
|
||
## How to benchmark the basic service client execution | ||
|
||
The main idea here is to send some client request in `example_interfaces::srv::AddTwoInts` format to `add_two_ints_server` which is one of the examples of [ros2/demos package](https://github.com/ros2/demos) and then to measure the elapsed time by waiting response from server. This logic helps us to measure elapsed time between sending request and receiving response. |
Oops, something went wrong.