@@ -6,24 +6,22 @@ ROS 2 for Rust
66[ ![ Win CI Status] ( https://github.com/ros2-rust/ros2_rust/actions/workflows/rust-win.yml/badge.svg?branch=main )] ( https://github.com/ros2-rust/ros2_rust/actions/workflows/rust-win.yml )
77[ ![ License] ( https://img.shields.io/badge/License-Apache%202.0-blue.svg )] ( https://opensource.org/licenses/Apache-2.0 )
88
9- Introduction
10- ------------
9+ ## Introduction
1110
12- This is a set of projects (the ` rclrs ` client library, code generator, examples and more) that
11+ This is a set of projects (the ` rclrs ` client library, code generator, examples, and more) that
1312enables developers to write ROS 2 applications in Rust.
1413
15- Features and limitations
16- ------------------------
14+ ## Features and Limitations
1715
18- The current set of features include :
16+ The current set of features includes :
1917- Message generation with support for all ROS message types
2018- Publishers and subscriptions (including async variants)
2119- Loaned messages (zero-copy messaging)
2220- Dynamic message handling (runtime message introspection and manipulation)
2321- Tunable QoS settings
2422- Clients and services (including async variants)
2523- Actions (action servers and clients with async support)
26- - Timers (repeating, oneshot , and inert timers)
24+ - Timers (repeating, one-shot , and inert timers)
2725- Parameters (mandatory, optional, and read-only with parameter services)
2826- Logging with ROS-compliant logging utilities and rosout support
2927- Graph queries (topic/node discovery, endpoint information)
@@ -36,8 +34,7 @@ Some things are still missing however, see the [issue list](https://github.com/r
3634
3735Since the client library is still rapidly evolving, there are no stability guarantees for the moment.
3836
39- Installation
40- ------------
37+ ## Installation
4138
4239### Prerequisites
4340
@@ -54,27 +51,48 @@ sudo apt install -y git libclang-dev python3-pip python3-vcstool
5451pip install --break-system-packages colcon-cargo colcon-ros-cargo
5552```
5653
57- ### All ROS distributions
54+ Because of an issue in ` rclrs ` ( https://github.com/ros2-rust/ros2_rust/issues/557 ), as a workaround, the following two packages need to be installed:
5855
59- ` rclrs ` is released on [ crates.io] ( https://crates.io/crates/rclrs ) , you can add it to your project directly:
56+ ``` shell
57+ # Install workaround packages
58+ sudo apt install -y ros-$ROS_DISTRO -example-interfaces
59+ sudo apt install -y ros-$ROS_DISTRO -test-msgs
60+ ```
61+
62+ ### All ROS Distributions
63+
64+ ` rclrs ` is released on [ crates.io] ( https://crates.io/crates/rclrs ) and you can add it to your project directly:
6065
6166``` toml
6267[dependencies ]
6368rclrs = " 0.7"
6469```
6570
6671Due to different ROS 2 distributions having different levels of integration with ` rclrs ` , if you'd like to
67- build and run the examples, please follow the according section.
72+ build and run the examples, please follow the corresponding section.
6873
6974### ROS 2 Lyrical Luth and Rolling
7075
71- To run the examples, install the ` test_msgs ` and ` example_interfaces ` packages,
72- clone the examples repository to your workspace and build:
76+ To run the examples, install the ` test_msgs ` and ` example_interfaces ` packages, clone the examples repository to your workspace, and build:
7377
7478``` shell
7579sudo apt install -y ros-rolling-example-interfaces ros-rolling-test-msgs
7680mkdir -p workspace/src && cd workspace
7781git clone https://github.com/ros2-rust/examples.git src/examples
82+ ```
83+
84+ Temporarily (as of 2025-01-21), the ` rosidl_rust ` repository which contains the code generator needs to be cloned as well:
85+
86+ ``` shell
87+ mkdir -p workspace/src && cd workspace
88+ git clone https://github.com/ros2-rust/rosidl_rust.git src/rosidl_rust
89+ ```
90+
91+ The above commands can be removed once an updated version of the generator is shipped with the next ROS 2 sync.
92+
93+ Build the workspace:
94+
95+ ``` shell
7896. /opt/ros/rolling/setup.sh # Or source your ROS 2 installation
7997colcon build
8098```
@@ -88,9 +106,19 @@ mkdir -p workspace/src && cd workspace
88106git clone -b kilted https://github.com/ros2/common_interfaces.git src/common_interfaces
89107git clone -b kilted https://github.com/ros2/example_interfaces.git src/example_interfaces
90108git clone -b kilted https://github.com/ros2/rcl_interfaces.git src/rcl_interfaces
109+ git clone -b kilted https://github.com/ros2/rosidl_core.git src/rosidl_core
110+ git clone -b kilted https://github.com/ros2/rosidl_defaults.git src/rosidl_defaults
91111git clone -b kilted https://github.com/ros2/unique_identifier_msgs.git src/unique_identifier_msgs
92112```
93113
114+ Temporarily (as of 2025-01-21), the ` rosidl_rust ` repository which contains the code generator needs to be cloned as well:
115+
116+ ``` shell
117+ git clone https://github.com/ros2-rust/rosidl_rust.git src/rosidl_rust
118+ ```
119+
120+ The above command can be removed once an updated version of the generator is shipped with the next ROS 2 sync.
121+
94122Build the workspace:
95123
96124``` shell
@@ -104,11 +132,13 @@ For ROS 2 Jazzy, you need to clone the code generator and message packages to yo
104132
105133``` shell
106134mkdir -p workspace/src && cd workspace
107- git clone https://github.com/ros2-rust/rosidl_rust.git src/rosidl_rust
108135git clone -b jazzy https://github.com/ros2/common_interfaces.git src/common_interfaces
109136git clone -b jazzy https://github.com/ros2/example_interfaces.git src/example_interfaces
110137git clone -b jazzy https://github.com/ros2/rcl_interfaces.git src/rcl_interfaces
138+ git clone -b jazzy https://github.com/ros2/rosidl_core.git src/rosidl_core
139+ git clone -b jazzy https://github.com/ros2/rosidl_defaults.git src/rosidl_defaults
111140git clone -b jazzy https://github.com/ros2/unique_identifier_msgs.git src/unique_identifier_msgs
141+ git clone https://github.com/ros2-rust/rosidl_rust.git src/rosidl_rust
112142git clone https://github.com/ros2-rust/examples.git src/examples
113143```
114144
@@ -126,11 +156,13 @@ For ROS 2 Humble, you need to clone the code generator and message packages to y
126156
127157``` shell
128158mkdir -p workspace/src && cd workspace
129- git clone https://github.com/ros2-rust/rosidl_rust.git src/rosidl_rust
130159git clone -b humble https://github.com/ros2/common_interfaces.git src/common_interfaces
131160git clone -b humble https://github.com/ros2/example_interfaces.git src/example_interfaces
132161git clone -b humble https://github.com/ros2/rcl_interfaces.git src/rcl_interfaces
162+ git clone -b humble https://github.com/ros2/rosidl_core.git src/rosidl_core
163+ git clone -b humble https://github.com/ros2/rosidl_defaults.git src/rosidl_defaults
133164git clone -b humble https://github.com/ros2/unique_identifier_msgs.git src/unique_identifier_msgs
165+ git clone https://github.com/ros2-rust/rosidl_rust.git src/rosidl_rust
134166git clone https://github.com/ros2-rust/examples.git src/examples
135167```
136168
@@ -153,7 +185,8 @@ ros2 run examples_rclrs_minimal_pub_sub minimal_publisher
153185. ./install/setup.sh
154186ros2 run examples_rclrs_minimal_pub_sub minimal_subscriber
155187```
156- or
188+
189+ Or:
157190
158191``` shell
159192# In a new terminal (or tmux window)
@@ -163,6 +196,7 @@ ros2 launch examples_rclrs_minimal_pub_sub minimal_pub_sub.launch.xml
163196
164197For detailed building instructions and additional setup options, see the [ in-depth guide] ( docs/building.md ) .
165198
166- Further documentation articles:
199+ ## Further Documentation
200+
167201- [ Tutorial on writing your first node with ` rclrs ` ] ( docs/writing-your-first-rclrs-node.md )
168202- [ Contributor's guide] ( docs/CONTRIBUTING.md )
0 commit comments