├── .gitignore ├── .gitlab-ci.yml ├── LICENSE ├── README.md ├── SECURITY_DEMO.md ├── add_sql_support_readme.md ├── performance_test ├── CMakeLists.txt ├── bin │ ├── fastrtpsgen │ └── fastrtpsgen.jar ├── cmake │ └── Modules │ │ ├── FindODB.cmake │ │ └── UseODB.cmake ├── compile_options.cmake ├── design │ └── performance_test-design.md ├── env_hook │ └── odb_library_path.sh.in ├── helper_scripts │ ├── apex_performance_plotter │ │ ├── .gitignore │ │ ├── .pylintrc │ │ ├── MANIFEST.in │ │ ├── README.rst │ │ ├── apex_performance_plotter │ │ │ ├── __init__.py │ │ │ ├── generate_plots.py │ │ │ ├── load_logfiles.py │ │ │ └── template.tex │ │ ├── example_plot_two_experiments.png │ │ ├── requirements.in │ │ ├── setup.cfg │ │ ├── setup.py │ │ └── test │ │ │ └── test_generate_plots.py │ ├── generate_apex_xml.py │ ├── plot_logs.ipynb │ ├── policies │ │ ├── common │ │ │ ├── node.xml │ │ │ └── node │ │ │ │ ├── logging.xml │ │ │ │ ├── parameters.xml │ │ │ │ └── time.xml │ │ ├── performance_test.policy.xml │ │ └── policy.xml │ ├── regression_checkers │ │ ├── ApexComparison.py │ │ ├── apex_compare.py │ │ └── apex_compare_tree.py │ ├── run_connected_graph_experiment.py │ ├── run_experiment.py │ └── security_setup.bash ├── include │ └── performance_test │ │ ├── for_each.hpp │ │ └── version.h ├── mapping_rules.yaml ├── package.xml ├── schema_changelog │ ├── analysis_result.xml │ └── experiment_configuration.xml ├── src │ ├── communication_abstractions │ │ ├── communicator.cpp │ │ ├── communicator.hpp │ │ ├── connext_dds_communicator.hpp │ │ ├── connext_dds_micro_communicator.hpp │ │ ├── cyclonedds_communicator.hpp │ │ ├── fast_rtps_communicator.hpp │ │ ├── iceoryx_communicator.hpp │ │ ├── opendds_communicator.hpp │ │ ├── resource_manager.cpp │ │ ├── resource_manager.hpp │ │ ├── ros2_callback_communicator.hpp │ │ ├── ros2_communicator.hpp │ │ └── ros2_waitset_communicator.hpp │ ├── data_running │ │ ├── data_runner.hpp │ │ ├── data_runner_base.hpp │ │ ├── data_runner_factory.cpp │ │ └── data_runner_factory.hpp │ ├── experiment_configuration │ │ ├── communication_mean.hpp │ │ ├── experiment_configuration.cpp │ │ ├── experiment_configuration.hpp │ │ ├── external_info_storage.cpp │ │ ├── external_info_storage.hpp │ │ ├── qos_abstraction.cpp │ │ ├── qos_abstraction.hpp │ │ └── topics.hpp │ ├── experiment_execution │ │ ├── analysis_result.cpp │ │ ├── analysis_result.hpp │ │ ├── analyze_runner.cpp │ │ └── analyze_runner.hpp │ ├── idlgen │ │ ├── Array16k_.idl │ │ ├── Array1k_.idl │ │ ├── Array1m_.idl │ │ ├── Array256k_.idl │ │ ├── Array2m_.idl │ │ ├── Array32k_.idl │ │ ├── Array4k_.idl │ │ ├── Array4m_.idl │ │ ├── Array60k_.idl │ │ ├── Array64k_.idl │ │ ├── Array8m_.idl │ │ ├── Header_.idl │ │ ├── NavSatFix_.idl │ │ ├── NavSatStatus_.idl │ │ ├── Point32_.idl │ │ ├── PointCloud1m_.idl │ │ ├── PointCloud2m_.idl │ │ ├── PointCloud4m_.idl │ │ ├── PointCloud512k_.idl │ │ ├── PointCloud8m_.idl │ │ ├── PointField_.idl │ │ ├── Point_.idl │ │ ├── Polygon_.idl │ │ ├── RadarDetection_.idl │ │ ├── RadarTrack_.idl │ │ ├── Range_.idl │ │ ├── Struct16_.idl │ │ ├── Struct256_.idl │ │ ├── Struct32k_.idl │ │ ├── Struct4k_.idl │ │ ├── Time_.idl │ │ ├── Vector3_.idl │ │ ├── connextdds │ │ │ └── CMakeLists.txt │ │ ├── cyclonedds │ │ │ └── CMakeLists.txt │ │ ├── fast_rtps │ │ │ └── CMakeLists.txt │ │ └── opendds │ │ │ └── CMakeLists.txt │ ├── main.cpp │ ├── msg │ │ ├── Array16k.idl │ │ ├── Array16k.msg │ │ ├── Array16kZeroCopy.idl │ │ ├── Array1k.idl │ │ ├── Array1k.msg │ │ ├── Array1kZeroCopy.idl │ │ ├── Array1m.idl │ │ ├── Array1m.msg │ │ ├── Array1mZeroCopy.idl │ │ ├── Array256k.idl │ │ ├── Array256k.msg │ │ ├── Array256kZeroCopy.idl │ │ ├── Array2m.idl │ │ ├── Array2m.msg │ │ ├── Array2mZeroCopy.idl │ │ ├── Array32k.idl │ │ ├── Array32k.msg │ │ ├── Array32kZeroCopy.idl │ │ ├── Array4k.idl │ │ ├── Array4k.msg │ │ ├── Array4kZeroCopy.idl │ │ ├── Array4m.idl │ │ ├── Array4m.msg │ │ ├── Array4mZeroCopy.idl │ │ ├── Array60k.idl │ │ ├── Array60k.msg │ │ ├── Array60kZeroCopy.idl │ │ ├── Array64k.idl │ │ ├── Array64k.msg │ │ ├── Array64kZeroCopy.idl │ │ ├── Array8m.idl │ │ ├── Array8m.msg │ │ ├── Array8mZeroCopy.idl │ │ ├── Header.idl │ │ ├── NavSatFix.idl │ │ ├── NavSatFix.msg │ │ ├── NavSatFixZeroCopy.idl │ │ ├── NavSatStatus.idl │ │ ├── NavSatStatus.msg │ │ ├── NavSatStatusZeroCopy.idl │ │ ├── Point.idl │ │ ├── Point.msg │ │ ├── Point32.idl │ │ ├── Point32.msg │ │ ├── Point32ZeroCopy.idl │ │ ├── PointCloud1m.idl │ │ ├── PointCloud1m.msg │ │ ├── PointCloud1mZeroCopy.idl │ │ ├── PointCloud2m.idl │ │ ├── PointCloud2m.msg │ │ ├── PointCloud2mZeroCopy.idl │ │ ├── PointCloud4m.idl │ │ ├── PointCloud4m.msg │ │ ├── PointCloud4mZeroCopy.idl │ │ ├── PointCloud512k.idl │ │ ├── PointCloud512k.msg │ │ ├── PointCloud512kZeroCopy.idl │ │ ├── PointCloud8m.idl │ │ ├── PointCloud8m.msg │ │ ├── PointCloud8mZeroCopy.idl │ │ ├── PointField.idl │ │ ├── PointZeroCopy.idl │ │ ├── Polygon.idl │ │ ├── Polygon.msg │ │ ├── PolygonZeroCopy.idl │ │ ├── RadarDetection.idl │ │ ├── RadarDetection.msg │ │ ├── RadarDetectionZeroCopy.idl │ │ ├── RadarTrack.idl │ │ ├── RadarTrack.msg │ │ ├── RadarTrackZeroCopy.idl │ │ ├── Range.idl │ │ ├── Range.msg │ │ ├── RangeZeroCopy.idl │ │ ├── Struct16.idl │ │ ├── Struct16.msg │ │ ├── Struct16ZeroCopy.idl │ │ ├── Struct256.idl │ │ ├── Struct256.msg │ │ ├── Struct256ZeroCopy.idl │ │ ├── Struct32k.idl │ │ ├── Struct32k.msg │ │ ├── Struct32kZeroCopy.idl │ │ ├── Struct4k.idl │ │ ├── Struct4k.msg │ │ ├── Struct4kZeroCopy.idl │ │ ├── Vector3.idl │ │ ├── Vector3.msg │ │ └── Vector3ZeroCopy.idl │ └── utilities │ │ ├── cpu_usage_tracker.hpp │ │ ├── qnx_res_usage.hpp │ │ ├── rt_enabler.hpp │ │ ├── spin_lock.hpp │ │ └── statistics_tracker.hpp ├── test │ └── src │ │ ├── test_performance_test.cpp │ │ └── test_statistics_tracker.hpp └── version_check.bash ├── performance_test_ros1_msgs ├── CMakeLists.txt ├── COLCON_IGNORE ├── msg └── package.xml ├── performance_test_ros1_publisher ├── CMakeLists.txt ├── COLCON_IGNORE ├── include │ └── performance_test_ros1_publisher │ │ └── msg_types.hpp ├── package.xml └── src │ ├── check_master.cpp │ └── publisher.cpp └── tools ├── Dockerimage.crossbuild ├── toolchain.cmake └── toolchain_arm.cmake /.gitignore: -------------------------------------------------------------------------------- 1 | # CLion 2 | cmake-build-debug 3 | .idea 4 | 5 | # colcon 6 | build 7 | log 8 | install 9 | cmake-build-* 10 | 11 | # Jupyter environments and checkpoints 12 | performance_test/helper_scripts/.ipynb_checkpoints 13 | performance_test/helper_scripts/performance_test_plotter_env -------------------------------------------------------------------------------- /SECURITY_DEMO.md: -------------------------------------------------------------------------------- 1 | # Using Performance Test with security enabled 2 | 3 | ROS2 security can restrict what nodes can publish and subscribe, or even what topics 4 | a node can publish or subscribe to. 5 | For an overview of ROS2 security, see [the SROS package](https://github.com/ros2/sros2) 6 | on github. 7 | 8 | ## Performance Test Security Demo 9 | 10 | Performance Test provides a helper script to quickly set up ROS2 security. 11 | First, you should be able to build and run `performance_test` using the steps in 12 | the README.md. 13 | 14 | Next, to generate keys and enable security, follow the steps below: 15 | 16 | ``` 17 | cd performance_test/helper_scripts 18 | source security_setup.bash enable ~/demo_keys 19 | ``` 20 | 21 | This will generate keys for 6 nodes named: 22 | 23 | * `performance_test0` 24 | * `performance_test1` 25 | * `performance_test2` 26 | * `performance_test3` 27 | * `performance_test4` 28 | * `performance_test5` 29 | 30 | These nodes will be allowed to publish and subscribe to the following topics as specified 31 | in `performance_test/helper_scripts/policy.xml`: 32 | 33 | * Array1k 34 | * Array4k 35 | * Array16k 36 | * Array32k 37 | * Array60k 38 | * Array1m 39 | * Array2m 40 | 41 | The performance test tool uses a topic name that matches the data type it was asked to test. 42 | That means that after enabling security with the helper script, the performance test tool 43 | will only be able to test `Array*` messages. 44 | 45 | Finally, this script changes the environment of the current shell to include: 46 | 47 | ``` 48 | export ROS_SECURITY_ROOT_DIRECTORY=~/demo_keys 49 | export ROS_SECURITY_ENABLE=true 50 | export ROS_SECURITY_STRATEGY=Enforce 51 | ``` 52 | 53 | This means that when you run the performance test tool in the same shell, it will run with security enabled. 54 | 55 | ### Observe that only certain node names are valid 56 | 57 | If you run: 58 | 59 | ``` 60 | ros2 run performance_test perf_test -c ROS2 -t Array1k --max_runtime 30 61 | ``` 62 | 63 | You should observe a failure similar to: 64 | 65 | ``` 66 | terminate called after throwing an instance of 'rclcpp::exceptions::RCLError' 67 | what(): failed to initialize rcl node: SECURITY ERROR: directory /home/user/demo_keys/performance_test1662981776 does not exist. Lookup strategy: MATCH_EXACT, at /path/rcl/rcl/src/rcl/security_directory.c:256 68 | ``` 69 | 70 | This is because by default, `perf_test` chooses a random node name like `performance_test1662981776` and the keys we generated above need to match the node names. 71 | 72 | To make the tool select predictable node names, use the `--with_security` option. 73 | This will create nodes with names that match the keys generated by `security_setup.bash`. 74 | 75 | ### Observe that only certain topic names can be used 76 | 77 | If you run: 78 | 79 | ``` 80 | ros2 run performance_test perf_test -c ROS2 -t Struct16 --max_runtime 30 --with_security 81 | ``` 82 | 83 | You should observe a failure similar to: 84 | 85 | ``` 86 | 2019-11-05 11:32:16.306 [SECURITY Error] Error checking creation of local writer 9d.8d.94.e3.56.29.ad.53.69.7c.de.da|0.0.1.3 (rt/Struct16 topic not found in allow rule. (/path/Fast-RTPS/src/cpp/security/accesscontrol/Permissions.cpp:11 87 | 11)) 88 | ``` 89 | 90 | This is because the `policy.xml` file used by the `security_setup` helper scripts only allows publishing and subscribing on certain topic names. 91 | 92 | ### A successful Example 93 | 94 | If you run: 95 | 96 | ``` 97 | ros2 run performance_test perf_test -c ROS2 -t Array1k --max_runtime 30 --with_security 98 | ``` 99 | 100 | You should see the tool execute successfully with security. 101 | -------------------------------------------------------------------------------- /add_sql_support_readme.md: -------------------------------------------------------------------------------- 1 | # Save results to a SQL database 2 | 3 | ## Requirements 4 | 5 | ***ODB 2.5.0*** 6 | > Note: 2.5.0 is a beta version, but it is required if you are using Ubuntu 18.04 LTS and 7 | gcc 7.4.0, if you are using earlier ubuntu/gcc versions, proceed to the installation of ODB 2.4.0 8 | below. 9 | 10 | Follow the instructions [here](https://www.codesynthesis.com/products/odb/doc/install-build2.xhtml) 11 | to install build2 toolchain, odb compiler and runtime libraries. 12 | 13 | Required runtime libraries are: libodb, libodb-sqlite/libodb-pgsql/libodb-mysql (depending on which 14 | database you want to use) and libodb-boost. 15 | 16 | Remember to install the correct gcc plugin, for example (for gcc 7): 17 | ``` 18 | sudo apt-get update 19 | sudo apt-get install gcc-7-plugin-dev 20 | ``` 21 | Additionally, if you want to use MYSQL database, you will need to build a not yet released version, 22 | so instead of executing: 23 | ``` 24 | bpkg build libodb-mysql 25 | bpkg install libodb-mysql 26 | ``` 27 | you will need to execute: 28 | ``` 29 | bpkg build libodb-mysql@https://git.codesynthesis.com/odb/libodb-mysql.git#fix-bind-decl 30 | bpkg install libodb-mysql 31 | ``` 32 | After installing all the libraries make sure to add `/usr/local/lib` to your PATH: 33 | ``` 34 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 35 | ``` 36 | 37 | ***ODB 2.4.0:*** 38 | All the downloads can be found [here](https://www.codesynthesis.com/products/odb/download.xhtml). 39 | 40 | * Odb compiler 41 | * Common Runtime Library: libodb-2.4.0 42 | * Database Runtime Library: libodb-sqlite-2.4.0/libodb-mysql-2.4.0/libodb-pgsql-2.4.0 43 | * Profile Libraries: libodb-boost-2.4.0, libodb-qt-2.4.0 44 | 45 | Follow the [instructions](https://www.codesynthesis.com/products/odb/doc/install-unix.xhtml) to 46 | install all the components. 47 | 48 | ## How to build and run 49 | 50 | ``` 51 | source ros2_install_path/setup.bash 52 | mkdir -p perf_test_ws/src 53 | cd perf_test_ws/src 54 | git clone https://github.com/ApexAI/performance_test.git 55 | cd .. 56 | colcon build --cmake-clean-cache --cmake-args -DCMAKE_BUILD_TYPE=Release -DPERFORMANCE_TEST_ODB_SQLITE=ON 57 | ./install/performance_test/lib/performance_test/perf_test -c ROS2 -l log -t Array1k --max_runtime 10 58 | ``` 59 | 60 | The default name of the resulting database is "db_name", you can change it by using `--db_name` 61 | argument in when executing performance_test. For MySQL or PostgreSQL databases, you can also specify `--db_user`, 62 | `--db_password`, `--db_host` and `--db_port` to connect to your database. 63 | 64 | In order to run the performance test with MySQL or PostgreSQL support, you can use 65 | `-DPERFORMANCE_TEST_ODB_MYSQL=ON` or `-DPERFORMANCE_TEST_ODB_PGSQL=ON` instead of 66 | `-DPERFORMANCE_TEST_ODB_SQLITE=ON` option. 67 | 68 | The project supports [schema evolution](https://www.codesynthesis.com/products/odb/doc/manual.xhtml#13). 69 | Every time you make a change in C++ code base which requires a schema evolution you need to: 70 | 71 | 1. Update the model version (`#pragma db model version`). 72 | 2. Commit the xml files with schema changes (`schema_changelog` folder). 73 | 74 | > Note: The current `schema_changelog` is implemented for `MySQL` database. In order to use 75 | other database, you need to start a new schema evolution: 76 | 1. Remove the existing xml files (please do not commit these changes). 77 | 2. Run the performance test with db model version 1 (specified in `experiment_configuration.hpp` file). 78 | 79 | > All the necessary changes to add SQL database support to the performance_test tool were made by 80 | following instructions from [ODB platform](https://www.codesynthesis.com/products/odb/). Please 81 | refer to the [ODB manual](https://www.codesynthesis.com/products/odb/doc/odb-manual.pdf) for more information 82 | and implementation details. 83 | -------------------------------------------------------------------------------- /performance_test/bin/fastrtpsgen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | dir="`dirname \"$0\"`" 4 | 5 | java_exec=java 6 | 7 | java -version &>/dev/null 8 | 9 | if [ $? != 0 ]; then 10 | [ -z "$JAVA_HOME" ] && { echo "Java binary cannot be found. Please, make sure its location is in the PATH environment variable or set JAVA_HOME environment variable."; exit 1; } 11 | java_exec="${JAVA_HOME}/bin/java" 12 | fi 13 | 14 | exec $java_exec -jar "$dir/fastrtpsgen.jar" "$@" 15 | 16 | -------------------------------------------------------------------------------- /performance_test/bin/fastrtpsgen.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros2/performance_test/7081dd3fae9d1bfe985a94858b6c96650fd1bb4b/performance_test/bin/fastrtpsgen.jar -------------------------------------------------------------------------------- /performance_test/compile_options.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Apex.AI, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | function(set_compile_options target) 16 | if(WIN32) 17 | # Causes the visibility macros to use dllexport rather than dllimport, 18 | # which is appropriate when building the dll but not consuming it. 19 | string(TOUPPER ${target} PROJECT_NAME_UPPER) 20 | target_compile_definitions(${target} PRIVATE ${PROJECT_NAME_UPPER}_BUILDING_DLL) 21 | add_definitions(-D_CRT_NONSTDC_NO_WARNINGS) 22 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) 23 | add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS) 24 | else() 25 | target_compile_options(${target} PRIVATE -Wall 26 | -Wextra 27 | #-Wshadow # causes issues with ROS2 headers 28 | #-Wnon-virtual-dtor # causes issues with ROS2 headers 29 | -pedantic 30 | -Wcast-align 31 | -Wunused 32 | -Wconversion 33 | -Wsign-conversion 34 | -Wdouble-promotion 35 | -Wno-unknown-pragmas 36 | -Wno-deprecated-declarations 37 | $<$: 38 | -Woverloaded-virtual 39 | -Wno-old-style-cast 40 | > 41 | $<$: 42 | -Wlogical-op 43 | #-Wuseless-cast 44 | $<$,6>: 45 | -Wnull-dereference 46 | -Wduplicated-cond 47 | > 48 | $<$,7>: 49 | -Wduplicated-branches 50 | -Wrestrict 51 | > 52 | > 53 | -fvisibility=hidden) 54 | endif() 55 | endfunction() 56 | -------------------------------------------------------------------------------- /performance_test/env_hook/odb_library_path.sh.in: -------------------------------------------------------------------------------- 1 | # copied from ament_package/template/environment_hook/library_path.sh 2 | _ODB_LIBRARY_DIR="@ODB_LIBRARY_DIRECTORY@" 3 | 4 | # detect if running on Darwin platform 5 | _UNAME=`uname -s` 6 | _IS_DARWIN=0 7 | if [ "$_UNAME" = "Darwin" ]; then 8 | _IS_DARWIN=1 9 | fi 10 | unset _UNAME 11 | 12 | if [ $_IS_DARWIN -eq 0 ]; then 13 | ament_prepend_unique_value LD_LIBRARY_PATH "$_ODB_LIBRARY_DIR" 14 | else 15 | ament_prepend_unique_value DYLD_LIBRARY_PATH "$_ODB_LIBRARY_DIR" 16 | fi 17 | unset _IS_DARWIN 18 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/apex_performance_plotter/.gitignore: -------------------------------------------------------------------------------- 1 | *.egg-info 2 | __pycache__/ 3 | .eggs/ 4 | /build/ 5 | /dist/ 6 | /venv/ 7 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/apex_performance_plotter/MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include apex_performance_plotter *.tex 2 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/apex_performance_plotter/README.rst: -------------------------------------------------------------------------------- 1 | Performance test plotter 2 | ======================== 3 | 4 | Performance plotter create beautiful reports from performance_test logfiles. It 5 | is a python tool that reads the logfiles and renders PDFs using LaTeX. 6 | 7 | 8 | Installation 9 | ------------ 10 | 11 | This package requires python3 and texlive. On an Ubuntu system you will need to 12 | install the following packages: 13 | 14 | :: 15 | 16 | sudo apt-get install python3 texlive texlive-pictures texlive-luatex 17 | 18 | 19 | Once all dependencies are in place you can setup the plotter using: 20 | 21 | :: 22 | 23 | pip3 install . 24 | 25 | 26 | Using 27 | ----- 28 | 29 | The previous step installed a ``perfplot`` binary, it can be invoked using 30 | 31 | :: 32 | 33 | perfplot ... 34 | 35 | Be sure to also check ``perfplot -h`` for additional options. 36 | 37 | Common Pitfalls 38 | *************** 39 | 40 | All of the latency metrics are collected and calculated by the subscriber process. 41 | For interprocess communication, it is recommended to provide different prefixes for 42 | the log files: 43 | 44 | :: 45 | 46 | perf_test -c ROS2 -t Array1k -p 1 -s 0 -l log_pub 47 | perf_test -c ROS2 -t Array1k -p 0 -s 1 -l log_sub 48 | 49 | Then, to plot the latency metrics, invoke perfplot on the subscriber's log file. 50 | If perfplot is invoked on the publisher's log file, then the CPU and memory 51 | metrics will be plotted, but the latency plot will be empty. 52 | 53 | 54 | Jupyter notebook extension 55 | --------------------------- 56 | 57 | It is also possible to plot the results inside a Jupyter notebook. This allows to plot different 58 | experiments on the same graph. 59 | 60 | Installation 61 | ************* 62 | 63 | The dependencies are loaded inside a Python virtual environment: 64 | 65 | .. code-block:: bash 66 | 67 | sudo apt install virtualenv 68 | cd performance_test/helper_scripts 69 | python3 -m venv performance_test_plotter_env 70 | 71 | # Active the venv 72 | # Note that the command might differ for your environment 73 | # See https://docs.python.org/3/library/venv.html#creating-virtual-environments for more info 74 | source performance_test_plotter_env/bin/activate 75 | 76 | # Install requirements 77 | pip3 install "plotly==4.9.0" "notebook>=5.3" "ipywidgets>=7.2" pandas numpy click 78 | pip3 install --user ipykernel 79 | python3 -m ipykernel install --user --name=performance_test_plotter_env 80 | 81 | Using 82 | ***** 83 | 84 | .. code-block:: bash 85 | 86 | # Open the Jupyter notebook 87 | jupyter notebook plot_logs.ipynb 88 | 89 | # Make sure that the correct kernel is selected: performance_test_plotter_env 90 | 91 | # When you are done, deactivate the venv 92 | deactivate 93 | 94 | Example of plot with multiple experiments 95 | ***************************************** 96 | 97 | .. image:: example_plot_two_experiments.png -------------------------------------------------------------------------------- /performance_test/helper_scripts/apex_performance_plotter/apex_performance_plotter/load_logfiles.py: -------------------------------------------------------------------------------- 1 | import itertools 2 | 3 | import pandas 4 | 5 | 6 | def load_logfile(filename): 7 | """Load logfile into header dictionary and pandas dataframe.""" 8 | with open(filename) as source: 9 | header = {} 10 | for item in itertools.takewhile(lambda x: not x.startswith('---'), source): 11 | if not item.strip(): # Don't care about whitespace-only lines 12 | continue 13 | try: 14 | key = item.split(':')[0].strip() 15 | value = item.split(':', maxsplit=1)[1].strip() 16 | header[key] = value 17 | except Exception: 18 | print('Error trying to parse header line "{}"'.format(item)) 19 | raise 20 | dataframe = pandas.read_csv(source, sep='[ \t]*,[ \t]*', engine='python') 21 | unnamed = [col for col in dataframe.keys() if col.startswith('Unnamed: ')] 22 | if unnamed: 23 | dataframe.drop(unnamed, axis=1, inplace=True) 24 | return header, dataframe 25 | 26 | 27 | def load_logfiles(logfiles): 28 | """Load logfiles into header dictionaries and pandas dataframes.""" 29 | headers = [] 30 | dataframes = [] 31 | 32 | for logfile in logfiles.value: 33 | header, dataframe = load_logfile(logfile) 34 | headers.append(header) 35 | dataframes.append(dataframe) 36 | 37 | return headers, dataframes 38 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/apex_performance_plotter/example_plot_two_experiments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros2/performance_test/7081dd3fae9d1bfe985a94858b6c96650fd1bb4b/performance_test/helper_scripts/apex_performance_plotter/example_plot_two_experiments.png -------------------------------------------------------------------------------- /performance_test/helper_scripts/apex_performance_plotter/requirements.in: -------------------------------------------------------------------------------- 1 | Click 2 | Jinja2 3 | pandas 4 | matplotlib 5 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/apex_performance_plotter/setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 100 3 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/apex_performance_plotter/setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright 2018 Ternaris 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # SPDX-License-Identifier: Apache-2.0 18 | 19 | 20 | """Performance test plotter.""" 21 | 22 | from collections import OrderedDict 23 | import io 24 | import os 25 | import re 26 | 27 | from setuptools import find_packages, setup 28 | 29 | NAME = 'apex-performance-plotter' 30 | DESCRIPTION = 'Apex performance test report plotter' 31 | ENTRY_POINTS = { 32 | 'console_scripts': ['perfplot = apex_performance_plotter:plot_logfiles'] 33 | } 34 | 35 | os.chdir(os.path.abspath(os.path.dirname(__file__))) 36 | 37 | with io.open(os.path.join(NAME.replace('-', '_'), '__init__.py'), encoding='utf8') as f: 38 | VERSION = re.search(r'^__version__ = \'(.*?)\'', f.read(), flags=re.MULTILINE).group(1) 39 | 40 | with io.open(os.path.join('README.rst'), 'rt', encoding='utf8') as f: 41 | README = f.read() 42 | 43 | 44 | def read_requirements_in(path): 45 | """Read requirements from requirements.in file.""" 46 | with io.open(path, 'rt', encoding='utf8') as f: # pylint: disable=redefined-outer-name 47 | return [ 48 | x.rsplit('=')[1] if x.startswith('-e') else x 49 | for x in [x.strip() for x in f.readlines()] 50 | if x 51 | if not x.startswith('-r') 52 | if not x[0] == '#' 53 | ] 54 | 55 | 56 | INSTALL_REQUIRES = read_requirements_in('requirements.in') 57 | EXTRAS_REQUIRE = {} 58 | 59 | 60 | setup(name=NAME, 61 | version=VERSION, 62 | description=DESCRIPTION, 63 | long_description=README, 64 | author='Ternaris', 65 | author_email='team@ternaris.com', 66 | maintainer='Apex.AI', 67 | maintainer_email='tooling@apex.ai', 68 | url='https://github.com/ApexAI/performance_test', 69 | project_urls=OrderedDict(( 70 | ('Code', 'https://github.com/ApexAI/performance_test'), 71 | ('Issue tracker', 'https://github.com/ApexAI/performance_test/issues'), 72 | )), 73 | license='Apache-2.0', 74 | packages=find_packages(), 75 | include_package_data=True, 76 | zip_safe=False, 77 | python_requires='>=3.5.2', 78 | install_requires=INSTALL_REQUIRES, 79 | extras_require=EXTRAS_REQUIRE, 80 | entry_points=ENTRY_POINTS) 81 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/apex_performance_plotter/test/test_generate_plots.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Apex.AI, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | from apex_performance_plotter.generate_plots import generate_figures 16 | from apex_performance_plotter.generate_plots import get_range 17 | 18 | 19 | def test_get_range(): 20 | assert get_range(1, [1, 2, 3, 4, 5]) == [0, 6] 21 | assert get_range(1, [1, 2, 3], [4, 5]) == [0, 6] 22 | assert get_range(1, [1, 5], [2, 3, 4]) == [0, 6] 23 | 24 | 25 | def test_get_range_asymetric(): 26 | # Check that we can have different padding on the left vs right 27 | assert get_range((1, 2), [1, 2, 3, 4, 5]) == [0, 7] 28 | 29 | 30 | def test_generate_figures_empty_dataset(): 31 | 32 | generate_figures([], [], [], [], [], [], [], [], []) 33 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/policies/common/node.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/policies/common/node/logging.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | rosout 5 | 6 | 7 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/policies/common/node/parameters.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /parameter_events 5 | 6 | 7 | 8 | ~/describe_parameters 9 | ~/get_parameter_types 10 | ~/get_parameters 11 | ~/list_parameters 12 | ~/set_parameters 13 | ~/set_parameters_atomically 14 | 15 | 16 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/policies/common/node/time.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /clock 5 | 6 | 7 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/policies/performance_test.policy.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | Array16k 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/policies/policy.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/run_connected_graph_experiment.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Apex.AI, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import subprocess 16 | 17 | cmd = 'ros2 run performance_test perf_test --communication ROS2PollingSubscription \ 18 | --max_runtime 10 --disable_logging ' 19 | 20 | db_args = '' # set the db parameters to upload the result to the database 21 | 22 | 23 | # launch 3 sets of Array1m pub/sub, 1 to 1 24 | for i in range(0, 3): 25 | args = ' --rate 50 --msg Array1m --topic Array1m_' + str(i) + ' -l log_pub -p 1 -s 0 ' 26 | cc = cmd + args + db_args 27 | p = subprocess.Popen(cc, shell=True) 28 | 29 | for i in range(0, 3): 30 | args = ' --rate 50 --msg Array1m --topic Array1m_' + str(i) + ' -l log_sub -p 0 -s 1 ' 31 | cc = cmd + args + db_args 32 | p = subprocess.Popen(cc, shell=True) 33 | 34 | 35 | # launch 4 sets of PointCloud4m pub/sub, 1 to 1 36 | for i in range(0, 4): 37 | args = ' --rate 20 --msg PointCloud4m --topic PointCloud4m_' + str(i) + \ 38 | ' -l log_pub -p 1 -s 0 ' 39 | cc = cmd + args + db_args 40 | p = subprocess.Popen(cc, shell=True) 41 | 42 | for i in range(0, 4): 43 | args = ' --rate 20 --msg PointCloud4m --topic PointCloud4m_' + str(i) + \ 44 | ' -l log_sub -p 0 -s 1 ' 45 | cc = cmd + args + db_args 46 | p = subprocess.Popen(cc, shell=True) 47 | 48 | 49 | # launch 10 sets of Array1k, 1 pub to 5 subs 50 | for i in range(0, 10): 51 | args = ' --rate 100 --msg Array1k --topic Array1k_' + str(i) + ' -l log_pub -p 1 -s 0 ' 52 | cc = cmd + args + db_args 53 | p = subprocess.Popen(cc, shell=True) 54 | 55 | for i in range(0, 10): 56 | for j in range(0, 5): 57 | args = ' --rate 100 --msg Array1k --topic Array1k_' + str(i) + ' -l log_sub_' + \ 58 | str(j) + ' -p 0 -s 1 ' 59 | cc = cmd + args + db_args 60 | p = subprocess.Popen(cc, shell=True) 61 | -------------------------------------------------------------------------------- /performance_test/helper_scripts/security_setup.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "${BASH_SOURCE[0]}" == "${0}" ]] 4 | then 5 | echo "This script attempts to modify the current environment. It must be sourced, not run" 6 | exit 1 7 | fi 8 | 9 | # help 10 | if [ "$1" = "--help" ] || [ -z "$1" ] || [[ "$1" == "enable" && -z "$2" ]] || [[ "$1" != "disable" && "$1" != "enable" ]] 11 | then 12 | # ; then 13 | echo "Usage: setup_security " 14 | echo "directory to keys is required when security is enabled" 15 | echo "Example usage: " 16 | echo "To enable the security: " 17 | echo "bash setup_security.sh enable '/ApexOS/apex_ws/demo_keys'" 18 | echo "To disable the security: " 19 | echo "bash setup_security.sh disable" 20 | return 0 21 | fi 22 | 23 | # Make soure a ros2 setup.bash has been sourced, otherwise all of the ros2 commands below aren't going to work 24 | if ! ros2 --help &> /dev/null; 25 | then 26 | echo "ros2 command not found. Did you forget to source setup.bash before sourcing this script?" 27 | return 1 28 | fi 29 | 30 | if [ "$1" == "enable" ] 31 | then 32 | echo 'generating keys' 33 | 34 | max_nodes=5 35 | 36 | # create keys 37 | if ! ros2 security create_keystore "$2" 38 | then 39 | return 1 40 | fi 41 | 42 | echo "generating keys for /performance_test" 43 | ros2 security create_key "$2" /performance_test 44 | ros2 security create_permission "$2" /performance_test policies/policy.xml; 45 | echo " " 46 | 47 | #enable security 48 | echo "Setting environment variables to enable security" 49 | export ROS_SECURITY_ENABLE=true 50 | export ROS_SECURITY_STRATEGY=Enforce 51 | export ROS_SECURITY_KEYSTORE=$2 52 | elif [ "$1" == "disable" ] 53 | then 54 | #disable security 55 | echo "Unsetting environment variables to disable security" 56 | unset ROS_SECURITY_ENABLE 57 | unset ROS_SECURITY_STRATEGY 58 | unset ROS_SECURITY_ROOT_DIRECTORY 59 | else 60 | echo 'incorrect parameter '$2 61 | fi 62 | -------------------------------------------------------------------------------- /performance_test/include/performance_test/for_each.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Open Source Robotics Foundation, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef PERFORMANCE_TEST__FOR_EACH_HPP_ 16 | #define PERFORMANCE_TEST__FOR_EACH_HPP_ 17 | 18 | #include 19 | #include 20 | 21 | namespace performance_test 22 | { 23 | 24 | /// Iterates over std::tuple types 25 | /** 26 | * \param t tuple to be iterated 27 | * \param f functor to be applied over each element 28 | * \returns number of iterated elements 29 | */ 30 | template 31 | typename std::enable_if::type 32 | for_each(const std::tuple & t, FuncT f) 33 | { 34 | (void)t; 35 | (void)f; 36 | return I; 37 | } 38 | 39 | template 40 | typename std::enable_if::type 41 | for_each(const std::tuple & t, FuncT f) 42 | { 43 | f(std::get(t)); 44 | return for_each(t, f); 45 | } 46 | 47 | } // namespace performance_test 48 | 49 | #endif // PERFORMANCE_TEST__FOR_EACH_HPP_ 50 | -------------------------------------------------------------------------------- /performance_test/include/performance_test/version.h: -------------------------------------------------------------------------------- 1 | // Copyright 2019 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef PERFORMANCE_TEST__VERSION_H_ 16 | #define PERFORMANCE_TEST__VERSION_H_ 17 | 18 | #ifdef PERFORMANCE_TEST_VERSION 19 | const char * version = PERFORMANCE_TEST_VERSION; 20 | #else 21 | const char * version = "unknown"; 22 | #endif 23 | 24 | #endif // PERFORMANCE_TEST__VERSION_H_ 25 | -------------------------------------------------------------------------------- /performance_test/mapping_rules.yaml: -------------------------------------------------------------------------------- 1 | - 2 | ros1_package_name: 'performance_test_ros1_msgs' 3 | ros2_package_name: 'performance_test' 4 | -------------------------------------------------------------------------------- /performance_test/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | performance_test 6 | 0.0.1 7 | Tool to test performance of ROS2 and DDS data layers and communication. 8 | Apex AI, Inc. 9 | Apache 2.0 10 | 11 | ament_cmake 12 | rosidl_default_generators 13 | 14 | builtin_interfaces 15 | boost 16 | fastrtps_cmake_module 17 | java 18 | maven 19 | osrf_testing_tools_cpp 20 | rclcpp 21 | rmw_fastrtps_cpp 22 | rmw_implementation_cmake 23 | std_msgs 24 | sensor_msgs 25 | 26 | builtin_interfaces 27 | boost 28 | rclcpp 29 | rmw_implementation 30 | rosidl_default_runtime 31 | 32 | ament_cmake_nose 33 | ament_cmake_gtest 34 | ament_lint_auto 35 | ament_lint_common 36 | launch 37 | launch_testing 38 | rmw_implementation_cmake 39 | test_osrf_testing_tools_cpp 40 | 41 | rosidl_interface_packages 42 | 43 | 44 | ament_cmake 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /performance_test/src/communication_abstractions/communicator.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef COMMUNICATION_ABSTRACTIONS__COMMUNICATOR_HPP_ 16 | #define COMMUNICATION_ABSTRACTIONS__COMMUNICATOR_HPP_ 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | #include "../utilities/spin_lock.hpp" 23 | #include "../utilities/statistics_tracker.hpp" 24 | #include "../experiment_configuration/experiment_configuration.hpp" 25 | 26 | namespace performance_test 27 | { 28 | 29 | /// Helper base class for communication plugins which provides sample tracking helper functionality. 30 | class Communicator 31 | { 32 | public: 33 | /// Constructor which takes a reference \param lock to the lock to use. 34 | explicit Communicator(SpinLock & lock); 35 | 36 | /// Number of received samples. 37 | std::uint64_t num_received_samples() const; 38 | /// Number of sent samples. 39 | std::uint64_t num_sent_samples() const; 40 | /// Number of lost samples. 41 | std::uint64_t num_lost_samples() const; 42 | /** 43 | * \brief Adds a sample timestamp to the latency statistics. 44 | * \param sample_timestamp The timestamp the sample was sent. 45 | */ 46 | void add_latency_to_statistics(const std::int64_t sample_timestamp); 47 | /// Returns stored latency statistics. 48 | StatisticsTracker latency_statistics() const; 49 | /// Resets all internal counters. 50 | void reset(); 51 | 52 | protected: 53 | /// Get the the id for the next sample to publish. 54 | std::uint64_t next_sample_id(); 55 | /** 56 | * \brief Increment the number of received samples. 57 | * \param increment Optional different increment step. 58 | */ 59 | void increment_received(const std::uint64_t & increment = 1); 60 | /** 61 | * \brief Increment the number of sent samples. 62 | * \param increment Optional different increment step. 63 | */ 64 | void increment_sent(const std::uint64_t & increment = 1); 65 | /** 66 | * \brief Given a sample id this function check if and how many samples were lost and 67 | * updates counters accordingly. 68 | * \param sample_id The sample id to check. 69 | */ 70 | void update_lost_samples_counter(const std::uint64_t sample_id); 71 | /// Returns the last sample id received. 72 | std::uint64_t prev_sample_id() const; 73 | 74 | /// The experiment configuration. 75 | const ExperimentConfiguration & m_ec; 76 | /// The time the last sample was received [ns since epoc]. 77 | std::int64_t m_prev_timestamp; 78 | 79 | /// Lock the spinlock. 80 | void lock(); 81 | /// Unlock the spinlock. 82 | void unlock(); 83 | 84 | /// Returns the lock. 85 | auto & get_lock() 86 | { 87 | return m_lock; 88 | } 89 | 90 | private: 91 | std::uint64_t m_prev_sample_id; 92 | std::uint64_t m_num_lost_samples; 93 | std::uint64_t m_received_sample_counter; 94 | std::uint64_t m_sent_sample_counter; 95 | #if defined(QNX) 96 | std::uint64_t m_cps; 97 | #endif 98 | 99 | StatisticsTracker m_latency; 100 | 101 | SpinLock & m_lock; 102 | }; 103 | 104 | } // namespace performance_test 105 | 106 | #endif // COMMUNICATION_ABSTRACTIONS__COMMUNICATOR_HPP_ 107 | -------------------------------------------------------------------------------- /performance_test/src/communication_abstractions/ros2_callback_communicator.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef COMMUNICATION_ABSTRACTIONS__ROS2_CALLBACK_COMMUNICATOR_HPP_ 16 | #define COMMUNICATION_ABSTRACTIONS__ROS2_CALLBACK_COMMUNICATOR_HPP_ 17 | 18 | #include 19 | 20 | #include 21 | #include 22 | 23 | #include "../experiment_configuration/topics.hpp" 24 | 25 | #include "ros2_communicator.hpp" 26 | #include "resource_manager.hpp" 27 | 28 | namespace performance_test 29 | { 30 | /// Communication plugin for ROS 2 using ROS 2 callbacks for the subscription side. 31 | template 32 | class ROS2CallbackCommunicator : public ROS2Communicator 33 | { 34 | public: 35 | /// The data type to publish and subscribe to. 36 | using DataType = typename ROS2Communicator::DataType; 37 | 38 | /// Constructor which takes a reference \param lock to the lock to use. 39 | explicit ROS2CallbackCommunicator(SpinLock & lock) 40 | : ROS2Communicator(lock), 41 | m_subscription(nullptr) 42 | { 43 | m_executor.add_node(this->m_node); 44 | } 45 | 46 | /// Reads received data from ROS 2 using callbacks 47 | void update_subscription() override 48 | { 49 | if (!m_subscription) { 50 | m_subscription = this->m_node->template create_subscription( 51 | this->m_ec.topic_name() + this->m_ec.sub_topic_postfix(), this->m_ROS2QOSAdapter, 52 | [this](const typename DataType::SharedPtr data) {this->callback(data);}); 53 | #ifdef PERFORMANCE_TEST_POLLING_SUBSCRIPTION_ENABLED 54 | if (this->m_ec.expected_num_pubs() > 0) { 55 | m_subscription->wait_for_matched( 56 | this->m_ec.expected_num_pubs(), 57 | this->m_ec.expected_wait_for_matched_timeout()); 58 | } 59 | #endif 60 | } 61 | this->lock(); 62 | m_executor.spin_once(std::chrono::milliseconds(100)); 63 | this->unlock(); 64 | } 65 | 66 | private: 67 | rclcpp::executors::SingleThreadedExecutor m_executor; 68 | std::shared_ptr<::rclcpp::Subscription> m_subscription; 69 | }; 70 | 71 | 72 | } // namespace performance_test 73 | #endif // COMMUNICATION_ABSTRACTIONS__ROS2_CALLBACK_COMMUNICATOR_HPP_ 74 | -------------------------------------------------------------------------------- /performance_test/src/data_running/data_runner_factory.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef DATA_RUNNING__DATA_RUNNER_FACTORY_HPP_ 16 | #define DATA_RUNNING__DATA_RUNNER_FACTORY_HPP_ 17 | 18 | #include 19 | #include 20 | 21 | #include "data_runner_base.hpp" 22 | #include "../experiment_configuration/communication_mean.hpp" 23 | 24 | namespace performance_test 25 | { 26 | 27 | /// Factory to create a data runner. 28 | class DataRunnerFactory 29 | { 30 | public: 31 | /** 32 | * \brief The effective factory getter creating the desired object. 33 | * \param requested_topic_name The topic name the created object should use. 34 | * \param com_mean The communication mean the created object should use. 35 | * \param run_type The run type the created object should user. 36 | * \return The created object subject to the provided parameters. 37 | */ 38 | static std::shared_ptr get( 39 | const std::string & requested_topic_name, 40 | CommunicationMean com_mean, 41 | const RunType run_type); 42 | }; 43 | 44 | } // namespace performance_test 45 | 46 | #endif // DATA_RUNNING__DATA_RUNNER_FACTORY_HPP_ 47 | -------------------------------------------------------------------------------- /performance_test/src/experiment_configuration/communication_mean.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef EXPERIMENT_CONFIGURATION__COMMUNICATION_MEAN_HPP_ 16 | #define EXPERIMENT_CONFIGURATION__COMMUNICATION_MEAN_HPP_ 17 | 18 | namespace performance_test 19 | { 20 | 21 | /** 22 | * \brief Available means of communication. 23 | */ 24 | enum class CommunicationMean 25 | { 26 | ROS2 27 | #ifdef PERFORMANCE_TEST_POLLING_SUBSCRIPTION_ENABLED 28 | , ROS2PollingSubscription 29 | #endif 30 | #ifdef PERFORMANCE_TEST_FASTRTPS_ENABLED 31 | , FASTRTPS 32 | #endif 33 | #ifdef PERFORMANCE_TEST_CONNEXTDDSMICRO_ENABLED 34 | , CONNEXTDDSMICRO 35 | #endif 36 | #ifdef PERFORMANCE_TEST_CONNEXTDDS_ENABLED 37 | , CONNEXTDDS 38 | #endif 39 | #ifdef PERFORMANCE_TEST_CYCLONEDDS_ENABLED 40 | , CYCLONEDDS 41 | #endif 42 | #ifdef PERFORMANCE_TEST_ICEORYX_ENABLED 43 | , ICEORYX 44 | #endif 45 | #ifdef PERFORMANCE_TEST_OPENDDS_ENABLED 46 | , OPENDDS 47 | #endif 48 | }; 49 | 50 | /// Outstream operator for CommunicationMean. 51 | inline std::ostream & operator<<(std::ostream & stream, const CommunicationMean cm) 52 | { 53 | if (cm == CommunicationMean::ROS2) { 54 | return stream << "ROS2"; 55 | #ifdef PERFORMANCE_TEST_POLLING_SUBSCRIPTION_ENABLED 56 | } else if (cm == CommunicationMean::ROS2PollingSubscription) { 57 | return stream << "ROS2PollingSubscription"; 58 | #endif 59 | #ifdef PERFORMANCE_TEST_FASTRTPS_ENABLED 60 | } else if (cm == CommunicationMean::FASTRTPS) { 61 | return stream << "FASTRTPS"; 62 | #endif 63 | #ifdef PERFORMANCE_TEST_CONNEXTDDSMICRO_ENABLED 64 | } else if (cm == CommunicationMean::CONNEXTDDSMICRO) { 65 | return stream << "CONNEXTDDSMICRO"; 66 | #endif 67 | #ifdef PERFORMANCE_TEST_CONNEXTDDS_ENABLED 68 | } else if (cm == CommunicationMean::CONNEXTDDS) { 69 | return stream << "CONNEXTDDS"; 70 | #endif 71 | #ifdef PERFORMANCE_TEST_CYCLONEDDS_ENABLED 72 | } else if (cm == CommunicationMean::CYCLONEDDS) { 73 | return stream << "CYCLONEDDS"; 74 | #endif 75 | #ifdef PERFORMANCE_TEST_ICEORYX_ENABLED 76 | } else if (cm == CommunicationMean::ICEORYX) { 77 | return stream << "ICEORYX"; 78 | #endif 79 | #ifdef PERFORMANCE_TEST_OPENDDS_ENABLED 80 | } else if (cm == CommunicationMean::OPENDDS) { 81 | return stream << "OpenDDS"; 82 | #endif 83 | } else { 84 | throw std::invalid_argument("Enum value not supported!"); 85 | } 86 | } 87 | 88 | } // namespace performance_test 89 | 90 | #endif // EXPERIMENT_CONFIGURATION__COMMUNICATION_MEAN_HPP_ 91 | -------------------------------------------------------------------------------- /performance_test/src/experiment_configuration/external_info_storage.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include 16 | #include "external_info_storage.hpp" 17 | 18 | namespace performance_test 19 | { 20 | 21 | ExternalInfoStorage::ExternalInfoStorage() 22 | { 23 | const auto ptr = std::getenv("APEX_PERFORMANCE_TEST"); 24 | if (ptr) { 25 | std::stringstream ss; 26 | ss.str(ptr); 27 | boost::property_tree::ptree pt; 28 | boost::property_tree::read_json(ss, pt); 29 | for (boost::property_tree::ptree::iterator iter = pt.begin(); iter != pt.end(); iter++) { 30 | m_to_log += iter->first + ": " + iter->second.data() + "\n"; 31 | } 32 | #ifdef PERFORMANCE_TEST_ODB_FOR_SQL_ENABLED 33 | save_to_db(pt); 34 | #endif 35 | } 36 | } 37 | 38 | #ifdef PERFORMANCE_TEST_ODB_FOR_SQL_ENABLED 39 | void ExternalInfoStorage::save_to_db(boost::property_tree::ptree pt) 40 | { 41 | try { 42 | m_githash = pt.get("Githash"); 43 | } catch (boost::property_tree::ptree_error & e) { 44 | std::cout << e.what() << std::endl; 45 | } 46 | try { 47 | m_platform = pt.get("Platform"); 48 | } catch (boost::property_tree::ptree_error & e) { 49 | std::cout << e.what() << std::endl; 50 | } 51 | try { 52 | m_branch = pt.get("Branch"); 53 | } catch (boost::property_tree::ptree_error & e) { 54 | std::cout << e.what() << std::endl; 55 | } 56 | try { 57 | m_architecture = pt.get("Architecture"); 58 | } catch (boost::property_tree::ptree_error & e) { 59 | std::cout << e.what() << std::endl; 60 | } 61 | try { 62 | m_ci = pt.get("CI"); 63 | } catch (boost::property_tree::ptree_error & e) { 64 | std::cout << e.what() << std::endl; 65 | } 66 | } 67 | #endif 68 | 69 | } // namespace performance_test 70 | -------------------------------------------------------------------------------- /performance_test/src/experiment_configuration/external_info_storage.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef EXPERIMENT_CONFIGURATION__EXTERNAL_INFO_STORAGE_HPP_ 16 | #define EXPERIMENT_CONFIGURATION__EXTERNAL_INFO_STORAGE_HPP_ 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #ifdef PERFORMANCE_TEST_ODB_FOR_SQL_ENABLED 25 | #include 26 | #endif 27 | 28 | namespace performance_test 29 | { 30 | 31 | class ExternalInfoStorage 32 | { 33 | public: 34 | /** 35 | * \brief Constructor that reads values from environment variables. 36 | */ 37 | ExternalInfoStorage(); 38 | 39 | #pragma db transient 40 | std::string m_to_log; 41 | 42 | private: 43 | #ifdef PERFORMANCE_TEST_ODB_FOR_SQL_ENABLED 44 | friend class odb::access; 45 | 46 | /** 47 | * \brief Assigns values to the provided member variables if they exist in environment variable. 48 | * \param pt property tree with the values extracted from environment variable 49 | */ 50 | void save_to_db(boost::property_tree::ptree pt); 51 | 52 | #pragma db default() 53 | std::string m_githash; 54 | #pragma db default() 55 | std::string m_platform; 56 | #pragma db default() 57 | std::string m_branch; 58 | #pragma db default() 59 | std::string m_architecture; 60 | #pragma db default() 61 | std::string m_ci; 62 | #endif 63 | }; 64 | } // namespace performance_test 65 | #endif // EXPERIMENT_CONFIGURATION__EXTERNAL_INFO_STORAGE_HPP_ 66 | -------------------------------------------------------------------------------- /performance_test/src/experiment_configuration/qos_abstraction.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include "qos_abstraction.hpp" 16 | 17 | namespace performance_test 18 | { 19 | 20 | std::ostream & operator<<(std::ostream & stream, const QOSAbstraction::Reliability e) 21 | { 22 | if (e == QOSAbstraction::Reliability::BEST_EFFORT) { 23 | return stream << "BEST_EFFORT"; 24 | } else if (e == QOSAbstraction::Reliability::RELIABLE) { 25 | return stream << "RELIABLE"; 26 | } else { 27 | throw std::invalid_argument("Enum value not supported!"); 28 | } 29 | } 30 | 31 | std::ostream & operator<<(std::ostream & stream, const QOSAbstraction::Durability e) 32 | { 33 | if (e == QOSAbstraction::Durability::VOLATILE) { 34 | return stream << "VOLATILE"; 35 | } else if (e == QOSAbstraction::Durability::TRANSIENT_LOCAL) { 36 | return stream << "TRANSIENT_LOCAL"; 37 | } else { 38 | throw std::invalid_argument("Enum value not supported!"); 39 | } 40 | } 41 | 42 | std::ostream & operator<<(std::ostream & stream, const QOSAbstraction::HistoryKind e) 43 | { 44 | if (e == QOSAbstraction::HistoryKind::KEEP_ALL) { 45 | return stream << "KEEP_ALL"; 46 | } else if (e == QOSAbstraction::HistoryKind::KEEP_LAST) { 47 | return stream << "KEEP_LAST"; 48 | } else { 49 | throw std::invalid_argument("Enum value not supported!"); 50 | } 51 | } 52 | 53 | std::ostream & operator<<(std::ostream & stream, const QOSAbstraction e) 54 | { 55 | return stream << 56 | "Reliability: " << e.reliability << 57 | " Durability: " << e.durability << 58 | " History kind: " << e.history_kind << 59 | " History depth: " << e.history_depth << 60 | " Sync. pub/sub: " << e.sync_pubsub; 61 | } 62 | 63 | } // namespace performance_test 64 | -------------------------------------------------------------------------------- /performance_test/src/experiment_configuration/qos_abstraction.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef EXPERIMENT_CONFIGURATION__QOS_ABSTRACTION_HPP_ 16 | #define EXPERIMENT_CONFIGURATION__QOS_ABSTRACTION_HPP_ 17 | 18 | #include 19 | 20 | namespace performance_test 21 | { 22 | 23 | /** 24 | * \brief Holds limited QOS information in an DDS implementation independent way. 25 | */ 26 | struct QOSAbstraction 27 | { 28 | QOSAbstraction() 29 | : reliability(), 30 | durability(), 31 | history_kind(), 32 | history_depth(), 33 | sync_pubsub(false) {} 34 | 35 | /// Abstract type for DDS reliability. 36 | enum class Reliability 37 | { 38 | BEST_EFFORT, 39 | RELIABLE 40 | }; 41 | /// Abstract type for DDS durability. 42 | enum class Durability 43 | { 44 | VOLATILE, 45 | TRANSIENT_LOCAL 46 | }; 47 | /// Abstract type for DDS history kind. 48 | enum class HistoryKind 49 | { 50 | KEEP_ALL, 51 | KEEP_LAST 52 | }; 53 | 54 | /// Stored DDS reliability kind. 55 | Reliability reliability; 56 | /// Stored DDS durability kind. 57 | Durability durability; 58 | /// Stored DDS history kind. 59 | HistoryKind history_kind; 60 | /// Stored DDS history depth. 61 | uint32_t history_depth; 62 | /// Use synchronous pub/sub. 63 | bool sync_pubsub; 64 | }; 65 | 66 | /// Outstream operator for QOSAbstraction::Reliability. 67 | std::ostream & operator<<(std::ostream & stream, const QOSAbstraction::Reliability e); 68 | /// Outstream operator for QOSAbstraction::Durability. 69 | std::ostream & operator<<(std::ostream & stream, const QOSAbstraction::Durability e); 70 | /// Outstream operator for QOSAbstraction::HistoryKind. 71 | std::ostream & operator<<(std::ostream & stream, const QOSAbstraction::HistoryKind e); 72 | /// Outstream operator for QOSAbstraction::QOSAbstraction. 73 | std::ostream & operator<<(std::ostream & stream, const QOSAbstraction e); 74 | 75 | } // namespace performance_test 76 | 77 | #endif // EXPERIMENT_CONFIGURATION__QOS_ABSTRACTION_HPP_ 78 | -------------------------------------------------------------------------------- /performance_test/src/experiment_execution/analyze_runner.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef EXPERIMENT_EXECUTION__ANALYZE_RUNNER_HPP_ 16 | #define EXPERIMENT_EXECUTION__ANALYZE_RUNNER_HPP_ 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include "analysis_result.hpp" 24 | #include "../data_running/data_runner_factory.hpp" 25 | #include "../experiment_configuration/experiment_configuration.hpp" 26 | #include "../utilities/cpu_usage_tracker.hpp" 27 | 28 | #ifdef PERFORMANCE_TEST_ODB_FOR_SQL_ENABLED 29 | #include 30 | #endif 31 | namespace performance_test 32 | { 33 | /** 34 | * \brief Sets up and runs an experiment. 35 | */ 36 | class AnalyzeRunner 37 | { 38 | public: 39 | /** 40 | * \brief Creates publisher and subscriber runners used for the expermiment. 41 | */ 42 | AnalyzeRunner(); 43 | 44 | /** 45 | * \brief Runs the experiment. 46 | */ 47 | void run(); 48 | 49 | private: 50 | /** 51 | * \brief Analyezes and logs the state of the experiment. 52 | * \param loop_diff_start 53 | * \param experiment_diff_start 54 | */ 55 | 56 | void analyze( 57 | const std::chrono::nanoseconds loop_diff_start, 58 | const std::chrono::nanoseconds experiment_diff_start); 59 | 60 | /** 61 | * \brief Checks if the experiment is finished. 62 | * \param experiment_start The start of the experiment. 63 | * \return Is the experiment finnished 64 | */ 65 | bool check_exit(std::chrono::steady_clock::time_point experiment_start) const; 66 | 67 | const ExperimentConfiguration & m_ec; 68 | 69 | std::vector> m_pub_runners; 70 | std::vector> m_sub_runners; 71 | mutable bool m_is_first_entry; 72 | CPUsageTracker cpu_usage_tracker; 73 | 74 | #ifdef PERFORMANCE_TEST_ODB_FOR_SQL_ENABLED 75 | void apply_schema_migration(); 76 | std::unique_ptr m_db; 77 | #endif 78 | }; 79 | 80 | } // namespace performance_test 81 | 82 | #endif // EXPERIMENT_EXECUTION__ANALYZE_RUNNER_HPP_ 83 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array16k_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array16k__idl__ 4 | #define __performance_test_msgs__msg__Array16k__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array16k_" 17 | 18 | typedef octet performance_test_msgs__Array16k__octet_array_16384[16384]; 19 | 20 | struct Array16k_ 21 | { 22 | 23 | performance_test_msgs__Array16k__octet_array_16384 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array16k_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array16k__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array1k_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array1k__idl__ 4 | #define __performance_test_msgs__msg__Array1k__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array1k_" 17 | 18 | typedef octet performance_test_msgs__Array1k__octet_array_1024[1024]; 19 | 20 | struct Array1k_ 21 | { 22 | 23 | performance_test_msgs__Array1k__octet_array_1024 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array1k_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array1k__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array1m_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array1m__idl__ 4 | #define __performance_test_msgs__msg__Array1m__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array1m_" 17 | 18 | typedef octet performance_test_msgs__Array1m__octet_array_1048576[1048576]; 19 | 20 | struct Array1m_ 21 | { 22 | 23 | performance_test_msgs__Array1m__octet_array_1048576 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array1m_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array1m__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array256k_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array256k__idl__ 4 | #define __performance_test_msgs__msg__Array256k__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array256k_" 17 | 18 | typedef octet performance_test_msgs__Array256k__octet_array_262144[262144]; 19 | 20 | struct Array256k_ 21 | { 22 | 23 | performance_test_msgs__Array256k__octet_array_262144 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array256k_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array256k__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array2m_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array2m__idl__ 4 | #define __performance_test_msgs__msg__Array2m__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array2m_" 17 | 18 | typedef octet performance_test_msgs__Array2m__octet_array_2097152[2097152]; 19 | 20 | struct Array2m_ 21 | { 22 | 23 | performance_test_msgs__Array2m__octet_array_2097152 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array2m_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array2m__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array32k_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array32k__idl__ 4 | #define __performance_test_msgs__msg__Array32k__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array32k_" 17 | 18 | typedef octet performance_test_msgs__Array32k__octet_array_32768[32768]; 19 | 20 | struct Array32k_ 21 | { 22 | 23 | performance_test_msgs__Array32k__octet_array_32768 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array32k_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array32k__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array4k_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array4k__idl__ 4 | #define __performance_test_msgs__msg__Array4k__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array4k_" 17 | 18 | typedef octet performance_test_msgs__Array4k__octet_array_4096[4096]; 19 | 20 | struct Array4k_ 21 | { 22 | 23 | performance_test_msgs__Array4k__octet_array_4096 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array4k_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array4k__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array4m_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array4m__idl__ 4 | #define __performance_test_msgs__msg__Array4m__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array4m_" 17 | 18 | typedef octet performance_test_msgs__Array4m__octet_array_4194304[4194304]; 19 | 20 | struct Array4m_ 21 | { 22 | 23 | performance_test_msgs__Array4m__octet_array_4194304 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array4m_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array4m__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array60k_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array60k__idl__ 4 | #define __performance_test_msgs__msg__Array60k__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array60k_" 17 | 18 | typedef octet performance_test_msgs__Array60k__octet_array_61440[61440]; 19 | 20 | struct Array60k_ 21 | { 22 | 23 | performance_test_msgs__Array60k__octet_array_61440 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array60k_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array60k__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array64k_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array64k__idl__ 4 | #define __performance_test_msgs__msg__Array64k__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array64k_" 17 | 18 | typedef octet performance_test_msgs__Array64k__octet_array_65536[65536]; 19 | 20 | struct Array64k_ 21 | { 22 | 23 | performance_test_msgs__Array64k__octet_array_65536 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array64k_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array64k__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Array8m_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Array8m__idl__ 4 | #define __performance_test_msgs__msg__Array8m__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Array8m_" 17 | 18 | typedef octet performance_test_msgs__Array8m__octet_array_8388608[8388608]; 19 | 20 | struct Array8m_ 21 | { 22 | 23 | performance_test_msgs__Array8m__octet_array_8388608 array_; 24 | long long time_; 25 | unsigned long long id_; 26 | 27 | }; // struct Array8m_ 28 | 29 | 30 | }; // module dds_ 31 | 32 | }; // module msg 33 | 34 | }; // module performance_test_msgs 35 | 36 | #endif // __performance_test_msgs__msg__Array8m__idl__ 37 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Header_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __std_msgs__msg__Header__idl__ 4 | #define __std_msgs__msg__Header__idl__ 5 | 6 | #include "Time_.idl" 7 | 8 | module std_msgs 9 | { 10 | 11 | module msg 12 | { 13 | 14 | module dds_ 15 | { 16 | 17 | 18 | 19 | 20 | struct Header_ 21 | { 22 | 23 | builtin_interfaces::msg::dds_::Time_ stamp_; 24 | string frame_id_; 25 | 26 | }; // struct Header_ 27 | 28 | 29 | }; // module dds_ 30 | 31 | }; // module msg 32 | 33 | }; // module std_msgs 34 | 35 | #endif // __std_msgs__msg__Header__idl__ 36 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/NavSatFix_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__NavSatFix__idl__ 4 | #define __performance_test_msgs__msg__NavSatFix__idl__ 5 | 6 | #include "NavSatStatus_.idl" 7 | #include "Header_.idl" 8 | 9 | module performance_test_msgs 10 | { 11 | 12 | module msg 13 | { 14 | 15 | module dds_ 16 | { 17 | 18 | const octet NavSatFix__COVARIANCE_TYPE_UNKNOWN = 19 | 0; 20 | const octet NavSatFix__COVARIANCE_TYPE_APPROXIMATED = 21 | 1; 22 | const octet NavSatFix__COVARIANCE_TYPE_DIAGONAL_KNOWN = 23 | 2; 24 | const octet NavSatFix__COVARIANCE_TYPE_KNOWN = 25 | 3; 26 | 27 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::NavSatFix_" 28 | 29 | typedef double performance_test_msgs__NavSatFix__double_array_9[9]; 30 | 31 | struct NavSatFix_ 32 | { 33 | 34 | std_msgs::msg::dds_::Header_ header_; 35 | performance_test_msgs::msg::dds_::NavSatStatus_ status_; 36 | double latitude_; 37 | double longitude_; 38 | double altitude_; 39 | performance_test_msgs__NavSatFix__double_array_9 position_covariance_; 40 | octet position_covariance_type_; 41 | long long time_; 42 | unsigned long long id_; 43 | 44 | }; // struct NavSatFix_ 45 | 46 | 47 | }; // module dds_ 48 | 49 | }; // module msg 50 | 51 | }; // module performance_test_msgs 52 | 53 | #endif // __performance_test_msgs__msg__NavSatFix__idl__ 54 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/NavSatStatus_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__NavSatStatus__idl__ 4 | #define __performance_test_msgs__msg__NavSatStatus__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | const octet NavSatStatus__STATUS_NO_FIX = 17 | 255; 18 | const octet NavSatStatus__STATUS_FIX = 19 | 0; 20 | const octet NavSatStatus__STATUS_SBAS_FIX = 21 | 1; 22 | const octet NavSatStatus__STATUS_GBAS_FIX = 23 | 2; 24 | const unsigned short NavSatStatus__SERVICE_GPS = 25 | 1; 26 | const unsigned short NavSatStatus__SERVICE_GLONASS = 27 | 2; 28 | const unsigned short NavSatStatus__SERVICE_COMPASS = 29 | 4; 30 | const unsigned short NavSatStatus__SERVICE_GALILEO = 31 | 8; 32 | 33 | 34 | 35 | struct NavSatStatus_ 36 | { 37 | 38 | octet status_; 39 | unsigned short service_; 40 | 41 | }; // struct NavSatStatus_ 42 | 43 | 44 | }; // module dds_ 45 | 46 | }; // module msg 47 | 48 | }; // module performance_test_msgs 49 | 50 | #endif // __performance_test_msgs__msg__NavSatStatus__idl__ 51 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Point32_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Point32__idl__ 4 | #define __performance_test_msgs__msg__Point32__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | struct Point32_ 17 | { 18 | 19 | float x_; 20 | float y_; 21 | float z_; 22 | 23 | }; // struct Point32_ 24 | 25 | 26 | }; // module dds_ 27 | 28 | }; // module msg 29 | 30 | }; // module performance_test_msgs 31 | 32 | #endif // __performance_test_msgs__msg__Point32__idl__ 33 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/PointCloud1m_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__PointCloud1m__idl__ 4 | #define __performance_test_msgs__msg__PointCloud1m__idl__ 5 | 6 | #include "PointField_.idl" 7 | #include "Header_.idl" 8 | 9 | module performance_test_msgs 10 | { 11 | 12 | module msg 13 | { 14 | 15 | module dds_ 16 | { 17 | 18 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::PointCloud1m_" 19 | 20 | typedef sensor_msgs::msg::dds_::PointField_ performance_test_msgs__PointCloud1m__sensor_msgs__msg__dds___PointField__array_8[8]; 21 | typedef octet performance_test_msgs__PointCloud1m__octet_array_1048576[1048576]; 22 | 23 | struct PointCloud1m_ 24 | { 25 | 26 | std_msgs::msg::dds_::Header_ header_; 27 | unsigned long height_; 28 | unsigned long width_; 29 | performance_test_msgs__PointCloud1m__sensor_msgs__msg__dds___PointField__array_8 fields_; 30 | boolean is_bigendian_; 31 | unsigned long point_step_; 32 | unsigned long row_step_; 33 | performance_test_msgs__PointCloud1m__octet_array_1048576 data_; 34 | boolean is_dense_; 35 | long long time_; 36 | unsigned long long id_; 37 | 38 | }; // struct PointCloud1m_ 39 | 40 | 41 | }; // module dds_ 42 | 43 | }; // module msg 44 | 45 | }; // module performance_test_msgs 46 | 47 | #endif // __performance_test_msgs__msg__PointCloud1m__idl__ 48 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/PointCloud2m_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__PointCloud2m__idl__ 4 | #define __performance_test_msgs__msg__PointCloud2m__idl__ 5 | 6 | #include "PointField_.idl" 7 | #include "Header_.idl" 8 | 9 | module performance_test_msgs 10 | { 11 | 12 | module msg 13 | { 14 | 15 | module dds_ 16 | { 17 | 18 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::PointCloud2m_" 19 | 20 | typedef sensor_msgs::msg::dds_::PointField_ performance_test_msgs__PointCloud2m__sensor_msgs__msg__dds___PointField__array_8[8]; 21 | typedef octet performance_test_msgs__PointCloud2m__octet_array_2097152[2097152]; 22 | 23 | struct PointCloud2m_ 24 | { 25 | 26 | std_msgs::msg::dds_::Header_ header_; 27 | unsigned long height_; 28 | unsigned long width_; 29 | performance_test_msgs__PointCloud2m__sensor_msgs__msg__dds___PointField__array_8 fields_; 30 | boolean is_bigendian_; 31 | unsigned long point_step_; 32 | unsigned long row_step_; 33 | performance_test_msgs__PointCloud2m__octet_array_2097152 data_; 34 | boolean is_dense_; 35 | long long time_; 36 | unsigned long long id_; 37 | 38 | }; // struct PointCloud2m_ 39 | 40 | 41 | }; // module dds_ 42 | 43 | }; // module msg 44 | 45 | }; // module performance_test_msgs 46 | 47 | #endif // __performance_test_msgs__msg__PointCloud2m__idl__ 48 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/PointCloud4m_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__PointCloud4m__idl__ 4 | #define __performance_test_msgs__msg__PointCloud4m__idl__ 5 | 6 | #include "PointField_.idl" 7 | #include "Header_.idl" 8 | 9 | module performance_test_msgs 10 | { 11 | 12 | module msg 13 | { 14 | 15 | module dds_ 16 | { 17 | 18 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::PointCloud4m_" 19 | 20 | typedef sensor_msgs::msg::dds_::PointField_ performance_test_msgs__PointCloud4m__sensor_msgs__msg__dds___PointField__array_8[8]; 21 | typedef octet performance_test_msgs__PointCloud4m__octet_array_4194304[4194304]; 22 | 23 | struct PointCloud4m_ 24 | { 25 | 26 | std_msgs::msg::dds_::Header_ header_; 27 | unsigned long height_; 28 | unsigned long width_; 29 | performance_test_msgs__PointCloud4m__sensor_msgs__msg__dds___PointField__array_8 fields_; 30 | boolean is_bigendian_; 31 | unsigned long point_step_; 32 | unsigned long row_step_; 33 | performance_test_msgs__PointCloud4m__octet_array_4194304 data_; 34 | boolean is_dense_; 35 | long long time_; 36 | unsigned long long id_; 37 | 38 | }; // struct PointCloud4m_ 39 | 40 | 41 | }; // module dds_ 42 | 43 | }; // module msg 44 | 45 | }; // module performance_test_msgs 46 | 47 | #endif // __performance_test_msgs__msg__PointCloud4m__idl__ 48 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/PointCloud512k_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__PointCloud512k__idl__ 4 | #define __performance_test_msgs__msg__PointCloud512k__idl__ 5 | 6 | #include "PointField_.idl" 7 | #include "Header_.idl" 8 | 9 | module performance_test_msgs 10 | { 11 | 12 | module msg 13 | { 14 | 15 | module dds_ 16 | { 17 | 18 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::PointCloud512k_" 19 | 20 | typedef sensor_msgs::msg::dds_::PointField_ performance_test_msgs__PointCloud512k__sensor_msgs__msg__dds___PointField__array_8[8]; 21 | typedef octet performance_test_msgs__PointCloud512k__octet_array_524288[524288]; 22 | 23 | struct PointCloud512k_ 24 | { 25 | 26 | std_msgs::msg::dds_::Header_ header_; 27 | unsigned long height_; 28 | unsigned long width_; 29 | performance_test_msgs__PointCloud512k__sensor_msgs__msg__dds___PointField__array_8 fields_; 30 | boolean is_bigendian_; 31 | unsigned long point_step_; 32 | unsigned long row_step_; 33 | performance_test_msgs__PointCloud512k__octet_array_524288 data_; 34 | boolean is_dense_; 35 | long long time_; 36 | unsigned long long id_; 37 | 38 | }; // struct PointCloud512k_ 39 | 40 | 41 | }; // module dds_ 42 | 43 | }; // module msg 44 | 45 | }; // module performance_test_msgs 46 | 47 | #endif // __performance_test_msgs__msg__PointCloud512k__idl__ 48 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/PointCloud8m_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__PointCloud8m__idl__ 4 | #define __performance_test_msgs__msg__PointCloud8m__idl__ 5 | 6 | #include "PointField_.idl" 7 | #include "Header_.idl" 8 | 9 | module performance_test_msgs 10 | { 11 | 12 | module msg 13 | { 14 | 15 | module dds_ 16 | { 17 | 18 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::PointCloud8m_" 19 | 20 | typedef sensor_msgs::msg::dds_::PointField_ performance_test_msgs__PointCloud8m__sensor_msgs__msg__dds___PointField__array_8[8]; 21 | typedef octet performance_test_msgs__PointCloud8m__octet_array_8388608[8388608]; 22 | 23 | struct PointCloud8m_ 24 | { 25 | 26 | std_msgs::msg::dds_::Header_ header_; 27 | unsigned long height_; 28 | unsigned long width_; 29 | performance_test_msgs__PointCloud8m__sensor_msgs__msg__dds___PointField__array_8 fields_; 30 | boolean is_bigendian_; 31 | unsigned long point_step_; 32 | unsigned long row_step_; 33 | performance_test_msgs__PointCloud8m__octet_array_8388608 data_; 34 | boolean is_dense_; 35 | long long time_; 36 | unsigned long long id_; 37 | 38 | }; // struct PointCloud8m_ 39 | 40 | 41 | }; // module dds_ 42 | 43 | }; // module msg 44 | 45 | }; // module performance_test_msgs 46 | 47 | #endif // __performance_test_msgs__msg__PointCloud8m__idl__ 48 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/PointField_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __sensor_msgs__msg__PointField__idl__ 4 | #define __sensor_msgs__msg__PointField__idl__ 5 | 6 | 7 | module sensor_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | const octet PointField__INT8 = 17 | 1; 18 | const octet PointField__UINT8 = 19 | 2; 20 | const octet PointField__INT16 = 21 | 3; 22 | const octet PointField__UINT16 = 23 | 4; 24 | const octet PointField__INT32 = 25 | 5; 26 | const octet PointField__UINT32 = 27 | 6; 28 | const octet PointField__FLOAT32 = 29 | 7; 30 | const octet PointField__FLOAT64 = 31 | 8; 32 | 33 | 34 | 35 | struct PointField_ 36 | { 37 | 38 | string name_; 39 | unsigned long offset_; 40 | octet datatype_; 41 | unsigned long count_; 42 | 43 | }; // struct PointField_ 44 | 45 | 46 | }; // module dds_ 47 | 48 | }; // module msg 49 | 50 | }; // module sensor_msgs 51 | 52 | #endif // __sensor_msgs__msg__PointField__idl__ 53 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Point_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Point__idl__ 4 | #define __performance_test_msgs__msg__Point__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | 17 | 18 | 19 | struct Point_ 20 | { 21 | 22 | double x_; 23 | double y_; 24 | double z_; 25 | 26 | }; // struct Point_ 27 | 28 | 29 | }; // module dds_ 30 | 31 | }; // module msg 32 | 33 | }; // module performance_test_msgs 34 | 35 | #endif // __performance_test_msgs__msg__Point__idl__ 36 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Polygon_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Polygon__idl__ 4 | #define __performance_test_msgs__msg__Polygon__idl__ 5 | 6 | #include "Point32_.idl" 7 | 8 | module performance_test_msgs 9 | { 10 | 11 | module msg 12 | { 13 | 14 | module dds_ 15 | { 16 | 17 | 18 | typedef sequence points32_; 19 | 20 | struct Polygon_ 21 | { 22 | 23 | points32_ points_; 24 | 25 | }; // struct Polygon_ 26 | 27 | 28 | }; // module dds_ 29 | 30 | }; // module msg 31 | 32 | }; // module performance_test_msgs 33 | 34 | #endif // __performance_test_msgs__msg__Polygon__idl__ 35 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/RadarDetection_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__RadarDetection__idl__ 4 | #define __performance_test_msgs__msg__RadarDetection__idl__ 5 | 6 | #include "Point_.idl" 7 | #include "Vector3_.idl" 8 | 9 | module performance_test_msgs 10 | { 11 | 12 | module msg 13 | { 14 | 15 | module dds_ 16 | { 17 | 18 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::RadarDetection_" 19 | 20 | struct RadarDetection_ 21 | { 22 | 23 | unsigned short detection_id_; 24 | Point_ position_; 25 | Vector3_ velocity_; 26 | double amplitude_; 27 | long long time_; 28 | unsigned long long id_; 29 | 30 | }; // struct RadarDetection_ 31 | 32 | 33 | }; // module dds_ 34 | 35 | }; // module msg 36 | 37 | }; // module performance_test_msgs 38 | 39 | #endif // __performance_test_msgs__msg__RadarDetection__idl__ 40 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/RadarTrack_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__RadarTrack__idl__ 4 | #define __performance_test_msgs__msg__RadarTrack__idl__ 5 | 6 | #include "Polygon_.idl" 7 | #include "Vector3_.idl" 8 | 9 | 10 | module performance_test_msgs 11 | { 12 | 13 | module msg 14 | { 15 | 16 | module dds_ 17 | { 18 | 19 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::RadarTrack_" 20 | 21 | struct RadarTrack_ 22 | { 23 | 24 | unsigned short track_id_; 25 | Polygon_ track_shape_; 26 | Vector3_ linear_velocity_; 27 | Vector3_ linear_acceleration_; 28 | long long time_; 29 | unsigned long long id_; 30 | 31 | }; // struct RadarTrack_ 32 | 33 | 34 | }; // module dds_ 35 | 36 | }; // module msg 37 | 38 | }; // module performance_test_msgs 39 | 40 | #endif // __performance_test_msgs__msg__RadarTrack__idl__ 41 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Range_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Range__idl__ 4 | #define __performance_test_msgs__msg__Range__idl__ 5 | 6 | #include "Header_.idl" 7 | 8 | module performance_test_msgs 9 | { 10 | 11 | module msg 12 | { 13 | 14 | module dds_ 15 | { 16 | 17 | const octet Range__ULTRASOUND = 18 | 0; 19 | const octet Range__INFRARED = 20 | 1; 21 | 22 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Range_" 23 | 24 | struct Range_ 25 | { 26 | 27 | std_msgs::msg::dds_::Header_ header_; 28 | octet radiation_type_; 29 | float field_of_view_; 30 | float min_range_; 31 | float max_range_; 32 | float range_; 33 | long long time_; 34 | unsigned long long id_; 35 | 36 | }; // struct Range_ 37 | 38 | 39 | }; // module dds_ 40 | 41 | }; // module msg 42 | 43 | }; // module performance_test_msgs 44 | 45 | #endif // __performance_test_msgs__msg__Range__idl__ 46 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Struct16_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Struct16__idl__ 4 | #define __performance_test_msgs__msg__Struct16__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Struct16_" 17 | 18 | struct Struct16_ 19 | { 20 | 21 | octet struct0_; 22 | octet struct1_; 23 | octet struct2_; 24 | octet struct3_; 25 | octet struct4_; 26 | octet struct5_; 27 | octet struct6_; 28 | octet struct7_; 29 | octet struct8_; 30 | octet struct9_; 31 | octet structa_; 32 | octet structb_; 33 | octet structc_; 34 | octet structd_; 35 | octet structe_; 36 | octet structf_; 37 | long long time_; 38 | unsigned long long id_; 39 | 40 | }; // struct Struct16_ 41 | 42 | 43 | }; // module dds_ 44 | 45 | }; // module msg 46 | 47 | }; // module performance_test_msgs 48 | 49 | #endif // __performance_test_msgs__msg__Struct16__idl__ 50 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Struct256_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Struct256__idl__ 4 | #define __performance_test_msgs__msg__Struct256__idl__ 5 | 6 | #include "Struct16_.idl" 7 | 8 | module performance_test_msgs 9 | { 10 | 11 | module msg 12 | { 13 | 14 | module dds_ 15 | { 16 | 17 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Struct256_" 18 | 19 | struct Struct256_ 20 | { 21 | 22 | performance_test_msgs::msg::dds_::Struct16_ struct160_; 23 | performance_test_msgs::msg::dds_::Struct16_ struct161_; 24 | performance_test_msgs::msg::dds_::Struct16_ struct162_; 25 | performance_test_msgs::msg::dds_::Struct16_ struct163_; 26 | performance_test_msgs::msg::dds_::Struct16_ struct164_; 27 | performance_test_msgs::msg::dds_::Struct16_ struct165_; 28 | performance_test_msgs::msg::dds_::Struct16_ struct166_; 29 | performance_test_msgs::msg::dds_::Struct16_ struct167_; 30 | performance_test_msgs::msg::dds_::Struct16_ struct168_; 31 | performance_test_msgs::msg::dds_::Struct16_ struct169_; 32 | performance_test_msgs::msg::dds_::Struct16_ struct16a_; 33 | performance_test_msgs::msg::dds_::Struct16_ struct16b_; 34 | performance_test_msgs::msg::dds_::Struct16_ struct16c_; 35 | performance_test_msgs::msg::dds_::Struct16_ struct16d_; 36 | performance_test_msgs::msg::dds_::Struct16_ struct16e_; 37 | performance_test_msgs::msg::dds_::Struct16_ struct16f_; 38 | long long time_; 39 | unsigned long long id_; 40 | 41 | }; // struct Struct256_ 42 | 43 | 44 | }; // module dds_ 45 | 46 | }; // module msg 47 | 48 | }; // module performance_test_msgs 49 | 50 | #endif // __performance_test_msgs__msg__Struct256__idl__ 51 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Struct32k_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Struct32k__idl__ 4 | #define __performance_test_msgs__msg__Struct32k__idl__ 5 | 6 | #include "Struct4k_.idl" 7 | 8 | module performance_test_msgs 9 | { 10 | 11 | module msg 12 | { 13 | 14 | module dds_ 15 | { 16 | 17 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Struct32k_" 18 | 19 | struct Struct32k_ 20 | { 21 | 22 | performance_test_msgs::msg::dds_::Struct4k_ struct4k0_; 23 | performance_test_msgs::msg::dds_::Struct4k_ struct4k1_; 24 | performance_test_msgs::msg::dds_::Struct4k_ struct4k2_; 25 | performance_test_msgs::msg::dds_::Struct4k_ struct4k3_; 26 | performance_test_msgs::msg::dds_::Struct4k_ struct4k4_; 27 | performance_test_msgs::msg::dds_::Struct4k_ struct4k5_; 28 | performance_test_msgs::msg::dds_::Struct4k_ struct4k6_; 29 | performance_test_msgs::msg::dds_::Struct4k_ struct4k7_; 30 | long long time_; 31 | unsigned long long id_; 32 | 33 | }; // struct Struct32k_ 34 | 35 | 36 | }; // module dds_ 37 | 38 | }; // module msg 39 | 40 | }; // module performance_test_msgs 41 | 42 | #endif // __performance_test_msgs__msg__Struct32k__idl__ 43 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Struct4k_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Struct4k__idl__ 4 | #define __performance_test_msgs__msg__Struct4k__idl__ 5 | 6 | #include "Struct256_.idl" 7 | 8 | module performance_test_msgs 9 | { 10 | 11 | module msg 12 | { 13 | 14 | module dds_ 15 | { 16 | 17 | #pragma DCPS_DATA_TYPE "performance_test_msgs::msg::dds_::Struct4k_" 18 | 19 | struct Struct4k_ 20 | { 21 | 22 | performance_test_msgs::msg::dds_::Struct256_ struct2560_; 23 | performance_test_msgs::msg::dds_::Struct256_ struct2561_; 24 | performance_test_msgs::msg::dds_::Struct256_ struct2562_; 25 | performance_test_msgs::msg::dds_::Struct256_ struct2563_; 26 | performance_test_msgs::msg::dds_::Struct256_ struct2564_; 27 | performance_test_msgs::msg::dds_::Struct256_ struct2565_; 28 | performance_test_msgs::msg::dds_::Struct256_ struct2566_; 29 | performance_test_msgs::msg::dds_::Struct256_ struct2567_; 30 | performance_test_msgs::msg::dds_::Struct256_ struct2568_; 31 | performance_test_msgs::msg::dds_::Struct256_ struct2569_; 32 | performance_test_msgs::msg::dds_::Struct256_ struct256a_; 33 | performance_test_msgs::msg::dds_::Struct256_ struct256b_; 34 | performance_test_msgs::msg::dds_::Struct256_ struct256c_; 35 | performance_test_msgs::msg::dds_::Struct256_ struct256d_; 36 | performance_test_msgs::msg::dds_::Struct256_ struct256e_; 37 | performance_test_msgs::msg::dds_::Struct256_ struct256f_; 38 | long long time_; 39 | unsigned long long id_; 40 | 41 | }; // struct Struct4k_ 42 | 43 | 44 | }; // module dds_ 45 | 46 | }; // module msg 47 | 48 | }; // module performance_test_msgs 49 | 50 | #endif // __performance_test_msgs__msg__Struct4k__idl__ 51 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Time_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __builtin_interfaces__msg__Time__idl__ 4 | #define __builtin_interfaces__msg__Time__idl__ 5 | 6 | 7 | module builtin_interfaces 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | 17 | 18 | 19 | struct Time_ 20 | { 21 | 22 | long sec_; 23 | unsigned long nanosec_; 24 | 25 | }; // struct Time_ 26 | 27 | 28 | }; // module dds_ 29 | 30 | }; // module msg 31 | 32 | }; // module builtin_interfaces 33 | 34 | #endif // __builtin_interfaces__msg__Time__idl__ 35 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/Vector3_.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_generator_dds_idl/resource/msg.idl.em 2 | 3 | #ifndef __performance_test_msgs__msg__Vector3__idl__ 4 | #define __performance_test_msgs__msg__Vector3__idl__ 5 | 6 | 7 | module performance_test_msgs 8 | { 9 | 10 | module msg 11 | { 12 | 13 | module dds_ 14 | { 15 | 16 | 17 | 18 | 19 | struct Vector3_ 20 | { 21 | 22 | double x_; 23 | double y_; 24 | double z_; 25 | 26 | }; // struct Vector3_ 27 | 28 | 29 | }; // module dds_ 30 | 31 | }; // module msg 32 | 33 | }; // module performance_test_msgs 34 | 35 | #endif // __performance_test_msgs__msg__Vector3__idl__ 36 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/cyclonedds/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Apex.AI, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http:#www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | set(SOURCE_EXTENSION c) 16 | 17 | #find_package(CycloneDDS REQUIRED CONFIG) 18 | 19 | set_property(GLOBAL PROPERTY RULE_MESSAGES OFF) 20 | 21 | set(SUPP_IDL_SOURCE_C 22 | ../Header_.idl 23 | ../PointField_.idl 24 | ../Time_.idl 25 | ../NavSatStatus_.idl 26 | ../Polygon_.idl 27 | ../Point_.idl 28 | ../Point32_.idl 29 | ../Vector3_.idl) 30 | 31 | set(IDL_SOURCE_C 32 | ../Array1k_.idl 33 | ../Array4k_.idl 34 | ../Array16k_.idl 35 | ../Array32k_.idl 36 | ../Array60k_.idl 37 | ../Array64k_.idl 38 | ../Array256k_.idl 39 | ../Array1m_.idl 40 | ../Array2m_.idl 41 | ../Array4m_.idl 42 | ../Array8m_.idl 43 | 44 | ../Struct16_.idl 45 | ../Struct256_.idl 46 | ../Struct4k_.idl 47 | ../Struct32k_.idl 48 | 49 | ../PointCloud512k_.idl 50 | ../PointCloud1m_.idl 51 | ../PointCloud2m_.idl 52 | ../PointCloud4m_.idl 53 | ../PointCloud8m_.idl 54 | 55 | ../Range_.idl 56 | ../NavSatFix_.idl 57 | 58 | ../RadarDetection_.idl 59 | ../RadarTrack_.idl) 60 | 61 | set(IDL_GEN_ROOT ${CMAKE_CURRENT_BINARY_DIR}/gen/cyclonedds) 62 | 63 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/objs/${RTIME_TARGET_NAME}) 64 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/objs/${RTIME_TARGET_NAME}) 65 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/objs/${RTIME_TARGET_NAME}) 66 | 67 | file(MAKE_DIRECTORY ${IDL_GEN_ROOT}) 68 | 69 | foreach(idl ${SUPP_IDL_SOURCE_C} ${IDL_SOURCE_C}) 70 | get_filename_component(filename ${idl} NAME) 71 | string(REGEX REPLACE "\\.idl" "" basename ${filename}) 72 | 73 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/${idl}" DESTINATION "${IDL_GEN_ROOT}") 74 | if(${idl} IN_LIST IDL_SOURCE_C) 75 | file(APPEND ${IDL_GEN_ROOT}/${basename}.idl 76 | "#pragma keylist performance_test_msgs::msg::dds_::${basename}\n") 77 | endif() 78 | 79 | set(IDL_GEN_C ${IDL_GEN_ROOT}/${basename}.c) 80 | set(IDL_GEN_H ${IDL_GEN_ROOT}/${basename}.h) 81 | 82 | add_custom_command( 83 | OUTPUT ${IDL_GEN_C} ${IDL_GEN_H} 84 | COMMAND CycloneDDS::idlc 85 | ARGS -fcase-sensitive -fkeylist ${IDL_GEN_ROOT}/${basename}.idl 86 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${idl} 87 | COMMENT "Running idlc on ${FIL}" 88 | WORKING_DIRECTORY ${IDL_GEN_ROOT} 89 | VERBATIM) 90 | set_source_files_properties(${IDL_GEN_C} ${IDL_GEN_H} PROPERTIES GENERATED 1) 91 | list(APPEND IDL_GEN_H_LIST ${IDL_GEN_H}) 92 | list(APPEND IDL_GEN_C_LIST ${IDL_GEN_C}) 93 | endforeach() 94 | 95 | add_library(cyclonedds_idl ${IDL_GEN_H_LIST} ${IDL_GEN_C_LIST}) 96 | 97 | #target_include_directories(cyclonedds_idl PRIVATE CycloneDDS::ddsc) 98 | get_target_property(cdds_include_dir CycloneDDS::ddsc INTERFACE_INCLUDE_DIRECTORIES) 99 | include_directories("${cdds_include_dir}") 100 | 101 | set_compile_options(cyclonedds_idl) 102 | set(CYCLONEDDS_IDL_INCLUDE_DIR ${IDL_GEN_ROOT}/.. PARENT_SCOPE) 103 | -------------------------------------------------------------------------------- /performance_test/src/idlgen/fast_rtps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Apex.AI, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http:#www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | set(SOURCE_EXTENSION cxx) 16 | find_package(rmw REQUIRED) 17 | find_package(FastRTPS REQUIRED) 18 | include_directories(${FastRTPS_INCLUDE_DIR} ${fastcdr_INCLUDE_DIR}) 19 | # This is a workaround for broken include paths on some systems. 20 | include_directories(${FastRTPS_INCLUDE_DIR}/fastrtps/include ${fastcdr_INCLUDE_DIR}) 21 | set_property(GLOBAL PROPERTY RULE_MESSAGES OFF) 22 | 23 | set(IDL_SOURCE_C 24 | 25 | Header_.idl 26 | Time_.idl 27 | 28 | Array1k_.idl 29 | Array4k_.idl 30 | Array16k_.idl 31 | Array32k_.idl 32 | Array60k_.idl 33 | Array64k_.idl 34 | Array256k_.idl 35 | Array1m_.idl 36 | Array2m_.idl 37 | Array4m_.idl 38 | Array8m_.idl 39 | 40 | Struct16_.idl 41 | Struct256_.idl 42 | Struct4k_.idl 43 | Struct32k_.idl 44 | 45 | PointCloud512k_.idl 46 | PointCloud1m_.idl 47 | PointCloud2m_.idl 48 | PointCloud4m_.idl 49 | PointCloud8m_.idl 50 | 51 | Range_.idl 52 | NavSatFix_.idl 53 | NavSatStatus_.idl 54 | 55 | RadarDetection_.idl 56 | RadarTrack_.idl 57 | 58 | Polygon_.idl 59 | Point_.idl 60 | Point32_.idl 61 | PointField_.idl 62 | Vector3_.idl) 63 | 64 | set(IDL_GEN_ROOT ${CMAKE_CURRENT_BINARY_DIR}/gen/fast_rtps) 65 | file(MAKE_DIRECTORY ${IDL_GEN_ROOT}) 66 | 67 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/objs/${RTIME_TARGET_NAME}) 68 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/objs/${RTIME_TARGET_NAME}) 69 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/objs/${RTIME_TARGET_NAME}) 70 | 71 | find_program(FASTRTPS_BIN "fastrtpsgen") 72 | if(NOT FASTRTPS_BIN) 73 | message(WARNING "Could not find program 'fastrtpsgen' in path. Trying to use bundled version") 74 | find_program(FASTRTPS_BIN "fastrtpsgen" PATHS "${PROJECT_SOURCE_DIR}/bin") 75 | if(NOT FASTRTPS_BIN) 76 | message(FATAL_ERROR "Could not find program 'fastrtpsgen'") 77 | endif() 78 | endif() 79 | 80 | foreach(idl ${IDL_SOURCE_C}) 81 | get_filename_component(filename ${idl} NAME) 82 | string(REGEX REPLACE "\\.idl" "" basename ${filename}) 83 | set(IDL_GEN_C ${IDL_GEN_ROOT}/${basename}.${SOURCE_EXTENSION} 84 | ${IDL_GEN_ROOT}/${basename}PubSubTypes.${SOURCE_EXTENSION}) 85 | 86 | set(IDL_GEN_H ${IDL_GEN_ROOT}/${basename}.h 87 | ${IDL_GEN_ROOT}/${basename}PubSubTypes.h) 88 | 89 | set(IDL_GEN_SS ${IDL_GEN_ROOT}/${basename}PubSubTypes.h) 90 | 91 | add_custom_command(OUTPUT ${IDL_GEN_SS} 92 | COMMAND ${FASTRTPS_BIN} 93 | -replace 94 | -d ${IDL_GEN_ROOT} 95 | ${idl} 96 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../${idl} 97 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. 98 | COMMENT "Regeneration type support plugin from ${idl}" VERBATIM) 99 | set_source_files_properties(${IDL_GEN_C} ${IDL_GEN_H} PROPERTIES GENERATED 1) 100 | 101 | list(APPEND IDL_GEN_H_LIST ${IDL_GEN_H}) 102 | list(APPEND IDL_GEN_C_LIST ${IDL_GEN_C}) 103 | 104 | endforeach() 105 | 106 | add_library(fast_rtps_idl 107 | ${IDL_GEN_H_LIST} ${IDL_GEN_C_LIST} ${FastRTPS_LIBRARIES}) 108 | set_compile_options(fast_rtps_idl) 109 | set(FAST_RTPS_IDL_INCLUDE_DIR ${IDL_GEN_ROOT}/.. PARENT_SCOPE) 110 | -------------------------------------------------------------------------------- /performance_test/src/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include 16 | 17 | #include "experiment_configuration/experiment_configuration.hpp" 18 | #include "experiment_execution/analyze_runner.hpp" 19 | #include "communication_abstractions/resource_manager.hpp" 20 | 21 | int main(int argc, char ** argv) 22 | { 23 | auto & ec = performance_test::ExperimentConfiguration::get(); 24 | ec.setup(argc, argv); 25 | 26 | if (ec.use_ros2_layers()) { 27 | rclcpp::init(argc, argv); 28 | } 29 | 30 | { 31 | performance_test::AnalyzeRunner ar; 32 | ar.run(); 33 | } 34 | 35 | performance_test::ResourceManager::shutdown(); 36 | } 37 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array16k.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array16k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__16384[16384]; 9 | struct Array16k { 10 | octet__16384 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array16k.msg: -------------------------------------------------------------------------------- 1 | byte[16384] array 2 | int64 time 3 | uint64 id 4 | 5 | 6 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array16kZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array16k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__16384[16384]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array16kZeroCopy { 11 | octet__16384 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array1k.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array1k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__1024[1024]; 9 | struct Array1k { 10 | octet__1024 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array1k.msg: -------------------------------------------------------------------------------- 1 | byte[1024] array 2 | int64 time 3 | uint64 id 4 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array1kZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array1k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__1024[1024]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array1kZeroCopy { 11 | octet__1024 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array1m.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array1m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__1048576[1048576]; 9 | struct Array1m { 10 | octet__1048576 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array1m.msg: -------------------------------------------------------------------------------- 1 | byte[1048576] array 2 | int64 time 3 | uint64 id 4 | 5 | 6 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array1mZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array1m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__1048576[1048576]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array1mZeroCopy { 11 | octet__1048576 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array256k.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array256k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__262144[262144]; 9 | struct Array256k { 10 | octet__262144 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array256k.msg: -------------------------------------------------------------------------------- 1 | byte[262144] array 2 | int64 time 3 | uint64 id 4 | 5 | 6 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array256kZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array256k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__262144[262144]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array256kZeroCopy { 11 | octet__262144 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array2m.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array2m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__2097152[2097152]; 9 | struct Array2m { 10 | octet__2097152 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array2m.msg: -------------------------------------------------------------------------------- 1 | byte[2097152] array 2 | int64 time 3 | uint64 id 4 | 5 | 6 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array2mZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array2m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__2097152[2097152]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array2mZeroCopy { 11 | octet__2097152 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array32k.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array32k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__32768[32768]; 9 | struct Array32k { 10 | octet__32768 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array32k.msg: -------------------------------------------------------------------------------- 1 | byte[32768] array 2 | int64 time 3 | uint64 id 4 | 5 | 6 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array32kZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array32k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__32768[32768]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array32kZeroCopy { 11 | octet__32768 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array4k.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array4k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__4096[4096]; 9 | struct Array4k { 10 | octet__4096 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array4k.msg: -------------------------------------------------------------------------------- 1 | byte[4096] array 2 | int64 time 3 | uint64 id 4 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array4kZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array4k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__4096[4096]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array4kZeroCopy { 11 | octet__4096 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array4m.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array4m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__4194304[4194304]; 9 | struct Array4m { 10 | octet__4194304 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array4m.msg: -------------------------------------------------------------------------------- 1 | byte[4194304] array 2 | int64 time 3 | uint64 id 4 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array4mZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array4m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__4194304[4194304]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array4mZeroCopy { 11 | octet__4194304 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array60k.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array60k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__61440[61440]; 9 | struct Array60k { 10 | octet__61440 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array60k.msg: -------------------------------------------------------------------------------- 1 | byte[61440] array 2 | int64 time 3 | uint64 id 4 | 5 | 6 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array60kZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array60k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__61440[61440]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array60kZeroCopy { 11 | octet__61440 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array64k.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array64k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__65536[65536]; 9 | struct Array64k { 10 | octet__65536 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array64k.msg: -------------------------------------------------------------------------------- 1 | byte[65536] array 2 | int64 time 3 | uint64 id 4 | 5 | 6 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array64kZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array64k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__65536[65536]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array64kZeroCopy { 11 | octet__65536 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array8m.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array8m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__8388608[8388608]; 9 | struct Array8m { 10 | octet__8388608 array; 11 | 12 | int64 time; 13 | 14 | uint64 id; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array8m.msg: -------------------------------------------------------------------------------- 1 | byte[8388608] array 2 | int64 time 3 | uint64 id 4 | -------------------------------------------------------------------------------- /performance_test/src/msg/Array8mZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Array8m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | typedef octet octet__8388608[8388608]; 9 | @transfer_mode(SHMEM_REF) 10 | struct Array8mZeroCopy { 11 | octet__8388608 array; 12 | 13 | int64 time; 14 | 15 | uint64 id; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Header.idl: -------------------------------------------------------------------------------- 1 | #include "builtin_interfaces/msg/Time.idl" 2 | 3 | module performance_test { 4 | module msg { 5 | typedef char char__256[256]; 6 | struct Header { 7 | builtin_interfaces::msg::Time stamp; 8 | 9 | char__256 frame_id_zc; 10 | }; 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /performance_test/src/msg/NavSatFix.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/NavSatFix.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/NavSatStatus.idl" 6 | #include "std_msgs/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef double double__9[9]; 11 | module NavSatFix_Constants { 12 | const uint8 COVARIANCE_TYPE_UNKNOWN = 0; 13 | const uint8 COVARIANCE_TYPE_APPROXIMATED = 1; 14 | const uint8 COVARIANCE_TYPE_DIAGONAL_KNOWN = 2; 15 | const uint8 COVARIANCE_TYPE_KNOWN = 3; 16 | }; 17 | @verbatim (language="comment", text= 18 | " Navigation Satellite fix for any Global Navigation Satellite System" "\n" 19 | "" "\n" 20 | " Specified using the WGS 84 reference ellipsoid") 21 | struct NavSatFix { 22 | @verbatim (language="comment", text= 23 | " header.stamp specifies the ROS time for this measurement (the" "\n" 24 | " corresponding satellite time may be reported using the" "\n" 25 | " sensor_msgs/TimeReference message)." "\n" 26 | "" "\n" 27 | " header.frame_id is the frame of reference reported by the satellite" "\n" 28 | " receiver, usually the location of the antenna. This is a" "\n" 29 | " Euclidean frame relative to the vehicle, not a reference" "\n" 30 | " ellipsoid.") 31 | std_msgs::msg::Header header; 32 | 33 | @verbatim (language="comment", text= 34 | " Satellite fix status information.") 35 | performance_test::msg::NavSatStatus status; 36 | 37 | @verbatim (language="comment", text= 38 | " Latitude. Positive is north of equator; negative is south.") 39 | @unit (value="degrees") 40 | double latitude; 41 | 42 | @verbatim (language="comment", text= 43 | " Longitude. Positive is east of prime meridian; negative is west.") 44 | @unit (value="degrees") 45 | double longitude; 46 | 47 | @verbatim (language="comment", text= 48 | " Altitude. Positive is above the WGS 84 ellipsoid" "\n" 49 | " (quiet NaN if no altitude is available).") 50 | @unit (value="m") 51 | double altitude; 52 | 53 | @verbatim (language="comment", text= 54 | " Position covariance defined relative to a tangential plane" "\n" 55 | " through the reported position. The components are East, North, and" "\n" 56 | " Up (ENU), in row-major order." "\n" 57 | "" "\n" 58 | " Beware: this coordinate system exhibits singularities at the poles.") 59 | @unit (value="m^2") 60 | double__9 position_covariance; 61 | 62 | uint8 position_covariance_type; 63 | 64 | @verbatim (language="comment", text= 65 | " Support data for the performance test") 66 | int64 time; 67 | 68 | uint64 id; 69 | }; 70 | }; 71 | }; 72 | -------------------------------------------------------------------------------- /performance_test/src/msg/NavSatFix.msg: -------------------------------------------------------------------------------- 1 | # Navigation Satellite fix for any Global Navigation Satellite System 2 | # 3 | # Specified using the WGS 84 reference ellipsoid 4 | 5 | # header.stamp specifies the ROS time for this measurement (the 6 | # corresponding satellite time may be reported using the 7 | # sensor_msgs/TimeReference message). 8 | # 9 | # header.frame_id is the frame of reference reported by the satellite 10 | # receiver, usually the location of the antenna. This is a 11 | # Euclidean frame relative to the vehicle, not a reference 12 | # ellipsoid. 13 | std_msgs/Header header 14 | 15 | # Satellite fix status information. 16 | NavSatStatus status 17 | 18 | # Latitude [degrees]. Positive is north of equator; negative is south. 19 | float64 latitude 20 | 21 | # Longitude [degrees]. Positive is east of prime meridian; negative is west. 22 | float64 longitude 23 | 24 | # Altitude [m]. Positive is above the WGS 84 ellipsoid 25 | # (quiet NaN if no altitude is available). 26 | float64 altitude 27 | 28 | # Position covariance [m^2] defined relative to a tangential plane 29 | # through the reported position. The components are East, North, and 30 | # Up (ENU), in row-major order. 31 | # 32 | # Beware: this coordinate system exhibits singularities at the poles. 33 | float64[9] position_covariance 34 | 35 | # If the covariance of the fix is known, fill it in completely. If the 36 | # GPS receiver provides the variance of each measurement, put them 37 | # along the diagonal. If only Dilution of Precision is available, 38 | # estimate an approximate covariance from that. 39 | 40 | uint8 COVARIANCE_TYPE_UNKNOWN = 0 41 | uint8 COVARIANCE_TYPE_APPROXIMATED = 1 42 | uint8 COVARIANCE_TYPE_DIAGONAL_KNOWN = 2 43 | uint8 COVARIANCE_TYPE_KNOWN = 3 44 | 45 | uint8 position_covariance_type 46 | 47 | # Support data for the performance test 48 | int64 time 49 | uint64 id 50 | 51 | -------------------------------------------------------------------------------- /performance_test/src/msg/NavSatFixZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/NavSatFix.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/NavSatStatus.idl" 6 | #include "performance_test/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef double double__9[9]; 11 | module NavSatFix_Constants { 12 | const uint8 COVARIANCE_TYPE_UNKNOWN = 0; 13 | const uint8 COVARIANCE_TYPE_APPROXIMATED = 1; 14 | const uint8 COVARIANCE_TYPE_DIAGONAL_KNOWN = 2; 15 | const uint8 COVARIANCE_TYPE_KNOWN = 3; 16 | }; 17 | @verbatim (language="comment", text= 18 | " Navigation Satellite fix for any Global Navigation Satellite System" "\n" 19 | "" "\n" 20 | " Specified using the WGS 84 reference ellipsoid") 21 | @transfer_mode(SHMEM_REF) 22 | struct NavSatFixZeroCopy { 23 | @verbatim (language="comment", text= 24 | " header.stamp specifies the ROS time for this measurement (the" "\n" 25 | " corresponding satellite time may be reported using the" "\n" 26 | " sensor_msgs/TimeReference message)." "\n" 27 | "" "\n" 28 | " header.frame_id is the frame of reference reported by the satellite" "\n" 29 | " receiver, usually the location of the antenna. This is a" "\n" 30 | " Euclidean frame relative to the vehicle, not a reference" "\n" 31 | " ellipsoid.") 32 | performance_test::msg::Header header; 33 | 34 | @verbatim (language="comment", text= 35 | " Satellite fix status information.") 36 | performance_test::msg::NavSatStatus status; 37 | 38 | @verbatim (language="comment", text= 39 | " Latitude. Positive is north of equator; negative is south.") 40 | @unit (value="degrees") 41 | double latitude; 42 | 43 | @verbatim (language="comment", text= 44 | " Longitude. Positive is east of prime meridian; negative is west.") 45 | @unit (value="degrees") 46 | double longitude; 47 | 48 | @verbatim (language="comment", text= 49 | " Altitude. Positive is above the WGS 84 ellipsoid" "\n" 50 | " (quiet NaN if no altitude is available).") 51 | @unit (value="m") 52 | double altitude; 53 | 54 | @verbatim (language="comment", text= 55 | " Position covariance defined relative to a tangential plane" "\n" 56 | " through the reported position. The components are East, North, and" "\n" 57 | " Up (ENU), in row-major order." "\n" 58 | "" "\n" 59 | " Beware: this coordinate system exhibits singularities at the poles.") 60 | @unit (value="m^2") 61 | double__9 position_covariance; 62 | 63 | uint8 position_covariance_type; 64 | 65 | @verbatim (language="comment", text= 66 | " Support data for the performance test") 67 | int64 time; 68 | 69 | uint64 id; 70 | }; 71 | }; 72 | }; 73 | -------------------------------------------------------------------------------- /performance_test/src/msg/NavSatStatus.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/NavSatStatus.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | module NavSatStatus_Constants { 9 | const int8 STATUS_NO_FIX = -1; 10 | const int8 STATUS_FIX = 0; 11 | const int8 STATUS_SBAS_FIX = 1; 12 | const int8 STATUS_GBAS_FIX = 2; 13 | const uint16 SERVICE_GPS = 1; 14 | const uint16 SERVICE_GLONASS = 2; 15 | const uint16 SERVICE_COMPASS = 4; 16 | const uint16 SERVICE_GALILEO = 8; 17 | }; 18 | @verbatim (language="comment", text= 19 | " Navigation Satellite fix status for any Global Navigation Satellite System.") 20 | struct NavSatStatus { 21 | int8 status; 22 | 23 | uint16 service; 24 | }; 25 | }; 26 | }; 27 | -------------------------------------------------------------------------------- /performance_test/src/msg/NavSatStatus.msg: -------------------------------------------------------------------------------- 1 | # Navigation Satellite fix status for any Global Navigation Satellite System. 2 | 3 | # Whether to output an augmented fix is determined by both the fix 4 | # type and the last time differential corrections were received. A 5 | # fix is valid when status >= STATUS_FIX. 6 | 7 | int8 STATUS_NO_FIX = -1 # unable to fix position 8 | int8 STATUS_FIX = 0 # unaugmented fix 9 | int8 STATUS_SBAS_FIX = 1 # with satellite-based augmentation 10 | int8 STATUS_GBAS_FIX = 2 # with ground-based augmentation 11 | 12 | int8 status 13 | 14 | # Bits defining which Global Navigation Satellite System signals were 15 | # used by the receiver. 16 | 17 | uint16 SERVICE_GPS = 1 18 | uint16 SERVICE_GLONASS = 2 19 | uint16 SERVICE_COMPASS = 4 # includes BeiDou. 20 | uint16 SERVICE_GALILEO = 8 21 | 22 | uint16 service 23 | -------------------------------------------------------------------------------- /performance_test/src/msg/NavSatStatusZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/NavSatStatus.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | module NavSatStatus_Constants { 9 | const int8 STATUS_NO_FIX = -1; 10 | const int8 STATUS_FIX = 0; 11 | const int8 STATUS_SBAS_FIX = 1; 12 | const int8 STATUS_GBAS_FIX = 2; 13 | const uint16 SERVICE_GPS = 1; 14 | const uint16 SERVICE_GLONASS = 2; 15 | const uint16 SERVICE_COMPASS = 4; 16 | const uint16 SERVICE_GALILEO = 8; 17 | }; 18 | @verbatim (language="comment", text= 19 | " Navigation Satellite fix status for any Global Navigation Satellite System.") 20 | @transfer_mode(SHMEM_REF) 21 | struct NavSatStatusZeroCopy { 22 | int8 status; 23 | 24 | uint16 service; 25 | }; 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /performance_test/src/msg/Point.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Point.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | @verbatim (language="comment", text= 9 | " This contains the position of a point in free space") 10 | struct Point { 11 | double x; 12 | 13 | double y; 14 | 15 | double z; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Point.msg: -------------------------------------------------------------------------------- 1 | # This contains the position of a point in free space 2 | float64 x 3 | float64 y 4 | float64 z 5 | -------------------------------------------------------------------------------- /performance_test/src/msg/Point32.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Point32.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | @verbatim (language="comment", text= 9 | " This contains the position of a point in free space(with 32 bits of precision)." "\n" 10 | " It is recommeded to use Point wherever possible instead of Point32." "\n" 11 | "" "\n" 12 | " This recommendation is to promote interoperability." "\n" 13 | "" "\n" 14 | " This message is designed to take up less space when sending" "\n" 15 | " lots of points at once, as in the case of a PointCloud.") 16 | struct Point32 { 17 | float x; 18 | 19 | float y; 20 | 21 | float z; 22 | }; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /performance_test/src/msg/Point32.msg: -------------------------------------------------------------------------------- 1 | # This contains the position of a point in free space(with 32 bits of precision). 2 | # It is recommeded to use Point wherever possible instead of Point32. 3 | # 4 | # This recommendation is to promote interoperability. 5 | # 6 | # This message is designed to take up less space when sending 7 | # lots of points at once, as in the case of a PointCloud. 8 | 9 | float32 x 10 | float32 y 11 | float32 z -------------------------------------------------------------------------------- /performance_test/src/msg/Point32ZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Point32.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | @verbatim (language="comment", text= 9 | " This contains the position of a point in free space(with 32 bits of precision)." "\n" 10 | " It is recommeded to use Point wherever possible instead of Point32." "\n" 11 | "" "\n" 12 | " This recommendation is to promote interoperability." "\n" 13 | "" "\n" 14 | " This message is designed to take up less space when sending" "\n" 15 | " lots of points at once, as in the case of a PointCloud.") 16 | @transfer_mode(SHMEM_REF) 17 | struct Point32ZeroCopy { 18 | float x; 19 | 20 | float y; 21 | 22 | float z; 23 | }; 24 | }; 25 | }; 26 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud1m.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/PointCloud1m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "sensor_msgs/msg/PointField.idl" 6 | #include "std_msgs/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef sensor_msgs::msg::PointField sensor_msgs__msg__PointField; 11 | typedef sensor_msgs__msg__PointField sensor_msgs__msg__PointField__8[8]; 12 | typedef uint8 uint8__1048576[1048576]; 13 | @verbatim (language="comment", text= 14 | " This message holds a collection of N-dimensional points, which may" "\n" 15 | " contain additional information such as normals, intensity, etc. The" "\n" 16 | " point data is stored as a binary blob, its layout described by the" "\n" 17 | " contents of the \"fields\" array.") 18 | struct PointCloud1m { 19 | @verbatim (language="comment", text= 20 | " The point cloud data may be organized 2d (image-like) or 1d (unordered)." "\n" 21 | " Point clouds organized as 2d images may be produced by camera depth sensors" "\n" 22 | " such as stereo or time-of-flight." "\n" 23 | " Time of sensor data acquisition, and the coordinate frame ID (for 3d points).") 24 | std_msgs::msg::Header header; 25 | 26 | @verbatim (language="comment", text= 27 | " 2D structure of the point cloud. If the cloud is unordered, height is" "\n" 28 | " 1 and width is the length of the point cloud.") 29 | uint32 height; 30 | 31 | uint32 width; 32 | 33 | @verbatim (language="comment", text= 34 | " Describes the channels and their layout in the binary data blob.") 35 | sensor_msgs__msg__PointField__8 fields; 36 | 37 | @verbatim (language="comment", text= 38 | " Is this data bigendian?") 39 | boolean is_bigendian; 40 | 41 | @verbatim (language="comment", text= 42 | " Length of a point in bytes") 43 | uint32 point_step; 44 | 45 | @verbatim (language="comment", text= 46 | " Length of a row in bytes") 47 | uint32 row_step; 48 | 49 | @verbatim (language="comment", text= 50 | " Actual point data, size is (row_step*height)") 51 | uint8__1048576 data; 52 | 53 | @verbatim (language="comment", text= 54 | " True if there are no invalid points") 55 | boolean is_dense; 56 | 57 | @verbatim (language="comment", text= 58 | " Support data for the performance test") 59 | int64 time; 60 | 61 | uint64 id; 62 | }; 63 | }; 64 | }; 65 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud1m.msg: -------------------------------------------------------------------------------- 1 | # This message holds a collection of N-dimensional points, which may 2 | # contain additional information such as normals, intensity, etc. The 3 | # point data is stored as a binary blob, its layout described by the 4 | # contents of the "fields" array. 5 | 6 | # The point cloud data may be organized 2d (image-like) or 1d (unordered). 7 | # Point clouds organized as 2d images may be produced by camera depth sensors 8 | # such as stereo or time-of-flight. 9 | 10 | # Time of sensor data acquisition, and the coordinate frame ID (for 3d points). 11 | std_msgs/Header header 12 | 13 | # 2D structure of the point cloud. If the cloud is unordered, height is 14 | # 1 and width is the length of the point cloud. 15 | uint32 height 16 | uint32 width 17 | 18 | # Describes the channels and their layout in the binary data blob. 19 | sensor_msgs/PointField[8] fields 20 | 21 | bool is_bigendian # Is this data bigendian? 22 | uint32 point_step # Length of a point in bytes 23 | uint32 row_step # Length of a row in bytes 24 | uint8[1048576] data # Actual point data, size is (row_step*height) 25 | 26 | bool is_dense # True if there are no invalid points 27 | 28 | # Support data for the performance test 29 | int64 time 30 | uint64 id -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud1mZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/PointCloud1m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/PointField.idl" 6 | #include "performance_test/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef performance_test::msg::PointField performance_test__msg__PointField; 11 | typedef performance_test__msg__PointField performance_test__msg__PointField__8[8]; 12 | typedef uint8 uint8__1048576[1048576]; 13 | @verbatim (language="comment", text= 14 | " This message holds a collection of N-dimensional points, which may" "\n" 15 | " contain additional information such as normals, intensity, etc. The" "\n" 16 | " point data is stored as a binary blob, its layout described by the" "\n" 17 | " contents of the \"fields\" array.") 18 | @transfer_mode(SHMEM_REF) 19 | struct PointCloud1mZeroCopy { 20 | @verbatim (language="comment", text= 21 | " The point cloud data may be organized 2d (image-like) or 1d (unordered)." "\n" 22 | " Point clouds organized as 2d images may be produced by camera depth sensors" "\n" 23 | " such as stereo or time-of-flight." "\n" 24 | " Time of sensor data acquisition, and the coordinate frame ID (for 3d points).") 25 | performance_test::msg::Header header; 26 | 27 | @verbatim (language="comment", text= 28 | " 2D structure of the point cloud. If the cloud is unordered, height is" "\n" 29 | " 1 and width is the length of the point cloud.") 30 | uint32 height; 31 | 32 | uint32 width; 33 | 34 | @verbatim (language="comment", text= 35 | " Describes the channels and their layout in the binary data blob.") 36 | performance_test__msg__PointField__8 fields; 37 | 38 | @verbatim (language="comment", text= 39 | " Is this data bigendian?") 40 | boolean is_bigendian; 41 | 42 | @verbatim (language="comment", text= 43 | " Length of a point in bytes") 44 | uint32 point_step; 45 | 46 | @verbatim (language="comment", text= 47 | " Length of a row in bytes") 48 | uint32 row_step; 49 | 50 | @verbatim (language="comment", text= 51 | " Actual point data, size is (row_step*height)") 52 | uint8__1048576 data; 53 | 54 | @verbatim (language="comment", text= 55 | " True if there are no invalid points") 56 | boolean is_dense; 57 | 58 | @verbatim (language="comment", text= 59 | " Support data for the performance test") 60 | int64 time; 61 | 62 | uint64 id; 63 | }; 64 | }; 65 | }; 66 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud2m.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/PointCloud2m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "sensor_msgs/msg/PointField.idl" 6 | #include "std_msgs/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef sensor_msgs::msg::PointField sensor_msgs__msg__PointField; 11 | typedef sensor_msgs__msg__PointField sensor_msgs__msg__PointField__8[8]; 12 | typedef uint8 uint8__2097152[2097152]; 13 | @verbatim (language="comment", text= 14 | " This message holds a collection of N-dimensional points, which may" "\n" 15 | " contain additional information such as normals, intensity, etc. The" "\n" 16 | " point data is stored as a binary blob, its layout described by the" "\n" 17 | " contents of the \"fields\" array.") 18 | struct PointCloud2m { 19 | @verbatim (language="comment", text= 20 | " The point cloud data may be organized 2d (image-like) or 1d (unordered)." "\n" 21 | " Point clouds organized as 2d images may be produced by camera depth sensors" "\n" 22 | " such as stereo or time-of-flight." "\n" 23 | " Time of sensor data acquisition, and the coordinate frame ID (for 3d points).") 24 | std_msgs::msg::Header header; 25 | 26 | @verbatim (language="comment", text= 27 | " 2D structure of the point cloud. If the cloud is unordered, height is" "\n" 28 | " 1 and width is the length of the point cloud.") 29 | uint32 height; 30 | 31 | uint32 width; 32 | 33 | @verbatim (language="comment", text= 34 | " Describes the channels and their layout in the binary data blob.") 35 | sensor_msgs__msg__PointField__8 fields; 36 | 37 | @verbatim (language="comment", text= 38 | " Is this data bigendian?") 39 | boolean is_bigendian; 40 | 41 | @verbatim (language="comment", text= 42 | " Length of a point in bytes") 43 | uint32 point_step; 44 | 45 | @verbatim (language="comment", text= 46 | " Length of a row in bytes") 47 | uint32 row_step; 48 | 49 | @verbatim (language="comment", text= 50 | " Actual point data, size is (row_step*height)") 51 | uint8__2097152 data; 52 | 53 | @verbatim (language="comment", text= 54 | " True if there are no invalid points") 55 | boolean is_dense; 56 | 57 | @verbatim (language="comment", text= 58 | " Support data for the performance test") 59 | int64 time; 60 | 61 | uint64 id; 62 | }; 63 | }; 64 | }; 65 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud2m.msg: -------------------------------------------------------------------------------- 1 | # This message holds a collection of N-dimensional points, which may 2 | # contain additional information such as normals, intensity, etc. The 3 | # point data is stored as a binary blob, its layout described by the 4 | # contents of the "fields" array. 5 | 6 | # The point cloud data may be organized 2d (image-like) or 1d (unordered). 7 | # Point clouds organized as 2d images may be produced by camera depth sensors 8 | # such as stereo or time-of-flight. 9 | 10 | # Time of sensor data acquisition, and the coordinate frame ID (for 3d points). 11 | std_msgs/Header header 12 | 13 | # 2D structure of the point cloud. If the cloud is unordered, height is 14 | # 1 and width is the length of the point cloud. 15 | uint32 height 16 | uint32 width 17 | 18 | # Describes the channels and their layout in the binary data blob. 19 | sensor_msgs/PointField[8] fields 20 | 21 | bool is_bigendian # Is this data bigendian? 22 | uint32 point_step # Length of a point in bytes 23 | uint32 row_step # Length of a row in bytes 24 | uint8[2097152] data # Actual point data, size is (row_step*height) 25 | 26 | bool is_dense # True if there are no invalid points 27 | 28 | # Support data for the performance test 29 | int64 time 30 | uint64 id -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud2mZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/PointCloud2m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/PointField.idl" 6 | #include "performance_test/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef performance_test::msg::PointField performance_test__msg__PointField; 11 | typedef performance_test__msg__PointField performance_test__msg__PointField__8[8]; 12 | typedef uint8 uint8__2097152[2097152]; 13 | @verbatim (language="comment", text= 14 | " This message holds a collection of N-dimensional points, which may" "\n" 15 | " contain additional information such as normals, intensity, etc. The" "\n" 16 | " point data is stored as a binary blob, its layout described by the" "\n" 17 | " contents of the \"fields\" array.") 18 | @transfer_mode(SHMEM_REF) 19 | struct PointCloud2mZeroCopy { 20 | @verbatim (language="comment", text= 21 | " The point cloud data may be organized 2d (image-like) or 1d (unordered)." "\n" 22 | " Point clouds organized as 2d images may be produced by camera depth sensors" "\n" 23 | " such as stereo or time-of-flight." "\n" 24 | " Time of sensor data acquisition, and the coordinate frame ID (for 3d points).") 25 | performance_test::msg::Header header; 26 | 27 | @verbatim (language="comment", text= 28 | " 2D structure of the point cloud. If the cloud is unordered, height is" "\n" 29 | " 1 and width is the length of the point cloud.") 30 | uint32 height; 31 | 32 | uint32 width; 33 | 34 | @verbatim (language="comment", text= 35 | " Describes the channels and their layout in the binary data blob.") 36 | performance_test__msg__PointField__8 fields; 37 | 38 | @verbatim (language="comment", text= 39 | " Is this data bigendian?") 40 | boolean is_bigendian; 41 | 42 | @verbatim (language="comment", text= 43 | " Length of a point in bytes") 44 | uint32 point_step; 45 | 46 | @verbatim (language="comment", text= 47 | " Length of a row in bytes") 48 | uint32 row_step; 49 | 50 | @verbatim (language="comment", text= 51 | " Actual point data, size is (row_step*height)") 52 | uint8__2097152 data; 53 | 54 | @verbatim (language="comment", text= 55 | " True if there are no invalid points") 56 | boolean is_dense; 57 | 58 | @verbatim (language="comment", text= 59 | " Support data for the performance test") 60 | int64 time; 61 | 62 | uint64 id; 63 | }; 64 | }; 65 | }; 66 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud4m.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/PointCloud4m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "sensor_msgs/msg/PointField.idl" 6 | #include "std_msgs/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef sensor_msgs::msg::PointField sensor_msgs__msg__PointField; 11 | typedef sensor_msgs__msg__PointField sensor_msgs__msg__PointField__8[8]; 12 | typedef uint8 uint8__4194304[4194304]; 13 | @verbatim (language="comment", text= 14 | " This message holds a collection of N-dimensional points, which may" "\n" 15 | " contain additional information such as normals, intensity, etc. The" "\n" 16 | " point data is stored as a binary blob, its layout described by the" "\n" 17 | " contents of the \"fields\" array.") 18 | struct PointCloud4m { 19 | @verbatim (language="comment", text= 20 | " The point cloud data may be organized 2d (image-like) or 1d (unordered)." "\n" 21 | " Point clouds organized as 2d images may be produced by camera depth sensors" "\n" 22 | " such as stereo or time-of-flight." "\n" 23 | " Time of sensor data acquisition, and the coordinate frame ID (for 3d points).") 24 | std_msgs::msg::Header header; 25 | 26 | @verbatim (language="comment", text= 27 | " 2D structure of the point cloud. If the cloud is unordered, height is" "\n" 28 | " 1 and width is the length of the point cloud.") 29 | uint32 height; 30 | 31 | uint32 width; 32 | 33 | @verbatim (language="comment", text= 34 | " Describes the channels and their layout in the binary data blob.") 35 | sensor_msgs__msg__PointField__8 fields; 36 | 37 | @verbatim (language="comment", text= 38 | " Is this data bigendian?") 39 | boolean is_bigendian; 40 | 41 | @verbatim (language="comment", text= 42 | " Length of a point in bytes") 43 | uint32 point_step; 44 | 45 | @verbatim (language="comment", text= 46 | " Length of a row in bytes") 47 | uint32 row_step; 48 | 49 | @verbatim (language="comment", text= 50 | " Actual point data, size is (row_step*height)") 51 | uint8__4194304 data; 52 | 53 | @verbatim (language="comment", text= 54 | " True if there are no invalid points") 55 | boolean is_dense; 56 | 57 | @verbatim (language="comment", text= 58 | " Support data for the performance test") 59 | int64 time; 60 | 61 | uint64 id; 62 | }; 63 | }; 64 | }; 65 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud4m.msg: -------------------------------------------------------------------------------- 1 | # This message holds a collection of N-dimensional points, which may 2 | # contain additional information such as normals, intensity, etc. The 3 | # point data is stored as a binary blob, its layout described by the 4 | # contents of the "fields" array. 5 | 6 | # The point cloud data may be organized 2d (image-like) or 1d (unordered). 7 | # Point clouds organized as 2d images may be produced by camera depth sensors 8 | # such as stereo or time-of-flight. 9 | 10 | # Time of sensor data acquisition, and the coordinate frame ID (for 3d points). 11 | std_msgs/Header header 12 | 13 | # 2D structure of the point cloud. If the cloud is unordered, height is 14 | # 1 and width is the length of the point cloud. 15 | uint32 height 16 | uint32 width 17 | 18 | # Describes the channels and their layout in the binary data blob. 19 | sensor_msgs/PointField[8] fields 20 | 21 | bool is_bigendian # Is this data bigendian? 22 | uint32 point_step # Length of a point in bytes 23 | uint32 row_step # Length of a row in bytes 24 | uint8[4194304] data # Actual point data, size is (row_step*height) 25 | 26 | bool is_dense # True if there are no invalid points 27 | 28 | # Support data for the performance test 29 | int64 time 30 | uint64 id -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud4mZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/PointCloud4m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/PointField.idl" 6 | #include "performance_test/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef performance_test::msg::PointField performance_test__msg__PointField; 11 | typedef performance_test__msg__PointField performance_test__msg__PointField__8[8]; 12 | typedef uint8 uint8__4194304[4194304]; 13 | @verbatim (language="comment", text= 14 | " This message holds a collection of N-dimensional points, which may" "\n" 15 | " contain additional information such as normals, intensity, etc. The" "\n" 16 | " point data is stored as a binary blob, its layout described by the" "\n" 17 | " contents of the \"fields\" array.") 18 | @transfer_mode(SHMEM_REF) 19 | struct PointCloud4mZeroCopy { 20 | @verbatim (language="comment", text= 21 | " The point cloud data may be organized 2d (image-like) or 1d (unordered)." "\n" 22 | " Point clouds organized as 2d images may be produced by camera depth sensors" "\n" 23 | " such as stereo or time-of-flight." "\n" 24 | " Time of sensor data acquisition, and the coordinate frame ID (for 3d points).") 25 | performance_test::msg::Header header; 26 | 27 | @verbatim (language="comment", text= 28 | " 2D structure of the point cloud. If the cloud is unordered, height is" "\n" 29 | " 1 and width is the length of the point cloud.") 30 | uint32 height; 31 | 32 | uint32 width; 33 | 34 | @verbatim (language="comment", text= 35 | " Describes the channels and their layout in the binary data blob.") 36 | performance_test__msg__PointField__8 fields; 37 | 38 | @verbatim (language="comment", text= 39 | " Is this data bigendian?") 40 | boolean is_bigendian; 41 | 42 | @verbatim (language="comment", text= 43 | " Length of a point in bytes") 44 | uint32 point_step; 45 | 46 | @verbatim (language="comment", text= 47 | " Length of a row in bytes") 48 | uint32 row_step; 49 | 50 | @verbatim (language="comment", text= 51 | " Actual point data, size is (row_step*height)") 52 | uint8__4194304 data; 53 | 54 | @verbatim (language="comment", text= 55 | " True if there are no invalid points") 56 | boolean is_dense; 57 | 58 | @verbatim (language="comment", text= 59 | " Support data for the performance test") 60 | int64 time; 61 | 62 | uint64 id; 63 | }; 64 | }; 65 | }; 66 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud512k.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/PointCloud512k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "sensor_msgs/msg/PointField.idl" 6 | #include "std_msgs/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef sensor_msgs::msg::PointField sensor_msgs__msg__PointField; 11 | typedef sensor_msgs__msg__PointField sensor_msgs__msg__PointField__8[8]; 12 | typedef uint8 uint8__524288[524288]; 13 | @verbatim (language="comment", text= 14 | " This message holds a collection of N-dimensional points, which may" "\n" 15 | " contain additional information such as normals, intensity, etc. The" "\n" 16 | " point data is stored as a binary blob, its layout described by the" "\n" 17 | " contents of the \"fields\" array.") 18 | struct PointCloud512k { 19 | @verbatim (language="comment", text= 20 | " The point cloud data may be organized 2d (image-like) or 1d (unordered)." "\n" 21 | " Point clouds organized as 2d images may be produced by camera depth sensors" "\n" 22 | " such as stereo or time-of-flight." "\n" 23 | " Time of sensor data acquisition, and the coordinate frame ID (for 3d points).") 24 | std_msgs::msg::Header header; 25 | 26 | @verbatim (language="comment", text= 27 | " 2D structure of the point cloud. If the cloud is unordered, height is" "\n" 28 | " 1 and width is the length of the point cloud.") 29 | uint32 height; 30 | 31 | uint32 width; 32 | 33 | @verbatim (language="comment", text= 34 | " Describes the channels and their layout in the binary data blob.") 35 | sensor_msgs__msg__PointField__8 fields; 36 | 37 | @verbatim (language="comment", text= 38 | " Is this data bigendian?") 39 | boolean is_bigendian; 40 | 41 | @verbatim (language="comment", text= 42 | " Length of a point in bytes") 43 | uint32 point_step; 44 | 45 | @verbatim (language="comment", text= 46 | " Length of a row in bytes") 47 | uint32 row_step; 48 | 49 | @verbatim (language="comment", text= 50 | " Actual point data, size is (row_step*height)") 51 | uint8__524288 data; 52 | 53 | @verbatim (language="comment", text= 54 | " True if there are no invalid points") 55 | boolean is_dense; 56 | 57 | @verbatim (language="comment", text= 58 | " Support data for the performance test") 59 | int64 time; 60 | 61 | uint64 id; 62 | }; 63 | }; 64 | }; 65 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud512k.msg: -------------------------------------------------------------------------------- 1 | # This message holds a collection of N-dimensional points, which may 2 | # contain additional information such as normals, intensity, etc. The 3 | # point data is stored as a binary blob, its layout described by the 4 | # contents of the "fields" array. 5 | 6 | # The point cloud data may be organized 2d (image-like) or 1d (unordered). 7 | # Point clouds organized as 2d images may be produced by camera depth sensors 8 | # such as stereo or time-of-flight. 9 | 10 | # Time of sensor data acquisition, and the coordinate frame ID (for 3d points). 11 | std_msgs/Header header 12 | 13 | # 2D structure of the point cloud. If the cloud is unordered, height is 14 | # 1 and width is the length of the point cloud. 15 | uint32 height 16 | uint32 width 17 | 18 | # Describes the channels and their layout in the binary data blob. 19 | sensor_msgs/PointField[8] fields 20 | 21 | bool is_bigendian # Is this data bigendian? 22 | uint32 point_step # Length of a point in bytes 23 | uint32 row_step # Length of a row in bytes 24 | uint8[524288] data # Actual point data, size is (row_step*height) 25 | 26 | bool is_dense # True if there are no invalid points 27 | 28 | # Support data for the performance test 29 | int64 time 30 | uint64 id 31 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud512kZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/PointCloud512k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/PointField.idl" 6 | #include "performance_test/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef performance_test::msg::PointField performance_test__msg__PointField; 11 | typedef performance_test__msg__PointField performance_test__msg__PointField__8[8]; 12 | typedef uint8 uint8__524288[524288]; 13 | @verbatim (language="comment", text= 14 | " This message holds a collection of N-dimensional points, which may" "\n" 15 | " contain additional information such as normals, intensity, etc. The" "\n" 16 | " point data is stored as a binary blob, its layout described by the" "\n" 17 | " contents of the \"fields\" array.") 18 | @transfer_mode(SHMEM_REF) 19 | struct PointCloud512kZeroCopy { 20 | @verbatim (language="comment", text= 21 | " The point cloud data may be organized 2d (image-like) or 1d (unordered)." "\n" 22 | " Point clouds organized as 2d images may be produced by camera depth sensors" "\n" 23 | " such as stereo or time-of-flight." "\n" 24 | " Time of sensor data acquisition, and the coordinate frame ID (for 3d points).") 25 | performance_test::msg::Header header; 26 | 27 | @verbatim (language="comment", text= 28 | " 2D structure of the point cloud. If the cloud is unordered, height is" "\n" 29 | " 1 and width is the length of the point cloud.") 30 | uint32 height; 31 | 32 | uint32 width; 33 | 34 | @verbatim (language="comment", text= 35 | " Describes the channels and their layout in the binary data blob.") 36 | performance_test__msg__PointField__8 fields; 37 | 38 | @verbatim (language="comment", text= 39 | " Is this data bigendian?") 40 | boolean is_bigendian; 41 | 42 | @verbatim (language="comment", text= 43 | " Length of a point in bytes") 44 | uint32 point_step; 45 | 46 | @verbatim (language="comment", text= 47 | " Length of a row in bytes") 48 | uint32 row_step; 49 | 50 | @verbatim (language="comment", text= 51 | " Actual point data, size is (row_step*height)") 52 | uint8__524288 data; 53 | 54 | @verbatim (language="comment", text= 55 | " True if there are no invalid points") 56 | boolean is_dense; 57 | 58 | @verbatim (language="comment", text= 59 | " Support data for the performance test") 60 | int64 time; 61 | 62 | uint64 id; 63 | }; 64 | }; 65 | }; 66 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud8m.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/PointCloud8m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "sensor_msgs/msg/PointField.idl" 6 | #include "std_msgs/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef sensor_msgs::msg::PointField sensor_msgs__msg__PointField; 11 | typedef sensor_msgs__msg__PointField sensor_msgs__msg__PointField__8[8]; 12 | typedef uint8 uint8__8388608[8388608]; 13 | @verbatim (language="comment", text= 14 | " This message holds a collection of N-dimensional points, which may" "\n" 15 | " contain additional information such as normals, intensity, etc. The" "\n" 16 | " point data is stored as a binary blob, its layout described by the" "\n" 17 | " contents of the \"fields\" array.") 18 | struct PointCloud8m { 19 | @verbatim (language="comment", text= 20 | " The point cloud data may be organized 2d (image-like) or 1d (unordered)." "\n" 21 | " Point clouds organized as 2d images may be produced by camera depth sensors" "\n" 22 | " such as stereo or time-of-flight." "\n" 23 | " Time of sensor data acquisition, and the coordinate frame ID (for 3d points).") 24 | std_msgs::msg::Header header; 25 | 26 | @verbatim (language="comment", text= 27 | " 2D structure of the point cloud. If the cloud is unordered, height is" "\n" 28 | " 1 and width is the length of the point cloud.") 29 | uint32 height; 30 | 31 | uint32 width; 32 | 33 | @verbatim (language="comment", text= 34 | " Describes the channels and their layout in the binary data blob.") 35 | sensor_msgs__msg__PointField__8 fields; 36 | 37 | @verbatim (language="comment", text= 38 | " Is this data bigendian?") 39 | boolean is_bigendian; 40 | 41 | @verbatim (language="comment", text= 42 | " Length of a point in bytes") 43 | uint32 point_step; 44 | 45 | @verbatim (language="comment", text= 46 | " Length of a row in bytes") 47 | uint32 row_step; 48 | 49 | @verbatim (language="comment", text= 50 | " Actual point data, size is (row_step*height)") 51 | uint8__8388608 data; 52 | 53 | @verbatim (language="comment", text= 54 | " True if there are no invalid points") 55 | boolean is_dense; 56 | 57 | @verbatim (language="comment", text= 58 | " Support data for the performance test") 59 | int64 time; 60 | 61 | uint64 id; 62 | }; 63 | }; 64 | }; 65 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud8m.msg: -------------------------------------------------------------------------------- 1 | # This message holds a collection of N-dimensional points, which may 2 | # contain additional information such as normals, intensity, etc. The 3 | # point data is stored as a binary blob, its layout described by the 4 | # contents of the "fields" array. 5 | 6 | # The point cloud data may be organized 2d (image-like) or 1d (unordered). 7 | # Point clouds organized as 2d images may be produced by camera depth sensors 8 | # such as stereo or time-of-flight. 9 | 10 | # Time of sensor data acquisition, and the coordinate frame ID (for 3d points). 11 | std_msgs/Header header 12 | 13 | # 2D structure of the point cloud. If the cloud is unordered, height is 14 | # 1 and width is the length of the point cloud. 15 | uint32 height 16 | uint32 width 17 | 18 | # Describes the channels and their layout in the binary data blob. 19 | sensor_msgs/PointField[8] fields 20 | 21 | bool is_bigendian # Is this data bigendian? 22 | uint32 point_step # Length of a point in bytes 23 | uint32 row_step # Length of a row in bytes 24 | uint8[8388608] data # Actual point data, size is (row_step*height) 25 | 26 | bool is_dense # True if there are no invalid points 27 | 28 | # Support data for the performance test 29 | int64 time 30 | uint64 id -------------------------------------------------------------------------------- /performance_test/src/msg/PointCloud8mZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/PointCloud8m.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/PointField.idl" 6 | #include "performance_test/msg/Header.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | typedef performance_test::msg::PointField performance_test__msg__PointField; 11 | typedef performance_test__msg__PointField performance_test__msg__PointField__8[8]; 12 | typedef uint8 uint8__8388608[8388608]; 13 | @verbatim (language="comment", text= 14 | " This message holds a collection of N-dimensional points, which may" "\n" 15 | " contain additional information such as normals, intensity, etc. The" "\n" 16 | " point data is stored as a binary blob, its layout described by the" "\n" 17 | " contents of the \"fields\" array.") 18 | @transfer_mode(SHMEM_REF) 19 | struct PointCloud8mZeroCopy { 20 | @verbatim (language="comment", text= 21 | " The point cloud data may be organized 2d (image-like) or 1d (unordered)." "\n" 22 | " Point clouds organized as 2d images may be produced by camera depth sensors" "\n" 23 | " such as stereo or time-of-flight." "\n" 24 | " Time of sensor data acquisition, and the coordinate frame ID (for 3d points).") 25 | performance_test::msg::Header header; 26 | 27 | @verbatim (language="comment", text= 28 | " 2D structure of the point cloud. If the cloud is unordered, height is" "\n" 29 | " 1 and width is the length of the point cloud.") 30 | uint32 height; 31 | 32 | uint32 width; 33 | 34 | @verbatim (language="comment", text= 35 | " Describes the channels and their layout in the binary data blob.") 36 | performance_test__msg__PointField__8 fields; 37 | 38 | @verbatim (language="comment", text= 39 | " Is this data bigendian?") 40 | boolean is_bigendian; 41 | 42 | @verbatim (language="comment", text= 43 | " Length of a point in bytes") 44 | uint32 point_step; 45 | 46 | @verbatim (language="comment", text= 47 | " Length of a row in bytes") 48 | uint32 row_step; 49 | 50 | @verbatim (language="comment", text= 51 | " Actual point data, size is (row_step*height)") 52 | uint8__8388608 data; 53 | 54 | @verbatim (language="comment", text= 55 | " True if there are no invalid points") 56 | boolean is_dense; 57 | 58 | @verbatim (language="comment", text= 59 | " Support data for the performance test") 60 | int64 time; 61 | 62 | uint64 id; 63 | }; 64 | }; 65 | }; 66 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointField.idl: -------------------------------------------------------------------------------- 1 | module performance_test { 2 | module msg { 3 | module PointField_Constants { 4 | const uint8 INT8 = 1; 5 | const uint8 UINT8 = 2; 6 | const uint8 INT16 = 3; 7 | const uint8 UINT16 = 4; 8 | const uint8 INT32 = 5; 9 | const uint8 UINT32 = 6; 10 | const uint8 FLOAT32 = 7; 11 | const uint8 FLOAT64 = 8; 12 | }; 13 | typedef char char__256[256]; 14 | struct PointField { 15 | char__256 name_zc; 16 | 17 | uint32 offset; 18 | 19 | uint8 datatype; 20 | 21 | uint32 count; 22 | }; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /performance_test/src/msg/PointZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Point.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | @verbatim (language="comment", text= 9 | " This contains the position of a point in free space") 10 | @transfer_mode(SHMEM_REF) 11 | struct PointZeroCopy { 12 | double x; 13 | 14 | double y; 15 | 16 | double z; 17 | }; 18 | }; 19 | }; 20 | -------------------------------------------------------------------------------- /performance_test/src/msg/Polygon.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Polygon.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Point32.idl" 6 | 7 | module performance_test { 8 | module msg { 9 | typedef performance_test::msg::Point32 performance_test__msg__Point32; 10 | typedef performance_test__msg__Point32 performance_test__msg__Point32__64[64]; 11 | @verbatim (language="comment", text= 12 | " A specification of a polygon where the first and last points are assumed to be connected") 13 | struct Polygon { 14 | performance_test__msg__Point32__64 points; 15 | }; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /performance_test/src/msg/Polygon.msg: -------------------------------------------------------------------------------- 1 | # A specification of a polygon where the first and last points are assumed to be connected 2 | 3 | Point32[64] points 4 | -------------------------------------------------------------------------------- /performance_test/src/msg/PolygonZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Polygon.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Point32.idl" 6 | 7 | module performance_test { 8 | module msg { 9 | typedef performance_test::msg::Point32 performance_test__msg__Point32; 10 | typedef performance_test__msg__Point32 performance_test__msg__Point32__64[64]; 11 | @verbatim (language="comment", text= 12 | " A specification of a polygon where the first and last points are assumed to be connected") 13 | @transfer_mode(SHMEM_REF) 14 | struct PolygonZeroCopy { 15 | performance_test__msg__Point32__64 points; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/RadarDetection.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/RadarDetection.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Point.idl" 6 | #include "performance_test/msg/Vector3.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | @verbatim (language="comment", text= 11 | " All variables below are relative to the radar's frame of reference." "\n" 12 | " This message is not meant to be used alone but as part of a stamped or array message.") 13 | struct RadarDetection { 14 | @verbatim (language="comment", text= 15 | " The ID of this detection generated by the radar. If" "\n" 16 | " the radar does not generate IDs, this is intended as" "\n" 17 | " a sequential identifier for each detection in a scan.") 18 | uint16 detection_id; 19 | 20 | @verbatim (language="comment", text= 21 | " Only the x and y components are valid.") 22 | performance_test::msg::Point position; 23 | 24 | @verbatim (language="comment", text= 25 | " range_rate rectangular transformation to x and y components") 26 | performance_test::msg::Vector3 velocity; 27 | 28 | @verbatim (language="comment", text= 29 | " The detection amplitude in dB.") 30 | double amplitude; 31 | 32 | @verbatim (language="comment", text= 33 | " Support data for the performance test") 34 | int64 time; 35 | 36 | uint64 id; 37 | }; 38 | }; 39 | }; 40 | -------------------------------------------------------------------------------- /performance_test/src/msg/RadarDetection.msg: -------------------------------------------------------------------------------- 1 | # All variables below are relative to the radar's frame of reference. 2 | # This message is not meant to be used alone but as part of a stamped or array message. 3 | 4 | uint16 detection_id # The ID of this detection generated by the radar. If 5 | # the radar does not generate IDs, this is intended as 6 | # a sequential identifier for each detection in a scan. 7 | 8 | Point position # Only the x and y components are valid. 9 | Vector3 velocity # range_rate rectangular transformation to x and y components 10 | float64 amplitude # The detection amplitude in dB. 11 | 12 | # Support data for the performance test 13 | int64 time 14 | uint64 id 15 | -------------------------------------------------------------------------------- /performance_test/src/msg/RadarDetectionZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/RadarDetection.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Point.idl" 6 | #include "performance_test/msg/Vector3.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | @verbatim (language="comment", text= 11 | " All variables below are relative to the radar's frame of reference." "\n" 12 | " This message is not meant to be used alone but as part of a stamped or array message.") 13 | @transfer_mode(SHMEM_REF) 14 | struct RadarDetectionZeroCopy { 15 | @verbatim (language="comment", text= 16 | " The ID of this detection generated by the radar. If" "\n" 17 | " the radar does not generate IDs, this is intended as" "\n" 18 | " a sequential identifier for each detection in a scan.") 19 | uint16 detection_id; 20 | 21 | @verbatim (language="comment", text= 22 | " Only the x and y components are valid.") 23 | performance_test::msg::Point position; 24 | 25 | @verbatim (language="comment", text= 26 | " range_rate rectangular transformation to x and y components") 27 | performance_test::msg::Vector3 velocity; 28 | 29 | @verbatim (language="comment", text= 30 | " The detection amplitude in dB.") 31 | double amplitude; 32 | 33 | @verbatim (language="comment", text= 34 | " Support data for the performance test") 35 | int64 time; 36 | 37 | uint64 id; 38 | }; 39 | }; 40 | }; 41 | -------------------------------------------------------------------------------- /performance_test/src/msg/RadarTrack.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/RadarTrack.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Polygon.idl" 6 | #include "performance_test/msg/Vector3.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | @verbatim (language="comment", text= 11 | " All variables below are relative to the radar's frame of reference." "\n" 12 | " This message is not meant to be used alone but as part of a stamped or array message.") 13 | struct RadarTrack { 14 | @verbatim (language="comment", text= 15 | " The ID of this track generated by the radar. If" "\n" 16 | " the radar does not generate IDs, this is intended as" "\n" 17 | " a sequential identifier for each track in a scan.") 18 | uint16 track_id; 19 | 20 | @verbatim (language="comment", text= 21 | " The shape and position of the detection. This polygon" "\n" 22 | " encompasses a 2D plane which approximates the size and" "\n" 23 | " shape of the detection based on the distance from the" "\n" 24 | " radar, the detection angle, the width of all detections" "\n" 25 | " grouped into this track, and the height of the radar's" "\n" 26 | " vertical field of view at the detection distance.") 27 | performance_test::msg::Polygon track_shape; 28 | 29 | @verbatim (language="comment", text= 30 | " Only the x and y components are valid.") 31 | performance_test::msg::Vector3 linear_velocity; 32 | 33 | @verbatim (language="comment", text= 34 | " Only the x component is valid.") 35 | performance_test::msg::Vector3 linear_acceleration; 36 | 37 | @verbatim (language="comment", text= 38 | " Support data for the performance test") 39 | int64 time; 40 | 41 | uint64 id; 42 | }; 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /performance_test/src/msg/RadarTrack.msg: -------------------------------------------------------------------------------- 1 | # All variables below are relative to the radar's frame of reference. 2 | # This message is not meant to be used alone but as part of a stamped or array message. 3 | 4 | uint16 track_id # The ID of this track generated by the radar. If 5 | # the radar does not generate IDs, this is intended as 6 | # a sequential identifier for each track in a scan. 7 | 8 | Polygon track_shape # The shape and position of the detection. This polygon 9 | # encompasses a 2D plane which approximates the size and 10 | # shape of the detection based on the distance from the 11 | # radar, the detection angle, the width of all detections 12 | # grouped into this track, and the height of the radar's 13 | # vertical field of view at the detection distance. 14 | 15 | Vector3 linear_velocity # Only the x and y components are valid. 16 | Vector3 linear_acceleration # Only the x component is valid. 17 | 18 | # Support data for the performance test 19 | int64 time 20 | uint64 id 21 | -------------------------------------------------------------------------------- /performance_test/src/msg/RadarTrackZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/RadarTrack.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Polygon.idl" 6 | #include "performance_test/msg/Vector3.idl" 7 | 8 | module performance_test { 9 | module msg { 10 | @verbatim (language="comment", text= 11 | " All variables below are relative to the radar's frame of reference." "\n" 12 | " This message is not meant to be used alone but as part of a stamped or array message.") 13 | @transfer_mode(SHMEM_REF) 14 | struct RadarTrackZeroCopy { 15 | @verbatim (language="comment", text= 16 | " The ID of this track generated by the radar. If" "\n" 17 | " the radar does not generate IDs, this is intended as" "\n" 18 | " a sequential identifier for each track in a scan.") 19 | uint16 track_id; 20 | 21 | @verbatim (language="comment", text= 22 | " The shape and position of the detection. This polygon" "\n" 23 | " encompasses a 2D plane which approximates the size and" "\n" 24 | " shape of the detection based on the distance from the" "\n" 25 | " radar, the detection angle, the width of all detections" "\n" 26 | " grouped into this track, and the height of the radar's" "\n" 27 | " vertical field of view at the detection distance.") 28 | performance_test::msg::Polygon track_shape; 29 | 30 | @verbatim (language="comment", text= 31 | " Only the x and y components are valid.") 32 | performance_test::msg::Vector3 linear_velocity; 33 | 34 | @verbatim (language="comment", text= 35 | " Only the x component is valid.") 36 | performance_test::msg::Vector3 linear_acceleration; 37 | 38 | @verbatim (language="comment", text= 39 | " Support data for the performance test") 40 | int64 time; 41 | 42 | uint64 id; 43 | }; 44 | }; 45 | }; 46 | -------------------------------------------------------------------------------- /performance_test/src/msg/Range.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Range.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "std_msgs/msg/Header.idl" 6 | 7 | module performance_test { 8 | module msg { 9 | module Range_Constants { 10 | const uint8 ULTRASOUND = 0; 11 | const uint8 INFRARED = 1; 12 | }; 13 | @verbatim (language="comment", text= 14 | " Single range reading from an active ranger that emits energy and reports" "\n" 15 | " one range reading that is valid along an arc at the distance measured." "\n" 16 | " This message is not appropriate for laser scanners. See the LaserScan" "\n" 17 | " message if you are working with a laser scanner.") 18 | struct Range { 19 | @verbatim (language="comment", text= 20 | " This message also can represent a fixed-distance (binary) ranger. This" "\n" 21 | " sensor will have min_range===max_range===distance of detection." "\n" 22 | " These sensors follow REP 117 and will output -Inf if the object is detected" "\n" 23 | " and +Inf if the object is outside of the detection range." "\n" 24 | " timestamp in the header is the time the ranger" "\n" 25 | " returned the distance reading") 26 | std_msgs::msg::Header header; 27 | 28 | @verbatim (language="comment", text= 29 | " the type of radiation used by the sensor" "\n" 30 | " (sound, IR, etc)") 31 | @unit (value="enum") 32 | uint8 radiation_type; 33 | 34 | @verbatim (language="comment", text= 35 | " the size of the arc that the distance reading is" "\n" 36 | " valid for" "\n" 37 | " the object causing the range reading may have" "\n" 38 | " been anywhere within -field_of_view/2 and" "\n" 39 | " field_of_view/2 at the measured range." "\n" 40 | " 0 angle corresponds to the x-axis of the sensor.") 41 | @unit (value="rad") 42 | float field_of_view; 43 | 44 | @verbatim (language="comment", text= 45 | " minimum range value") 46 | @unit (value="m") 47 | float min_range; 48 | 49 | @verbatim (language="comment", text= 50 | " maximum range value" "\n" 51 | " Fixed distance rangers require min_range==max_range") 52 | @unit (value="m") 53 | float max_range; 54 | 55 | @verbatim (language="comment", text= 56 | " range data" "\n" 57 | " (Note: values < range_min or > range_max should be discarded)" "\n" 58 | " Fixed distance rangers only output -Inf or +Inf." "\n" 59 | " -Inf represents a detection within fixed distance." "\n" 60 | " (Detection too close to the sensor to quantify)" "\n" 61 | " +Inf represents no detection within the fixed distance." "\n" 62 | " (Object out of range)") 63 | @unit (value="m") 64 | float range; 65 | 66 | @verbatim (language="comment", text= 67 | " Support data for the performance test") 68 | int64 time; 69 | 70 | uint64 id; 71 | }; 72 | }; 73 | }; 74 | -------------------------------------------------------------------------------- /performance_test/src/msg/Range.msg: -------------------------------------------------------------------------------- 1 | # Single range reading from an active ranger that emits energy and reports 2 | # one range reading that is valid along an arc at the distance measured. 3 | # This message is not appropriate for laser scanners. See the LaserScan 4 | # message if you are working with a laser scanner. 5 | 6 | # This message also can represent a fixed-distance (binary) ranger. This 7 | # sensor will have min_range===max_range===distance of detection. 8 | # These sensors follow REP 117 and will output -Inf if the object is detected 9 | # and +Inf if the object is outside of the detection range. 10 | 11 | std_msgs/Header header # timestamp in the header is the time the ranger 12 | # returned the distance reading 13 | 14 | # Radiation type enums 15 | # If you want a value added to this list, send an email to the ros-users list 16 | uint8 ULTRASOUND=0 17 | uint8 INFRARED=1 18 | 19 | uint8 radiation_type # the type of radiation used by the sensor 20 | # (sound, IR, etc) [enum] 21 | 22 | float32 field_of_view # the size of the arc that the distance reading is 23 | # valid for [rad] 24 | # the object causing the range reading may have 25 | # been anywhere within -field_of_view/2 and 26 | # field_of_view/2 at the measured range. 27 | # 0 angle corresponds to the x-axis of the sensor. 28 | 29 | float32 min_range # minimum range value [m] 30 | float32 max_range # maximum range value [m] 31 | # Fixed distance rangers require min_range==max_range 32 | 33 | float32 range # range data [m] 34 | # (Note: values < range_min or > range_max should be discarded) 35 | # Fixed distance rangers only output -Inf or +Inf. 36 | # -Inf represents a detection within fixed distance. 37 | # (Detection too close to the sensor to quantify) 38 | # +Inf represents no detection within the fixed distance. 39 | # (Object out of range) 40 | 41 | # Support data for the performance test 42 | int64 time 43 | uint64 id 44 | -------------------------------------------------------------------------------- /performance_test/src/msg/RangeZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Range.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Header.idl" 6 | 7 | module performance_test { 8 | module msg { 9 | module Range_Constants { 10 | const uint8 ULTRASOUND = 0; 11 | const uint8 INFRARED = 1; 12 | }; 13 | @verbatim (language="comment", text= 14 | " Single range reading from an active ranger that emits energy and reports" "\n" 15 | " one range reading that is valid along an arc at the distance measured." "\n" 16 | " This message is not appropriate for laser scanners. See the LaserScan" "\n" 17 | " message if you are working with a laser scanner.") 18 | @transfer_mode(SHMEM_REF) 19 | struct RangeZeroCopy { 20 | @verbatim (language="comment", text= 21 | " This message also can represent a fixed-distance (binary) ranger. This" "\n" 22 | " sensor will have min_range===max_range===distance of detection." "\n" 23 | " These sensors follow REP 117 and will output -Inf if the object is detected" "\n" 24 | " and +Inf if the object is outside of the detection range." "\n" 25 | " timestamp in the header is the time the ranger" "\n" 26 | " returned the distance reading") 27 | performance_test::msg::Header header; 28 | 29 | @verbatim (language="comment", text= 30 | " the type of radiation used by the sensor" "\n" 31 | " (sound, IR, etc)") 32 | @unit (value="enum") 33 | uint8 radiation_type; 34 | 35 | @verbatim (language="comment", text= 36 | " the size of the arc that the distance reading is" "\n" 37 | " valid for" "\n" 38 | " the object causing the range reading may have" "\n" 39 | " been anywhere within -field_of_view/2 and" "\n" 40 | " field_of_view/2 at the measured range." "\n" 41 | " 0 angle corresponds to the x-axis of the sensor.") 42 | @unit (value="rad") 43 | float field_of_view; 44 | 45 | @verbatim (language="comment", text= 46 | " minimum range value") 47 | @unit (value="m") 48 | float min_range; 49 | 50 | @verbatim (language="comment", text= 51 | " maximum range value" "\n" 52 | " Fixed distance rangers require min_range==max_range") 53 | @unit (value="m") 54 | float max_range; 55 | 56 | @verbatim (language="comment", text= 57 | " range data" "\n" 58 | " (Note: values < range_min or > range_max should be discarded)" "\n" 59 | " Fixed distance rangers only output -Inf or +Inf." "\n" 60 | " -Inf represents a detection within fixed distance." "\n" 61 | " (Detection too close to the sensor to quantify)" "\n" 62 | " +Inf represents no detection within the fixed distance." "\n" 63 | " (Object out of range)") 64 | @unit (value="m") 65 | float range; 66 | 67 | @verbatim (language="comment", text= 68 | " Support data for the performance test") 69 | int64 time; 70 | 71 | uint64 id; 72 | }; 73 | }; 74 | }; 75 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct16.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Struct16.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | struct Struct16 { 9 | octet struct0; 10 | 11 | octet struct1; 12 | 13 | octet struct2; 14 | 15 | octet struct3; 16 | 17 | octet struct4; 18 | 19 | octet struct5; 20 | 21 | octet struct6; 22 | 23 | octet struct7; 24 | 25 | octet struct8; 26 | 27 | octet struct9; 28 | 29 | octet structa; 30 | 31 | octet structb; 32 | 33 | octet structc; 34 | 35 | octet structd; 36 | 37 | octet structe; 38 | 39 | octet structf; 40 | 41 | int64 time; 42 | 43 | uint64 id; 44 | }; 45 | }; 46 | }; 47 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct16.msg: -------------------------------------------------------------------------------- 1 | byte struct0 2 | byte struct1 3 | byte struct2 4 | byte struct3 5 | byte struct4 6 | byte struct5 7 | byte struct6 8 | byte struct7 9 | byte struct8 10 | byte struct9 11 | byte structa 12 | byte structb 13 | byte structc 14 | byte structd 15 | byte structe 16 | byte structf 17 | int64 time 18 | uint64 id 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct16ZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Struct16.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | @transfer_mode(SHMEM_REF) 9 | struct Struct16ZeroCopy { 10 | octet struct0; 11 | 12 | octet struct1; 13 | 14 | octet struct2; 15 | 16 | octet struct3; 17 | 18 | octet struct4; 19 | 20 | octet struct5; 21 | 22 | octet struct6; 23 | 24 | octet struct7; 25 | 26 | octet struct8; 27 | 28 | octet struct9; 29 | 30 | octet structa; 31 | 32 | octet structb; 33 | 34 | octet structc; 35 | 36 | octet structd; 37 | 38 | octet structe; 39 | 40 | octet structf; 41 | 42 | int64 time; 43 | 44 | uint64 id; 45 | }; 46 | }; 47 | }; 48 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct256.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Struct256.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Struct16.idl" 6 | 7 | module performance_test { 8 | module msg { 9 | struct Struct256 { 10 | performance_test::msg::Struct16 struct160; 11 | 12 | performance_test::msg::Struct16 struct161; 13 | 14 | performance_test::msg::Struct16 struct162; 15 | 16 | performance_test::msg::Struct16 struct163; 17 | 18 | performance_test::msg::Struct16 struct164; 19 | 20 | performance_test::msg::Struct16 struct165; 21 | 22 | performance_test::msg::Struct16 struct166; 23 | 24 | performance_test::msg::Struct16 struct167; 25 | 26 | performance_test::msg::Struct16 struct168; 27 | 28 | performance_test::msg::Struct16 struct169; 29 | 30 | performance_test::msg::Struct16 struct16a; 31 | 32 | performance_test::msg::Struct16 struct16b; 33 | 34 | performance_test::msg::Struct16 struct16c; 35 | 36 | performance_test::msg::Struct16 struct16d; 37 | 38 | performance_test::msg::Struct16 struct16e; 39 | 40 | performance_test::msg::Struct16 struct16f; 41 | 42 | int64 time; 43 | 44 | uint64 id; 45 | }; 46 | }; 47 | }; 48 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct256.msg: -------------------------------------------------------------------------------- 1 | Struct16 struct160 2 | Struct16 struct161 3 | Struct16 struct162 4 | Struct16 struct163 5 | Struct16 struct164 6 | Struct16 struct165 7 | Struct16 struct166 8 | Struct16 struct167 9 | Struct16 struct168 10 | Struct16 struct169 11 | Struct16 struct16a 12 | Struct16 struct16b 13 | Struct16 struct16c 14 | Struct16 struct16d 15 | Struct16 struct16e 16 | Struct16 struct16f 17 | int64 time 18 | uint64 id 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct256ZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Struct256.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Struct16.idl" 6 | 7 | module performance_test { 8 | module msg { 9 | @transfer_mode(SHMEM_REF) 10 | struct Struct256ZeroCopy { 11 | performance_test::msg::Struct16 struct160; 12 | 13 | performance_test::msg::Struct16 struct161; 14 | 15 | performance_test::msg::Struct16 struct162; 16 | 17 | performance_test::msg::Struct16 struct163; 18 | 19 | performance_test::msg::Struct16 struct164; 20 | 21 | performance_test::msg::Struct16 struct165; 22 | 23 | performance_test::msg::Struct16 struct166; 24 | 25 | performance_test::msg::Struct16 struct167; 26 | 27 | performance_test::msg::Struct16 struct168; 28 | 29 | performance_test::msg::Struct16 struct169; 30 | 31 | performance_test::msg::Struct16 struct16a; 32 | 33 | performance_test::msg::Struct16 struct16b; 34 | 35 | performance_test::msg::Struct16 struct16c; 36 | 37 | performance_test::msg::Struct16 struct16d; 38 | 39 | performance_test::msg::Struct16 struct16e; 40 | 41 | performance_test::msg::Struct16 struct16f; 42 | 43 | int64 time; 44 | 45 | uint64 id; 46 | }; 47 | }; 48 | }; 49 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct32k.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Struct32k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Struct4k.idl" 6 | 7 | module performance_test { 8 | module msg { 9 | struct Struct32k { 10 | performance_test::msg::Struct4k struct4k0; 11 | 12 | performance_test::msg::Struct4k struct4k1; 13 | 14 | performance_test::msg::Struct4k struct4k2; 15 | 16 | performance_test::msg::Struct4k struct4k3; 17 | 18 | performance_test::msg::Struct4k struct4k4; 19 | 20 | performance_test::msg::Struct4k struct4k5; 21 | 22 | performance_test::msg::Struct4k struct4k6; 23 | 24 | performance_test::msg::Struct4k struct4k7; 25 | 26 | int64 time; 27 | 28 | uint64 id; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct32k.msg: -------------------------------------------------------------------------------- 1 | Struct4k struct4k0 2 | Struct4k struct4k1 3 | Struct4k struct4k2 4 | Struct4k struct4k3 5 | Struct4k struct4k4 6 | Struct4k struct4k5 7 | Struct4k struct4k6 8 | Struct4k struct4k7 9 | int64 time 10 | uint64 id 11 | 12 | 13 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct32kZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Struct32k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Struct4k.idl" 6 | 7 | module performance_test { 8 | module msg { 9 | @transfer_mode(SHMEM_REF) 10 | struct Struct32kZeroCopy { 11 | performance_test::msg::Struct4k struct4k0; 12 | 13 | performance_test::msg::Struct4k struct4k1; 14 | 15 | performance_test::msg::Struct4k struct4k2; 16 | 17 | performance_test::msg::Struct4k struct4k3; 18 | 19 | performance_test::msg::Struct4k struct4k4; 20 | 21 | performance_test::msg::Struct4k struct4k5; 22 | 23 | performance_test::msg::Struct4k struct4k6; 24 | 25 | performance_test::msg::Struct4k struct4k7; 26 | 27 | int64 time; 28 | 29 | uint64 id; 30 | }; 31 | }; 32 | }; 33 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct4k.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Struct4k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Struct256.idl" 6 | 7 | module performance_test { 8 | module msg { 9 | struct Struct4k { 10 | performance_test::msg::Struct256 struct2560; 11 | 12 | performance_test::msg::Struct256 struct2561; 13 | 14 | performance_test::msg::Struct256 struct2562; 15 | 16 | performance_test::msg::Struct256 struct2563; 17 | 18 | performance_test::msg::Struct256 struct2564; 19 | 20 | performance_test::msg::Struct256 struct2565; 21 | 22 | performance_test::msg::Struct256 struct2566; 23 | 24 | performance_test::msg::Struct256 struct2567; 25 | 26 | performance_test::msg::Struct256 struct2568; 27 | 28 | performance_test::msg::Struct256 struct2569; 29 | 30 | performance_test::msg::Struct256 struct256a; 31 | 32 | performance_test::msg::Struct256 struct256b; 33 | 34 | performance_test::msg::Struct256 struct256c; 35 | 36 | performance_test::msg::Struct256 struct256d; 37 | 38 | performance_test::msg::Struct256 struct256e; 39 | 40 | performance_test::msg::Struct256 struct256f; 41 | 42 | int64 time; 43 | 44 | uint64 id; 45 | }; 46 | }; 47 | }; 48 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct4k.msg: -------------------------------------------------------------------------------- 1 | Struct256 struct2560 2 | Struct256 struct2561 3 | Struct256 struct2562 4 | Struct256 struct2563 5 | Struct256 struct2564 6 | Struct256 struct2565 7 | Struct256 struct2566 8 | Struct256 struct2567 9 | Struct256 struct2568 10 | Struct256 struct2569 11 | Struct256 struct256a 12 | Struct256 struct256b 13 | Struct256 struct256c 14 | Struct256 struct256d 15 | Struct256 struct256e 16 | Struct256 struct256f 17 | int64 time 18 | uint64 id 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Struct4kZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Struct4k.msg 3 | // generated code does not contain a copyright notice 4 | 5 | #include "performance_test/msg/Struct256.idl" 6 | 7 | module performance_test { 8 | module msg { 9 | @transfer_mode(SHMEM_REF) 10 | struct Struct4kZeroCopy { 11 | performance_test::msg::Struct256 struct2560; 12 | 13 | performance_test::msg::Struct256 struct2561; 14 | 15 | performance_test::msg::Struct256 struct2562; 16 | 17 | performance_test::msg::Struct256 struct2563; 18 | 19 | performance_test::msg::Struct256 struct2564; 20 | 21 | performance_test::msg::Struct256 struct2565; 22 | 23 | performance_test::msg::Struct256 struct2566; 24 | 25 | performance_test::msg::Struct256 struct2567; 26 | 27 | performance_test::msg::Struct256 struct2568; 28 | 29 | performance_test::msg::Struct256 struct2569; 30 | 31 | performance_test::msg::Struct256 struct256a; 32 | 33 | performance_test::msg::Struct256 struct256b; 34 | 35 | performance_test::msg::Struct256 struct256c; 36 | 37 | performance_test::msg::Struct256 struct256d; 38 | 39 | performance_test::msg::Struct256 struct256e; 40 | 41 | performance_test::msg::Struct256 struct256f; 42 | 43 | int64 time; 44 | 45 | uint64 id; 46 | }; 47 | }; 48 | }; 49 | -------------------------------------------------------------------------------- /performance_test/src/msg/Vector3.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Vector3.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | @verbatim (language="comment", text= 9 | " This represents a vector in free space.") 10 | struct Vector3 { 11 | double x; 12 | 13 | double y; 14 | 15 | double z; 16 | }; 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /performance_test/src/msg/Vector3.msg: -------------------------------------------------------------------------------- 1 | # This represents a vector in free space. 2 | 3 | float64 x 4 | float64 y 5 | float64 z 6 | -------------------------------------------------------------------------------- /performance_test/src/msg/Vector3ZeroCopy.idl: -------------------------------------------------------------------------------- 1 | // generated from rosidl_adapter/resource/msg.idl.em 2 | // with input from performance_test/src/msg/Vector3.msg 3 | // generated code does not contain a copyright notice 4 | 5 | 6 | module performance_test { 7 | module msg { 8 | @verbatim (language="comment", text= 9 | " This represents a vector in free space.") 10 | @transfer_mode(SHMEM_REF) 11 | struct Vector3ZeroCopy { 12 | double x; 13 | 14 | double y; 15 | 16 | double z; 17 | }; 18 | }; 19 | }; 20 | -------------------------------------------------------------------------------- /performance_test/src/utilities/qnx_res_usage.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2021 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef UTILITIES__QNX_RES_USAGE_HPP_ 16 | #define UTILITIES__QNX_RES_USAGE_HPP_ 17 | 18 | #if defined(QNX) 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | namespace performance_test 26 | { 27 | namespace qnx_res 28 | { 29 | 30 | /// 31 | /// \brief Get process physical(RSS) memory usage 32 | /// \return memory usage size on success, throw an exception on error 33 | uint64_t get_proc_rss_mem() 34 | { 35 | std::string line; 36 | 37 | pid_t my_pid = getpid(); 38 | std::ifstream ifile("/proc/" + std::to_string(my_pid) + "/pmap"); 39 | int num_line = 0; 40 | uint64_t total_memory = 0u; 41 | 42 | while (std::getline(ifile, line)) { 43 | // Discard first line, contains only the header 44 | if (num_line > 0) { 45 | std::istringstream iss{line}; // Construct string stream from line 46 | std::vector fields; 47 | std::string field; 48 | while (std::getline(iss, field, ',')) { 49 | fields.push_back(field); 50 | } 51 | // Convert field 9(Rsv) to check memory usage 52 | total_memory += std::stoul(fields[8], nullptr, 16); 53 | } 54 | num_line++; 55 | } 56 | return total_memory; 57 | } 58 | } // namespace qnx_res 59 | 60 | } // namespace performance_test 61 | 62 | #endif // defined(QNX) 63 | #endif // UTILITIES__QNX_RES_USAGE_HPP_ 64 | -------------------------------------------------------------------------------- /performance_test/src/utilities/spin_lock.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Apex.AI, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | 16 | #ifndef UTILITIES__SPIN_LOCK_HPP_ 17 | #define UTILITIES__SPIN_LOCK_HPP_ 18 | 19 | #include 20 | 21 | namespace performance_test 22 | { 23 | 24 | /// A simple spinlock 25 | class SpinLock 26 | { 27 | public: 28 | SpinLock() 29 | { 30 | m_lock.clear(); 31 | } 32 | 33 | /// Locks the spinlock. 34 | inline void lock() 35 | { 36 | while (m_lock.test_and_set(std::memory_order_acquire)) { 37 | // spin 38 | } 39 | } 40 | 41 | /// Unlocks the spinlock. 42 | inline void unlock() 43 | { 44 | m_lock.clear(std::memory_order_release); 45 | } 46 | 47 | private: 48 | std::atomic_flag m_lock; 49 | }; 50 | 51 | } // namespace performance_test 52 | 53 | #endif // UTILITIES__SPIN_LOCK_HPP_ 54 | -------------------------------------------------------------------------------- /performance_test/test/src/test_performance_test.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // Copyright 2017 Apex.AI, Inc. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | #include 17 | #include "test_statistics_tracker.hpp" 18 | int32_t main(int32_t argc, char ** argv) 19 | { 20 | ::testing::InitGoogleTest(&argc, argv); 21 | return RUN_ALL_TESTS(); 22 | } 23 | -------------------------------------------------------------------------------- /performance_test/test/src/test_statistics_tracker.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Apex.AI, Inc. 2 | // Copyright 2017 Apex.AI, Inc. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | #ifndef TEST_STATISTICS_TRACKER_HPP_ 17 | #define TEST_STATISTICS_TRACKER_HPP_ 18 | 19 | #include 20 | #include "../../src/utilities/statistics_tracker.hpp" 21 | 22 | TEST(performance_test, StatisticsTracker_init) { 23 | performance_test::StatisticsTracker st; 24 | 25 | ASSERT_DOUBLE_EQ(st.mean(), 0.0); 26 | ASSERT_DOUBLE_EQ(st.n(), 0.0); 27 | ASSERT_DOUBLE_EQ(st.max(), std::numeric_limits::lowest()); 28 | ASSERT_DOUBLE_EQ(st.min(), std::numeric_limits::max()); 29 | } 30 | 31 | TEST(performance_test, StatisticsTracker_single_sample) { 32 | performance_test::StatisticsTracker st; 33 | const auto sample = 5.345345; 34 | st.add_sample(sample); 35 | 36 | ASSERT_DOUBLE_EQ(st.n(), 1.0); 37 | ASSERT_DOUBLE_EQ(st.mean(), sample); 38 | ASSERT_DOUBLE_EQ(st.max(), sample); 39 | ASSERT_DOUBLE_EQ(st.min(), sample); 40 | } 41 | 42 | 43 | TEST(performance_test, StatisticsTracker_two_samples) { 44 | performance_test::StatisticsTracker st; 45 | 46 | const auto small = 2.235235; 47 | const auto big = 242.235253; 48 | 49 | st.add_sample(small); 50 | st.add_sample(big); 51 | 52 | const auto mean = (small + big) / 2.0; 53 | const auto variance = ((mean - small) * (mean - small) + (mean - big) * (mean - big)) / 2.0; 54 | 55 | ASSERT_DOUBLE_EQ(st.min(), small); 56 | ASSERT_DOUBLE_EQ(st.max(), big); 57 | ASSERT_DOUBLE_EQ(st.n(), 2.0); 58 | ASSERT_DOUBLE_EQ(st.mean(), mean); 59 | ASSERT_DOUBLE_EQ(st.variance(), variance); 60 | } 61 | 62 | TEST(performance_test, StatisticsTracker_three_samples) { 63 | performance_test::StatisticsTracker st; 64 | 65 | const auto small = -2.235235; 66 | const auto mid = 26.235235; 67 | const auto big = 232.235253; 68 | 69 | st.add_sample(mid); 70 | st.add_sample(small); 71 | st.add_sample(big); 72 | 73 | const auto mean = (small + big + mid) / 3.0; 74 | const auto variance = 75 | ((mean - small) * (mean - small) + (mean - big) * (mean - big) + (mean - mid) * (mean - mid)) / 76 | 3.0; 77 | 78 | ASSERT_DOUBLE_EQ(st.min(), small); 79 | ASSERT_DOUBLE_EQ(st.max(), big); 80 | ASSERT_DOUBLE_EQ(st.n(), 3.0); 81 | ASSERT_DOUBLE_EQ(st.mean(), mean); 82 | ASSERT_DOUBLE_EQ(st.variance(), variance); 83 | } 84 | 85 | #endif // TEST_STATISTICS_TRACKER_HPP_ 86 | -------------------------------------------------------------------------------- /performance_test/version_check.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | REV=$(git rev-parse --short HEAD) 4 | if [[ `git status --porcelain` ]]; then 5 | REV="$REV-dirty" 6 | fi 7 | printf $REV 8 | -------------------------------------------------------------------------------- /performance_test_ros1_msgs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(performance_test_ros1_msgs) 3 | 4 | find_package(catkin REQUIRED COMPONENTS message_generation) 5 | find_package(std_msgs REQUIRED) 6 | find_package(sensor_msgs REQUIRED) 7 | 8 | add_message_files( 9 | DIRECTORY msg 10 | ) 11 | 12 | generate_messages( 13 | DEPENDENCIES std_msgs sensor_msgs 14 | ) 15 | 16 | catkin_package( 17 | CATKIN_DEPENDS message_runtime) 18 | -------------------------------------------------------------------------------- /performance_test_ros1_msgs/COLCON_IGNORE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros2/performance_test/7081dd3fae9d1bfe985a94858b6c96650fd1bb4b/performance_test_ros1_msgs/COLCON_IGNORE -------------------------------------------------------------------------------- /performance_test_ros1_msgs/msg: -------------------------------------------------------------------------------- 1 | ../performance_test/src/msg/ -------------------------------------------------------------------------------- /performance_test_ros1_msgs/package.xml: -------------------------------------------------------------------------------- 1 | 2 | performance_test_ros1_msgs 3 | 1.0.0 4 | 5 | ROS1 versions of performance_test messages to use when testing with a ROS1 bridge 6 | 7 | Pete Baughman 8 | Apache 2.0 9 | 10 | catkin 11 | 12 | message_generation 13 | 14 | message_runtime 15 | 16 | -------------------------------------------------------------------------------- /performance_test_ros1_publisher/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(performance_test_ros1_publisher) 3 | 4 | ## Find catkin and any catkin packages 5 | find_package(catkin REQUIRED COMPONENTS roscpp performance_test_ros1_msgs) 6 | find_package(Boost COMPONENTS program_options REQUIRED) 7 | 8 | ## Declare a catkin package 9 | catkin_package() 10 | 11 | ## Build the publisher 12 | include_directories(include ${catkin_INCLUDE_DIRS}) 13 | 14 | add_executable(publisher src/publisher.cpp) 15 | target_link_libraries(publisher 16 | ${catkin_LIBRARIES} 17 | ${Boost_LIBRARIES} 18 | ) 19 | 20 | add_executable(check_master src/check_master.cpp) 21 | target_link_libraries(check_master 22 | ${catkin_LIBRARIES} 23 | ) 24 | 25 | install(TARGETS publisher check_master 26 | ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 27 | LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 28 | RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 29 | ) 30 | -------------------------------------------------------------------------------- /performance_test_ros1_publisher/COLCON_IGNORE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros2/performance_test/7081dd3fae9d1bfe985a94858b6c96650fd1bb4b/performance_test_ros1_publisher/COLCON_IGNORE -------------------------------------------------------------------------------- /performance_test_ros1_publisher/include/performance_test_ros1_publisher/msg_types.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PERFORMANCE_TEST_ROS1_PUBLISHER_MSG_TYPES_HPP_INCLUDED 2 | #define PERFORMANCE_TEST_ROS1_PUBLISHER_MSG_TYPES_HPP_INCLUDED 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #include "performance_test_ros1_msgs/Array16k.h" 10 | #include "performance_test_ros1_msgs/Array1k.h" 11 | #include "performance_test_ros1_msgs/Array1m.h" 12 | #include "performance_test_ros1_msgs/Array2m.h" 13 | #include "performance_test_ros1_msgs/Array32k.h" 14 | #include "performance_test_ros1_msgs/Array4k.h" 15 | #include "performance_test_ros1_msgs/Array4m.h" 16 | #include "performance_test_ros1_msgs/Array60k.h" 17 | #include "performance_test_ros1_msgs/Array64k.h" 18 | #include "performance_test_ros1_msgs/Array256k.h" 19 | #include "performance_test_ros1_msgs/NavSatFix.h" 20 | #include "performance_test_ros1_msgs/NavSatStatus.h" 21 | #include "performance_test_ros1_msgs/Point.h" 22 | #include "performance_test_ros1_msgs/Point32.h" 23 | #include "performance_test_ros1_msgs/PointCloud1m.h" 24 | #include "performance_test_ros1_msgs/PointCloud2m.h" 25 | #include "performance_test_ros1_msgs/PointCloud4m.h" 26 | #include "performance_test_ros1_msgs/PointCloud512k.h" 27 | #include "performance_test_ros1_msgs/PointCloud8m.h" 28 | #include "performance_test_ros1_msgs/Polygon.h" 29 | #include "performance_test_ros1_msgs/RadarDetection.h" 30 | #include "performance_test_ros1_msgs/RadarTrack.h" 31 | #include "performance_test_ros1_msgs/Range.h" 32 | #include "performance_test_ros1_msgs/Struct16.h" 33 | #include "performance_test_ros1_msgs/Struct256.h" 34 | #include "performance_test_ros1_msgs/Struct32k.h" 35 | #include "performance_test_ros1_msgs/Struct4k.h" 36 | #include "performance_test_ros1_msgs/Vector3.h" 37 | 38 | struct MsgBase 39 | { 40 | ros::Publisher pub; 41 | virtual void publish() = 0; 42 | }; 43 | 44 | template 45 | struct Msg : public MsgBase 46 | { 47 | std::shared_ptr data; 48 | 49 | Msg(): data(std::make_shared()) { 50 | data->id = 0; 51 | } 52 | 53 | void publish() override 54 | { 55 | data->id = ++data->id; 56 | data->time = std::chrono::steady_clock::now().time_since_epoch().count(); 57 | pub.publish(*data); 58 | } 59 | 60 | using RosType = T; 61 | }; 62 | 63 | struct Array16k: public Msg 64 | { 65 | static const char* name() { return "Array16k"; } 66 | }; 67 | 68 | struct Array2m: public Msg 69 | { 70 | static const char* name() { return "Array2m"; } 71 | }; 72 | 73 | struct Struct32k: public Msg 74 | { 75 | static const char* name() { return "Struct32k"; } 76 | }; 77 | 78 | struct PointCloud1m: public Msg 79 | { 80 | static const char* name() { return "PointCloud1m"; } 81 | }; 82 | 83 | struct PointCloud4m: public Msg 84 | { 85 | static const char* name() { return "PointCloud4m"; } 86 | }; 87 | 88 | using TopicTypeList = boost::mpl::list; 89 | 90 | #endif 91 | -------------------------------------------------------------------------------- /performance_test_ros1_publisher/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | performance_test_ros1_publisher 4 | 1.0.0 5 | A ROS1 publisher to use with performance_test 6 | Pete Baughman 7 | Apache 2.0 8 | 9 | catkin 10 | 11 | boost 12 | roscpp 13 | performance_test_ros1_msgs 14 | 15 | boost 16 | roscpp 17 | performance_test_ros1_msgs 18 | 19 | -------------------------------------------------------------------------------- /performance_test_ros1_publisher/src/check_master.cpp: -------------------------------------------------------------------------------- 1 | #include "ros/ros.h" 2 | 3 | 4 | int main(int argc, char**argv) 5 | { 6 | ros::init(argc, argv, "check_master"); 7 | if (!ros::master::check()) { 8 | return 1; 9 | } 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /performance_test_ros1_publisher/src/publisher.cpp: -------------------------------------------------------------------------------- 1 | #include "ros/ros.h" 2 | 3 | #include "performance_test_ros1_publisher/msg_types.hpp" 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | 11 | std::shared_ptr msg_publisher_factory(ros::NodeHandle& nh, std::string topic_name) 12 | { 13 | std::shared_ptr data = nullptr; 14 | 15 | boost::mpl::for_each( 16 | [topic_name, &nh, &data](auto topic) { 17 | using T = decltype(topic); 18 | if (std::string(topic.name()) == topic_name) { 19 | data = std::make_shared(); 20 | data->pub = nh.advertise(topic_name, 100); 21 | } 22 | } 23 | ); 24 | 25 | if (data == nullptr) 26 | throw std::invalid_argument("Topic not found"); 27 | return data; 28 | } 29 | 30 | int main(int argc, char**argv) 31 | { 32 | namespace po = boost::program_options; 33 | po::options_description desc("Allowed options"); 34 | desc.add_options() 35 | ("rate,r", po::value()->default_value(1000), "Publish rate in Hz. Defaults to 1000. 0 = as fast as possible.") 36 | ("topic,t", po::value()->required(), "Topic to use."); 37 | 38 | po::variables_map vm; 39 | try { 40 | // Allow unused arguments so we can pass the same command-line used for perf_test, but 41 | // just ignore the parts that don't affect the publisher 42 | po::store( 43 | po::command_line_parser(argc, argv).options(desc) 44 | .allow_unregistered() 45 | .run(), 46 | vm 47 | ); // can throw 48 | 49 | /** --help option 50 | */ 51 | if ( vm.count("help") ) 52 | { 53 | std::cout << "Basic Command Line Parameter App" << std::endl 54 | << desc << std::endl; 55 | return 0; 56 | } 57 | 58 | if (!vm.count("topic")) { 59 | throw std::invalid_argument("--topic is required!"); 60 | } 61 | } 62 | catch(po::error& e) 63 | { 64 | std::cerr << "ERROR: " << e.what() << std::endl << std::endl; 65 | std::cerr << desc << std::endl; 66 | return 1; 67 | } 68 | 69 | auto topic_name = vm["topic"].as(); 70 | auto rate = vm["rate"].as(); 71 | 72 | std::cout << "ROS1 publisher running with rate " << rate << " on topic " << topic_name << std::endl; 73 | ros::init(argc, argv, "point_cloud_publisher"); 74 | ros::NodeHandle n; 75 | auto msg_publisher = msg_publisher_factory(n, topic_name); 76 | 77 | ros::Rate loop_rate(rate); 78 | 79 | uint64_t id = 0; 80 | 81 | while (ros::ok()) 82 | { 83 | msg_publisher->publish(); 84 | ros::spinOnce(); 85 | loop_rate.sleep(); 86 | } 87 | 88 | return 0; 89 | } 90 | -------------------------------------------------------------------------------- /tools/Dockerimage.crossbuild: -------------------------------------------------------------------------------- 1 | ARG PERFORMANCE_TEST_DOCKER_ARCH 2 | ARG PERFORMANCE_TEST_TARGET_ARCH 3 | FROM multiarch/alpine:${PERFORMANCE_TEST_TARGET_ARCH}-latest-stable AS bootstrap 4 | 5 | FROM ${PERFORMANCE_TEST_DOCKER_ARCH}/ros:foxy AS sysroot 6 | ARG PERFORMANCE_TEST_TARGET_ARCH 7 | 8 | SHELL ["/bin/bash", "-o", "pipefail", "-c"] 9 | 10 | COPY --from=bootstrap /usr/bin/qemu-${PERFORMANCE_TEST_TARGET_ARCH}-static /usr/bin/qemu-${PERFORMANCE_TEST_TARGET_ARCH}-static 11 | 12 | RUN apt-get update && apt-get install -y --no-install-recommends \ 13 | libboost-all-dev \ 14 | libtinyxml2-dev \ 15 | ros-foxy-osrf-testing-tools-cpp \ 16 | ros-foxy-ament-cmake-nose \ 17 | ros-foxy-launch-testing 18 | 19 | # Convert all absolute symbolic links to relative so that they can be found when copied to the sysroot 20 | # hadolint ignore=SC2156 21 | RUN find / -depth -xdev -type l -lname '/*' -exec sh -c 'linkpath="$(readlink {})" && rm -f {} && ln -frsv "$linkpath" "{}"' \; 22 | 23 | FROM ros:foxy AS builder 24 | ARG PERFORMANCE_TEST_TARGET_ARCH 25 | ARG PERFORMANCE_TEST_TARGET_PLATFORM 26 | 27 | SHELL ["/bin/bash", "-o", "pipefail", "-c"] 28 | 29 | ENV PERFORMANCE_TEST_SYSROOT /sysroot/${PERFORMANCE_TEST_TARGET_PLATFORM} 30 | COPY --from=sysroot /lib ${PERFORMANCE_TEST_SYSROOT}/lib 31 | COPY --from=sysroot /usr/include ${PERFORMANCE_TEST_SYSROOT}/usr/include 32 | COPY --from=sysroot /usr/lib ${PERFORMANCE_TEST_SYSROOT}/usr/lib 33 | COPY --from=sysroot /usr/share/pkgconfig ${PERFORMANCE_TEST_SYSROOT}/usr/share/pkgconfig 34 | COPY --from=sysroot /opt ${PERFORMANCE_TEST_SYSROOT}/opt 35 | COPY --from=sysroot /etc/alternatives ${PERFORMANCE_TEST_SYSROOT}/etc/alternatives 36 | 37 | # Fix Bionic-specific issues 38 | # ignore pinning package versions for apt 39 | # hadolint ignore=DL3008 40 | RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 41 | tzdata \ 42 | gnupg && \ 43 | rm -rf /var/lib/apt/lists/* 44 | 45 | RUN apt-get update && apt-get install -y --no-install-recommends \ 46 | gcc-aarch64-linux-gnu \ 47 | g++-aarch64-linux-gnu \ 48 | default-jre 49 | 50 | RUN find /sysroot/opt/ros/foxy/ -name "*.cmake" -type f -exec sed -i -e "s#/usr/lib#/sysroot/usr/lib#g" {} \; 51 | RUN find /sysroot/opt/ros/foxy/ -name "*.cmake" -type f -exec sed -i -e "s#/usr/include#/sysroot/usr/include#g" {} \; 52 | -------------------------------------------------------------------------------- /tools/toolchain.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc) 2 | set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++) 3 | 4 | if(DEFINED ENV{SYSROOT}) 5 | set(_SYSROOT $ENV{SYSROOT}) 6 | else() 7 | # Github CI expects this to be set automatically. Other CI might want to set its own 8 | # SYSROOT 9 | set(_SYSROOT /sysroot) 10 | endif() 11 | 12 | set(CMAKE_SYSROOT ${_SYSROOT}) 13 | 14 | set(CMAKE_FIND_ROOT_PATH ${_SYSROOT}) 15 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 16 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 17 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 18 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 19 | -------------------------------------------------------------------------------- /tools/toolchain_arm.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc) 2 | set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++) 3 | 4 | if(DEFINED ENV{SYSROOT}) 5 | set(_SYSROOT $ENV{SYSROOT}) 6 | else() 7 | # Github CI expects this to be set automatically. Other CI might want to set its own 8 | # SYSROOT 9 | set(_SYSROOT /sysroot) 10 | endif() 11 | 12 | set(CMAKE_SYSROOT ${_SYSROOT}) 13 | 14 | # CMAKE_FIND_ROOT_PATH only accept semi-colon separated list 15 | string(REPLACE ":" ";" _CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH}") 16 | 17 | set(CMAKE_FIND_ROOT_PATH ${_CMAKE_PREFIX_PATH}) 18 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 19 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 20 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 21 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 22 | --------------------------------------------------------------------------------