Skip to content

Commit 6322d98

Browse files
committed
update
1 parent 05d2c19 commit 6322d98

File tree

7 files changed

+64
-13
lines changed

7 files changed

+64
-13
lines changed

.github/workflows/rust_and_ros2.yml

+19
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ jobs:
1717
- run: docker build . --file ./tests/Dockerfile_no_ros --tag r2r_no_ros
1818
- run: docker run r2r_no_ros cargo build --features doc-only
1919

20+
minimal_workspace_jazzy:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Checkout tools repo
25+
uses: actions/checkout@v4
26+
with:
27+
repository: m-dahl/r2r_minimal_node
28+
path: r2r_minimal_node
29+
- run: docker build . --file ./tests/Dockerfile_jazzy --tag r2r_jazzy
30+
- run: docker run r2r_jazzy /r2r/tests/build_minimal_node.bash
31+
2032
minimal_workspace_iron:
2133
runs-on: ubuntu-latest
2234
steps:
@@ -29,6 +41,13 @@ jobs:
2941
- run: docker build . --file ./tests/Dockerfile_iron --tag r2r_iron
3042
- run: docker run r2r_iron /r2r/tests/build_minimal_node.bash
3143

44+
tests_jazzy:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- run: docker build . --file ./tests/Dockerfile_jazzy --tag r2r_jazzy
49+
- run: docker run r2r_jazzy cargo test
50+
3251
tests_iron:
3352
runs-on: ubuntu-latest
3453
steps:

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Since the default behavior is to build all sourced message types, build time can
3434

3535
What works?
3636
--------------------
37-
- Up to date with ROS2 ~Dashing~ ~Eloquent~ Foxy Galactic Humble Iron
37+
- Up to date with ROS2 ~Dashing~ ~Eloquent~ Foxy Galactic Humble Iron Jazzy
3838
- Building Rust types
3939
- Publish/subscribe
4040
- Services
@@ -47,6 +47,8 @@ Changelog
4747
--------------------
4848
#### [Unreleased]
4949

50+
- Update for ros2 jazzy
51+
5052
#### [0.9.0] - 2024-05-17
5153
- Fix unsafe precondition(s) violated with rust 1.78 <https://github.com/sequenceplanner/r2r/issues/96>. There may be more of these to fix, please report if you encounter.
5254
- Expose QoS settings for service clients and servers <https://github.com/sequenceplanner/r2r/pull/95>. Note, slight API change!

r2r/src/lib.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,16 @@ pub const ROS_DISTRO: &str = "galactic";
143143
pub const ROS_DISTRO: &str = "humble";
144144
#[cfg(r2r__ros__distro__rolling)]
145145
pub const ROS_DISTRO: &str = "rolling";
146+
#[cfg(r2r__ros__distro__iron)]
147+
pub const ROS_DISTRO: &str = "iron";
148+
#[cfg(r2r__ros__distro__jazzy)]
149+
pub const ROS_DISTRO: &str = "jazzy";
146150
#[cfg(not(any(
147151
r2r__ros__distro__foxy,
148152
r2r__ros__distro__galactic,
149153
r2r__ros__distro__humble,
150-
r2r__ros__distro__rolling
154+
r2r__ros__distro__rolling,
155+
r2r__ros__distro__iron,
156+
r2r__ros__distro__jazzy
151157
)))]
152158
pub const ROS_DISTRO: &str = "unknown";

r2r/src/qos.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ pub enum ReliabilityPolicy {
251251
BestEffort,
252252
Reliable,
253253
SystemDefault,
254-
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling))]
254+
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling, r2r__ros__distro__jazzy))]
255255
BestAvailable,
256256
Unknown,
257257
}
@@ -267,7 +267,7 @@ impl From<ReliabilityPolicy> for rmw_qos_reliability_policy_t {
267267
ReliabilityPolicy::SystemDefault => {
268268
rmw_qos_reliability_policy_t::RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT
269269
}
270-
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling))]
270+
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling, r2r__ros__distro__jazzy))]
271271
ReliabilityPolicy::BestAvailable => {
272272
rmw_qos_reliability_policy_t::RMW_QOS_POLICY_RELIABILITY_BEST_AVAILABLE
273273
}
@@ -290,7 +290,7 @@ impl From<rmw_qos_reliability_policy_t> for ReliabilityPolicy {
290290
rmw_qos_reliability_policy_t::RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT => {
291291
ReliabilityPolicy::SystemDefault
292292
}
293-
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling))]
293+
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling, r2r__ros__distro__jazzy))]
294294
rmw_qos_reliability_policy_t::RMW_QOS_POLICY_RELIABILITY_BEST_AVAILABLE => {
295295
ReliabilityPolicy::BestAvailable
296296
}
@@ -306,7 +306,7 @@ pub enum DurabilityPolicy {
306306
TransientLocal,
307307
Volatile,
308308
SystemDefault,
309-
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling))]
309+
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling, r2r__ros__distro__jazzy))]
310310
BestAvailable,
311311
Unknown,
312312
}
@@ -323,7 +323,7 @@ impl From<DurabilityPolicy> for rmw_qos_durability_policy_t {
323323
DurabilityPolicy::SystemDefault => {
324324
rmw_qos_durability_policy_t::RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT
325325
}
326-
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling))]
326+
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling, r2r__ros__distro__jazzy))]
327327
DurabilityPolicy::BestAvailable => {
328328
rmw_qos_durability_policy_t::RMW_QOS_POLICY_DURABILITY_BEST_AVAILABLE
329329
}
@@ -346,7 +346,7 @@ impl From<rmw_qos_durability_policy_t> for DurabilityPolicy {
346346
rmw_qos_durability_policy_t::RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT => {
347347
DurabilityPolicy::SystemDefault
348348
}
349-
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling))]
349+
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling, r2r__ros__distro__jazzy))]
350350
rmw_qos_durability_policy_t::RMW_QOS_POLICY_DURABILITY_BEST_AVAILABLE => {
351351
DurabilityPolicy::BestAvailable
352352
}
@@ -363,7 +363,7 @@ pub enum LivelinessPolicy {
363363
ManualByNode,
364364
ManualByTopic,
365365
SystemDefault,
366-
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling))]
366+
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling, r2r__ros__distro__jazzy))]
367367
BestAvailable,
368368
Unknown,
369369
}
@@ -383,7 +383,7 @@ impl From<LivelinessPolicy> for rmw_qos_liveliness_policy_t {
383383
LivelinessPolicy::SystemDefault => {
384384
rmw_qos_liveliness_policy_t::RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT
385385
}
386-
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling))]
386+
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling, r2r__ros__distro__jazzy))]
387387
LivelinessPolicy::BestAvailable => {
388388
rmw_qos_liveliness_policy_t::RMW_QOS_POLICY_LIVELINESS_BEST_AVAILABLE
389389
}
@@ -409,7 +409,7 @@ impl From<rmw_qos_liveliness_policy_t> for LivelinessPolicy {
409409
rmw_qos_liveliness_policy_t::RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT => {
410410
LivelinessPolicy::SystemDefault
411411
}
412-
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling))]
412+
#[cfg(any(r2r__ros__distro__iron, r2r__ros__distro__rolling, r2r__ros__distro__jazzy))]
413413
rmw_qos_liveliness_policy_t::RMW_QOS_POLICY_LIVELINESS_BEST_AVAILABLE => {
414414
LivelinessPolicy::BestAvailable
415415
}

r2r_common/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::{
1010
};
1111

1212
#[cfg(not(feature = "doc-only"))]
13-
const SUPPORTED_ROS_DISTROS: &[&str] = &["foxy", "galactic", "humble", "iron", "rolling"];
13+
const SUPPORTED_ROS_DISTROS: &[&str] = &["foxy", "galactic", "humble", "iron", "rolling", "jazzy"];
1414

1515
const WATCHED_ENV_VARS: &[&str] = &[
1616
"AMENT_PREFIX_PATH",

tests/Dockerfile_jazzy

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# syntax=docker/dockerfile:1
2+
FROM ros:jazzy
3+
4+
# Update default packages
5+
RUN apt-get update
6+
7+
# Get Ubuntu packages
8+
RUN apt-get install -y \
9+
build-essential \
10+
curl \
11+
libclang-dev
12+
13+
# Get ros test messages
14+
RUN apt-get install -y ros-jazzy-test-msgs ros-jazzy-example-interfaces
15+
16+
# Get Rust
17+
RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | bash -s -- -y
18+
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
19+
20+
COPY . /r2r
21+
RUN chmod +x /r2r/tests/test.bash
22+
ENTRYPOINT [ "/r2r/tests/test.bash" ]

tests/test.bash

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
# run rustup to test with latest rust version
66
rustup update
77

8-
if [ -e "/opt/ros/iron/setup.bash" ]; then
8+
if [ -e "/opt/ros/jazzy/setup.bash" ]; then
9+
source "/opt/ros/jazzy/setup.bash"
10+
elif [ -e "/opt/ros/iron/setup.bash" ]; then
911
source "/opt/ros/iron/setup.bash"
1012
elif [ -e "/opt/ros/humble/setup.bash" ]; then
1113
source "/opt/ros/humble/setup.bash"

0 commit comments

Comments
 (0)