Rewrite tines-ros2/src/node.rs against the rclrs 0.8 API (Context::
default_from_env -> create_basic_executor -> create_node; type-inferred
subscriptions; thiserror-based RclrsError) and switch payloads from
std_msgs String to UInt8MultiArray:
* live topics publish the raw Observation.bytes as data (no UTF-8 lossy);
* inbound callbacks use msg.data verbatim;
* receipts are a 32-byte UInt8MultiArray (peer[..16] ++ id[..16]);
* supply the required MultiArrayLayout { dim: [], data_offset: 0 }.
Bump ros_env 0.1 -> 0.3 so the crate's std_msgs pins rclrs 0.8's rosidl
runtime 0.7 (was 0.6), and update Cargo.lock. Add #[allow(dead_code)] on
ManagedTopic::subscriber (drop-guard for the rcl subscription handle).
Keep the ROS2-free build green; no changes outside tines-ros2/ (and the
Cargo.lock entry).
36 lines
1.6 KiB
TOML
36 lines
1.6 KiB
TOML
[package]
|
|
name = "tines-ros2"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "Self-contained ROS2 node for tines: bridges tines topics to ROS2 topics with a /tines/receipts channel for confidence events. rclrs is an optional feature (off by default) so the crate builds without a ROS2 toolchain."
|
|
authors.workspace = true
|
|
repository.workspace = true
|
|
readme.workspace = true
|
|
documentation = "https://docs.rs/tines-ros2"
|
|
keywords = ["robotics", "ros2", "gossip", "delay-tolerant", "science::robotics"]
|
|
categories = ["science::robotics", "network-programming"]
|
|
|
|
[features]
|
|
# rclrs (the ROS2 client library) is optional and off by default: the crate's
|
|
# pure tines-side pieces (topic naming, the Node/Store/Transport wiring) build
|
|
# and are tested without a ROS2 toolchain. Enable `--features ros2` to compile
|
|
# the rclrs-backed `TinesNode`.
|
|
default = []
|
|
ros2 = ["dep:rclrs", "dep:ros-env"]
|
|
|
|
[dependencies]
|
|
tines-core = { path = "../tines-core", version = "0.3.0" }
|
|
tines-store = { path = "../tines-store", version = "0.3.0" }
|
|
tines-bt = { path = "../tines-bt", version = "0.3.0" }
|
|
rclrs = { version = "0.8", optional = true }
|
|
# ros_env provides the ROS 2 message types (std_msgs, including
|
|
# UInt8MultiArray) by include!()ing the generated crates from
|
|
# AMENT_PREFIX_PATH; only needed behind the `ros2` feature alongside rclrs.
|
|
# Pinned to 0.3 so it shares rclrs 0.8's rosidl_runtime_rs 0.7 rather than the
|
|
# 0.6 that ros_env 0.1 pulls in. (The crates.io package is `ros-env`; Cargo maps
|
|
# it to the `ros_env` crate id.)
|
|
ros-env = { version = "0.3", optional = true }
|
|
|
|
[dev-dependencies]
|