-
Notifications
You must be signed in to change notification settings - Fork 190
Description
Discussed in #586
Originally posted by olingo99 January 20, 2026
Hello,
I tried to follow the new installation/build instructions for rclrs v0.7 on ROS 2 Jazzy, but I’m hitting build failures both for the examples and for my own minimal package.
1) Examples workspace failure
In a fresh workspace following the Jazzy instructions:
git clone https://github.com/ros2-rust/rosidl_rust.git src/rosidl_rust
git clone -b jazzy https://github.com/ros2/common_interfaces.git src/common_interfaces
git clone -b jazzy https://github.com/ros2/example_interfaces.git src/example_interfaces
git clone -b jazzy https://github.com/ros2/rcl_interfaces.git src/rcl_interfaces
git clone -b jazzy https://github.com/ros2/unique_identifier_msgs.git src/unique_identifier_msgs
git clone https://github.com/ros2-rust/examples.git src/examplescolcon build fails with:
--- stderr: examples_rclrs_message_demo
error: no matching package named `rclrs_example_msgs` found
location searched: crates.io index
required by package `examples_rclrs_message_demo v0.5.0 (.../src/examples/rclrs/message_demo)`
---
Failed <<< examples_rclrs_message_demo
2) Minimal package failure (std_msgs::msg::String subscriber)
In my minimal workspace (same packages as before but without the examples repo), colcon build fails with:
--- stderr: rust
error: failed to select a version for the requirement `std_msgs = "*"`
version 4.2.3 is yanked
location searched: crates.io index
required by package `rust v0.1.0 (.../src/rust)`
---
In both cases .cargo/config.toml is effectively empty and only contains:
[patch.crates-io]3) After adding rosidl_core & rosidl_defaults
Additionally, if I add rosidl_core and rosidl_defaults (Jazzy branches), then .cargo/config.toml gets populated and message crates are resolved locally (e.g., install/std_msgs/share/std_msgs/rust). However, my node then fails to compile due to a rosidl_runtime_rs version mismatch:
error[E0277]: the trait bound `std_msgs::msg::String: MessageIDL` is not satisfied
--> src/timer_pub_count.rs:8:11
|
8 | _pub: Publisher<std_msgs::msg::String>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MessageIDL` is not implemented for `std_msgs::msg::String`
|
note: there are multiple different versions of crate `rosidl_runtime_rs` in the dependency graph
--> /home/theo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rosidl_runtime_rs-0.6.0/src/traits.rs:132:1
|
132 | pub trait Message: Clone + Debug + Default + 'static + Send + Sync {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: src/timer_pub_count.rs:3:5
|
3 | use rclrs::*;
| ----- one version of crate `rosidl_runtime_rs` used here, as a dependency of crate `rclrs`
...
8 | _pub: Publisher<std_msgs::msg::String>,
| -------- one version of crate `rosidl_runtime_rs` used here, as a dependency of crate `std_msgs`
|
::: /home/theo/rclrs07/workspace_minimal/install/std_msgs/share/std_msgs/rust/src/msg.rs:2817:1
|
2817 | pub struct String {
| ----------------- this type doesn't implement the required trait
|
::: /home/theo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rosidl_runtime_rs-0.5.0/src/traits.rs:24:1
|
24 | pub trait SequenceAlloc: Sized {
| ------------------------------ this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `PublisherState`
--> /home/theo/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rclrs-0.7.0/src/publisher.rs:106:8
|
104 | pub struct PublisherState<T>
| -------------- required by a bound in this struct
105 | where
106 | T: Message,
| ^^^^^^^ required by this bound in `PublisherState`
Has anyone managed to make rclrs v0.7 work on Jazzy using the current installation steps?
Thanks.