{"id":23168272,"url":"https://github.com/asorbini/rticonnextdds-ros2-msgs","last_synced_at":"2025-04-04T22:22:09.937Z","repository":{"id":146825659,"uuid":"359131249","full_name":"asorbini/rticonnextdds-ros2-msgs","owner":"asorbini","description":"rtiddsgen message type supports to use ROS 2 types with RTI Connext DDS","archived":false,"fork":false,"pushed_at":"2021-06-23T07:41:46.000Z","size":796,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T06:46:08.031Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asorbini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-18T12:00:31.000Z","updated_at":"2022-05-13T18:19:32.000Z","dependencies_parsed_at":"2023-07-09T09:15:46.361Z","dependency_job_id":null,"html_url":"https://github.com/asorbini/rticonnextdds-ros2-msgs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asorbini%2Frticonnextdds-ros2-msgs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asorbini%2Frticonnextdds-ros2-msgs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asorbini%2Frticonnextdds-ros2-msgs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asorbini%2Frticonnextdds-ros2-msgs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asorbini","download_url":"https://codeload.github.com/asorbini/rticonnextdds-ros2-msgs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256780,"owners_count":20909357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-18T02:40:44.145Z","updated_at":"2025-04-04T22:22:09.912Z","avatar_url":"https://github.com/asorbini.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ROS 2 messages for RTI Connext DDS\n\nThe repository contains a library of C++11 message type supports generated by\n`rtiddsgen`, which allows any DDS application to use most types included in ROS 2\nwith RTI Connext DDS.\n\nThe library is packaged in a ROS 2 package for convenience, but it may also be\nbuilt without ROS 2 as a stand-alone dependency.\n\nThe package is built with the help of [`rticonnextdds-ros2-helpers`](https://github.com/asorbini/rticonnextdds-ros2-helpers).\n\nThis repository takes inspiration from [`rticommunity/ros-data-types`](https://github.com/rticommunity/ros-data-types),\nwhich offers a similar library that provides easy access to ROS 2 data types to\nany Connext application.\n\n- [Use `connext_msgs` in a ROS 2 package](#use-connext_msgs-in-a-ros-2-package)\n- [Use `connext_msgs` in any DDS application](#use-connext_msgs-in-any-dds-application)\n- [Example applications](#example-applications)\n- [Included IDL files](#included-idl-files)\n- [Included packages](#included-packages)\n- [Unsupported types](#unsupported-types)\n- [Alternative message variants](#alternative-message-variants)\n- [CMake options](#cmake-options)\n- [Other useful resources](#other-useful-resources)\n\n## Use `connext_msgs` in a ROS 2 package\n\nSince `connext_msgs` is a regular ROS 2 package, you can just add it to your\n`package.xml` dependencies, and load it in your `CMakeLists.txt` like any other\npackage and library:\n\n- `package.xml`:\n\n  ```xml\n  \u003cpackage format=\"3\"\u003e\n    \u003cname\u003emy_package\u003c/name\u003e\n    \n    \u003c!-- ... --\u003e\n\n    \u003cdepend\u003econnext_msgs\u003c/depend\u003e\n  \n    \u003c!-- ... --\u003e\n  \u003c/package\u003e\n  ```\n\n- `CMakeLists.txt`\n\n  ```cmake\n  cmake_minimum_required(VERSION 3.5)\n  project(my_package)\n\n  # ...\n\n  # Load package\n  find_package(connext_msgs REQUIRED)\n\n  # ...\n\n  # Add dependency to your targets\n  ament_target_dependencies(my_target  connext_msgs)\n  ament_export_dependencies(connext_msgs)\n\n  ```\n\nMake sure to clone the repository to your workspace, along with `rticonnextdds-ros2-helpers`,\nand `colcon build` will automatically build everything a needed:\n\n```sh\ncd my-workspace/\n\ngit clone https://github.com/asorbini/rticonnextdds-ros2-msgs\n\ngit clone https://github.com/asorbini/rticonnextdds-ros2-helpers\n\ncolcon build\n```\n\nYou can also use the included `ros2.repos` file to clone all required repositories\nwith `vcs`:\n\n```sh\ncd my-workspace/\n\nwget https://raw.githubusercontent.com/asorbini/rticonnextdds-ros2-msgs/master/ros2.repos\n\nvcs import \u003c ros2.repos\n```\n\nIn order to use the types, you must `#include` the appropriate file in your C++\ncode. The path is slightly different from the one used for standard ROS 2 messages,\nin that the file name is not converted to all lowercase and \"snake case\" format,\ninstead retaining the same name as the input `.idl`.\n\nFor example, in order to use type `sensor_msgs::msg::PointCloud`:\n\n```cpp\n// typical ROS 2 include\n#include \"sensor_msgs/msg/point_cloud.hpp\"\n\n// DDS type include\n#include \"sensor_msgs/msg/PointCloud.hpp\"\n```\n\n## Use `connext_msgs` in any DDS application\n\nThe type supprts library provided by this repository does not have any direct\ndependency on ROS 2, and it may also be built as a stand-alone dependency.\n\nIn order to do this, you must clone all required dependencies and run `cmake`\nby hand:\n\n```sh\ngit clone https://github.com/asorbini/rticonnextdds-ros2-msgs\n\ncd rticonnextdds-ros2-msgs\n\ngit clone https://github.com/asorbini/rticonnextdds-ros2-helpers\n\nmkdir build\n\ncd build\n\ncmake ../connext_msgs -DCMAKE_INSTALL_PREFIX=../install\n\ncmake --build . -- -j4 install\n```\n\nThe library will be installed under `${CMAKE_INSTALL_PREFIX}/lib` while all\nheader files will be placed under `${CMAKE_INSTALL_PREFIX}/include`.\n\nBy default, the library will be named `connext_msgs`, but you can customize\nthis name with variable `MESSAGE_LIBRARY`.\n\nIf you prefer to clone `rticonnextdds-ros2-helpers` somewhere else, you can specify\nits location using variable `CONNEXT_ROS2_HELPERS_DIR`.\n\nYou can also force the library to be built in standalone mode by setting\n`MESSAGE_STANDALONE` to `true`.\n\n## Example applications\n\nPackage `connext_msgs_examples` contains some example applications that link\n`connext_msgs` and use types from the library.\n\nThe applications require `rmw_connextdds` to run:\n\n```sh\nsource install/setup.bash\nexport RMW_IMPLEMENTATION=rmw_connextdds\nros2 run connext_msgs_examples listener \u0026\nros2 run connext_msgs_examples talker\n```\n\n## Included IDL files\n\nPackage `connext_msg` contains a collection of IDL files extracted from the\nROS 2 Rolling distribution, and modified to compile with `rtiddsgen` so that\nthey may be compiled into a single, ready-to-use shared library.\n\nThe IDL files can be updated using script `copy_idls.sh`.\n\nThe script will scan a ROS 2 installation, and it will copy all IDL files\nto the `./idl` directory. It will also perform some lightweight processing on\nthe files to remove some incompatibilities.\n\n## Included packages\n\nTypes from the following packages are currently included in the library:\n\n```txt\nactionlib_msgs               logging_demo    statistics_msgs\naction_msgs                  map_msgs        std_msgs\naction_tutorials_interfaces  nav_msgs        std_srvs\nbuiltin_interfaces           pcl_msgs        stereo_msgs\ncomposition_interfaces       pendulum_msgs   test_msgs\ndiagnostic_msgs              rcl_interfaces  tf2_msgs\nexample_interfaces           rmw_dds_common  trajectory_msgs\ngeometry_msgs                rosgraph_msgs   turtlesim\nlibstatistics_collector      sensor_msgs     unique_identifier_msgs\nlifecycle_msgs               shape_msgs      visualization_msgs\n```\n\nThe list of included message packages can be restricted by specifying variable\n`MESSAGE_INCLUDE_PACKAGES`, e.g. `-DMESSAGE_INCLUDE_PACKAGES=\"std_msgs;builtin_interfaces\"`, in\nwhich case only messages from the specified packages will be included.\n\nYou can further customize the list of messages included in the generated\nlibrary using variables `MESSAGE_INCLUDE` and `MESSAGE_EXCLUDE`. Messages must\nbe specified as `\u003cpkg\u003e/msg/\u003ctype\u003e`, and exclusions take precedence over includes.\n\n## Unsupported types\n\nThe following types are currently unsupported:\n\n```txt\naction_tutorials_interfaces/action/Fibonacci\nexample_interfaces/action/Fibonacci\ntest_msgs/action/Fibonacci\ntest_msgs/msg/Arrays\ntest_msgs/msg/BoundedSequences\ntest_msgs/msg/MultiNested\ntest_msgs/msg/UnboundedSequences\ntest_msgs/msg/Defaults\ntest_msgs/srv/Arrays\n```\n\n## Alternative message variants\n\nThe repository contains automatically generated variants for each type to use\nit with the Flat-Data and Zero-Copy features.\n\nThese variants are not built by default, and they must be explicitly enabled\nwith cmake options (`MESSAGE_VARIANT_\u003cNAME\u003e`, e.g. `MESSAGE_VARIANT_FLAT`).\n\nAll types in the variants are placed in separate packages to distinguish them\nfrom the originals:\n\n- `ros2::flat`: Flat-Data versions.\n- `ros2::flat_zc`: Flat-Data/Zero-Copy versions.\n- `ros2::zc`: Zero-Copy versions.\n- `ros2::xcdr2`:versions forcing use of XCDR2 serialization format.\n\nThese types might not be compatible with their original versions, because of\nchanges applied to them to make them conform\nwith the limitation of the features, particularly with respect to lack of support\nfor strings and sequences:\n\n- All `string` (and `wstring`) field is converted to an array of `char` (or `wchar`).\n  Any `@default()` annotation will be discarded, since they are not supported on\n  array fields. If the field is unbounded, the array will be assigned an arbitrary\n  maximum length (by default: 255).\n- All sequences are converted to an array of the contained type. Sequences of\n  `string` (or `wstring`) will be further expanded into multi-dimensional arrays\n  of `char` (or `wchar`). For example `sequence\u003cstring, 10\u003e foo` will be converted\n  into `char foo[10][MAX_STR_LEN]`. If the field is unbounded, the array will be assigned an arbitrary maximum length (by default: 100).\n\n## CMake options\n\n| Variable  | Default | Description |\n|-----------|---------|-------------|\n|`MESSAGE_BROKEN`|See `CMakeLists.txt`|List of messages that cannot be built by `rtiddsgen`|\n|`MESSAGE_EXCLUDE`|Empty list (no message)|List of messages to be excluded from the build|\n|`MESSAGE_EXCLUDE_REGEX`|`\"\"` (no message)|Regex to match messages that should be excluded from the build|\n|`MESSAGE_INCLUDE`|Empty list (all messages)|List of messages to be included in the build|\n|`MESSAGE_INCLUDE_REGEX`|`\"\"` (all messages)|Regex to match messages that should be included in the build|\n|`MESSAGE_INCLUDE_PACKAGES`|Empty list (all packages)|List of packages to be included in the build|\n|`MESSAGE_VARIANT_ALL`|`OFF`|Generate all possible type variants|\n|`MESSAGE_VARIANT_FLAT`|`OFF`|Generate Flat-Data variants|\n|`MESSAGE_VARIANT_FLAT_ZC`|`OFF`|Generate Flat-Data/Zero-Copy variants|\n|`MESSAGE_VARIANT_ZC`|`OFF`|Generate Zero-Copy variants|\n|`MESSAGE_VARIANT_XCDR2`|`OFF`|Generate XCDR2 variants|\n\n\n## Other useful resources\n\n- [`rticonnextdds-ros2-demos`](https://github.com/asorbini/rticonnextdds-ros2-demos)\n  - Collection of example hybrid ROS 2/Connext applications.\n- [`rticonnextdds-ros2-helpers`](https://github.com/asorbini/rticonnextdds-ros2-helpers)\n  - Collection of utilities to built ROS 2 applications with RTI Connext DDS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasorbini%2Frticonnextdds-ros2-msgs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasorbini%2Frticonnextdds-ros2-msgs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasorbini%2Frticonnextdds-ros2-msgs/lists"}