{"id":14992178,"url":"https://github.com/Atostek/ros2-client","last_synced_at":"2025-09-25T14:30:59.858Z","repository":{"id":43709420,"uuid":"436263976","full_name":"Atostek/ros2-client","owner":"Atostek","description":"ROS2 client library based on RustDDS","archived":false,"fork":false,"pushed_at":"2025-08-12T01:59:42.000Z","size":613,"stargazers_count":99,"open_issues_count":14,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-06T07:06:02.583Z","etag":null,"topics":["ros2","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Atostek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2021-12-08T13:49:30.000Z","updated_at":"2025-07-26T17:36:34.000Z","dependencies_parsed_at":"2024-02-13T15:05:00.461Z","dependency_job_id":"92621e2a-e155-429f-a484-53c0d9f5c738","html_url":"https://github.com/Atostek/ros2-client","commit_stats":null,"previous_names":["atostek/ros2-client","jhelovuo/ros2-client"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/Atostek/ros2-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atostek%2Fros2-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atostek%2Fros2-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atostek%2Fros2-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atostek%2Fros2-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atostek","download_url":"https://codeload.github.com/Atostek/ros2-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atostek%2Fros2-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276932091,"owners_count":25730722,"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","status":"online","status_checked_at":"2025-09-25T02:00:09.612Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ros2","rust"],"created_at":"2024-09-24T15:00:50.868Z","updated_at":"2025-09-25T14:30:59.852Z","avatar_url":"https://github.com/Atostek.png","language":"Rust","funding_links":[],"categories":["Robot Operating System"],"sub_categories":[],"readme":"# ROS2 Client\n\n[![Static Checks](https://github.com/Atostek/ros2-client/actions/workflows/static-checks.yml/badge.svg)](https://github.com/Atostek/ros2-client/actions/workflows/static-checks.yml)\n[![Tests on Ubuntu](https://github.com/Atostek/ros2-client/actions/workflows/tests.yml/badge.svg)](https://github.com/Atostek/ros2-client/actions/workflows/tests.yml)\n[![Tests on macOS](https://github.com/Atostek/ros2-client/actions/workflows/tests-macos.yml/badge.svg)](https://github.com/Atostek/ros2-client/actions/workflows/tests-macos.yml)\n[![Security audit](https://github.com/Atostek/ros2-client/actions/workflows/audit.yml/badge.svg)](https://github.com/Atostek/ros2-client/actions/workflows/audit.yml)\n\n\nThis is a Rust native client library for [ROS2](https://docs.ros.org/en/galactic/index.html). \nIt does not link to [rcl](https://github.com/ros2/rcl), \n[rclcpp](https://docs.ros2.org/galactic/api/rclcpp/index.html), or any non-Rust DDS library. \n[RustDDS](https://github.com/jhelovuo/RustDDS) is used for communication.\n\nThe API is not identical to `rclcpp` or `rclpy`, because some parts would be very awkward in Rust. For example, there are no callbacks. Rust `async` mechanism is used instead. Alternatively, some of the functionality can be polled using the Metal I/O library.\n\nThere is a `.spin()` call, but it is required only to have `ros2-client` execute some background tasks. You can spawn an async task to run it, and retain the flow of control in your code.\n\nPlease see the included examples on how to use the various features.\n\n## Features Status\n\n* Topics, Publish and Subscribe ✅\n* QoS ✅\n* Serialization ✅ - via Serde\n* Services: Clients and Servers ✅ (async recommended)\n* Actions ✅ (async required)\n* Discovery / ROS Graph update events ✅ (async)\n* `rosout` logging ✅\n* Parameters ✅\n    * Parameter Services (remote Parameter manipulation) ✅\n* Time support\n    * ROS Time ✅\n    * Simulated time support ✅\n    * Steady time ✅\n* Message generation: from `.msg` to `.rs`- experimental\n* ROS 2 Security - experimental\n\n## ROS 2 Releases Compatibility\n\nThis is what is expected to work. There are no routine tests against older releases.\n\n| ROS 2 Release | `ros2-client` should interoperate? |\n| ------------- | :------------ |\n| A - E         | Maybe. Not tested. |\n| Foxy, Galactic, Humble | Yes. Enable feature `pre-iron-gid` when building `ros2-client` 0.7.5 or newer |\n| Iron  | Yes. Not well tested. Requires `ros2-client` 0.7.5 or newer |\n| Jazzy | Yes. Requires `ros2-client` 0.7.5 or newer | \n\n\n## Version 0.8:\n* API change: `ParameterFunc` must now implement `Sync`, so that `Node` is also `Sync`. This helps in using multithreaded async executors.\n\n### Version 0.8.1:\n* `AsyncActionServer` methods changes from taking `\u0026mut self` into `\u0026self` for better serving\nconcurrent goals.\n* Bump RustDDS and other depencency versions\n* Add example `concurrent_action_server`\n* `msggen` logging can be redirected.\n* Additional unit tests, including the use of `tokio` async executor.\n\n## New in Version 0.7:\n* `NodeName` namespace is no longer allowed to be the empty string, because it confuses ROS 2 tools. Minimum namespace is \"/\".\n* Parameter support, incl. Paramater services\n* Time support\n\n### 0.7.1\n* Subscribers can `take()` samples with deserialization \"seed\" value. \nThis allows more run-time control of deserialization. Upgrade to RustDDS 0.10.0.\n\n### 0.7.2\n* Adapt to separation of CDR encoding from RustDDS.\n\n### 0.7.4\n* Implement std `Error` trait for `NameError` and `NodeCreateError`\n* Async `wait_for_writer` and `wait_for_reader` results now implement `Send`.\n\n### 0.7.5\n* New feature `pre-iron-gid`. The Gid `.msg` definition has changed between ROS2 Humble and Iron. `ros2-client` now uses the newer version by default. Use this feature to revert to the old definition.\n\n## New in Version 0.6:\n\n* Reworked ROS 2 Discovery implementation. Now `Node` has `.status_receiver()`\n* Async `.spin()` call to run the Discovery mechanism.\n* `Client` has `.wait_for_service()`\n* New API for naming Nodes, Topics, Services, Actions, and data types for Topics, Actions, and Services. The new API is more structured to avoid possible confusion and errors from parsing strings.\n\n## New in version 0.5:\n\n* Actions are supported\n* async programming interface. This should make a built-in event loop unnecessary, as Rust async executors sort of do that already. This means that `ros2-client` is not going to implement a call similar to  [`rclcpp::spin(..)`](https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Executors.html).\n\n## Example: minimal_action_server and minimal_action_client\n\nThese are re-implementations of [similarly named ROS examples](https://docs.ros.org/en/iron/Tutorials/Intermediate/Writing-an-Action-Server-Client/Cpp.html). They should be interoperable with ROS 2 example programs in C++ or Python.\n\nTo test this, start a server and then, in a separate terminal, a client, e.g.\n\n`ros2 run examples_rclcpp_minimal_action_server action_server_member_functions`\nand\n`cargo run --example=minimal_action_client`\n\nor\n\n`cargo run --example=minimal_action_server`\nand\n`ros2 run examples_rclpy_minimal_action_client client`\n\nYou should see the client requesting for a sequence of Fibonacci numbers, and the server providing them until the requested sequence length is reached.\n\n## Example: turtle_teleop\n\nThe included example program should be able to communicate with out-of-the-box ROS2 turtlesim example.\n\nInstall ROS2 and start the simulator by ` ros2 run turtlesim turtlesim_node`. Then run the `turtle_teleop` example to control the simulator.\n\n![Turtlesim screenshot](examples/turtle_teleop/screenshot.png)\n\nTeleop example program currently has the following keyboard commands:\n\n* Cursor keys: Move turtle\n* `q` or `Ctrl-C`: quit\n* `r`: reset simulator\n* `p`: change pen color (for turtle1 only)\n* `a`/`b` : spawn turtle1 / turtle2\n* `A`/`B` : kill turtle1 / turtle2\n* `1`/`2` : switch control between turtle1 / turtle2\n* `d`/`f`/`g`: Trigger or cancel absolute rotation action.\n\n## Example: ros2_service_server\n\nInstall ROS2. This has been tested to work against \"Galactic\" release, using either eProsima FastDDS or RTI Connext DDS (`rmw_connextdds`, not `rmw_connext_cpp`). \n\nStart server: `cargo run --example=ros2_service_server`\n\nIn another terminal or computer, run a client: `ros2 run examples_rclpy_minimal_client client`\n\n## Example: ros2_service_client\n\nSimilar to above.\n\nStart server: `ros2 run examples_rclpy_minimal_service service`\n\nRun client: `cargo run --example=ros2_service_client`\n\n## Related Work\n\n* [ros2_rust](https://github.com/ros2-rust/ros2_rust) is closest(?) to an official ROS2 client library. It links to ROS2 `rcl` library written in C.\n* [rclrust](https://github.com/rclrust/rclrust) is another ROS2 client library for Rust. It supports also ROS2 Services in addition to Topics. It links to ROS2 libraries, e.g. `rcl` and `rmw`.\n* [rus2](https://github.com/marshalshi/rus2) exists, but appears to be inactive since September 2020.\n\n## License\n\nCopyright 2022 Atostek Oy\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n## Acknowledgements\n\nThis crate is developed and open-source licensed by [Atostek Oy](https://www.atostek.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAtostek%2Fros2-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAtostek%2Fros2-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAtostek%2Fros2-client/lists"}