| Crates.io | rosrustext_roslibrust |
| lib.rs | rosrustext_roslibrust |
| version | 0.2.2 |
| created_at | 2026-01-06 17:21:20.92232+00 |
| updated_at | 2026-01-19 10:46:10.395175+00 |
| description | roslibrust adapter for rosrustext lifecycle semantics |
| homepage | https://github.com/convyares-FCSL/rosrustext |
| repository | https://github.com/convyares-FCSL/rosrustext |
| max_upload_size | |
| id | 2026341 |
| size | 90,035 |
ROS 2 lifecycle parity for Rust via roslibrust + rosbridge.
rosrustext_roslibrust is a ROS-facing adapter that projects the canonical
lifecycle semantics defined in rosrustext_core into standard ROS 2 services
and topics, using roslibrust over rosbridge.
Upstream transport:
This crate exists to provide production-grade lifecycle behavior today, even in environments where native RCL bindings are unavailable or undesirable.
Lifecycle services are not exposed directly by roslibrust alone.
They are projected onto the ROS graph by rosrustext_lifecycle_proxy over
rosbridge.
Required runtime stack:
rosbridge_websocketrosrustext_lifecycle_proxyrosrustext_roslibrust node (or the demo)| Area | Tool parity | User parity |
|---|---|---|
| Lifecycle | Implemented (services / events / bond / gating) | Partial |
| Parameters | Not implemented | Not implemented |
| Actions | Not implemented | Not implemented |
| Executor | Not implemented | Not implemented |
Lifecycle is the only supported feature in this adapter.
The following ROS-facing lifecycle surface is fully implemented and verified
against real ROS tooling. These endpoints are provided by
rosrustext_lifecycle_proxy and are not native to roslibrust alone.
change_stateget_stateget_available_statesget_available_transitionstransition_event publisher
/bond heartbeats for Nav2 compatibility (via proxy)All lifecycle semantics are sourced from rosrustext_core.
In roslibrust/rosbridge transports, you must call
register_lifecycle_backend_rosbridge once at startup to expose the backend
for the proxy.
use std::sync::{Arc, Mutex};
use roslibrust::rosbridge::ClientHandle;
use rosrustext_roslibrust::lifecycle::LifecycleNode;
use rosrustext_roslibrust::transport::roslibrust::register_lifecycle_backend_rosbridge;
let lifecycle = Arc::new(Mutex::new(LifecycleNode::new(node_name, Box::new(MyCallbacks))?));
let client = ClientHandle::new(bridge_url).await?;
register_lifecycle_backend_rosbridge(&client, node_name, Arc::clone(&lifecycle)).await?;
rosapi or graph-introspection dependencies are introduced.change_state returns success=true once a transition is accepted;
callback outcome is reflected in:
transition_eventThese behaviors match documented and tested ROS 2 expectations.
This adapter is intended for scenarios where:
Typical use cases include:
This crate is not intended to replace native RCL-based adapters.
rosrustext_core
Defines lifecycle semantics (transport-agnostic)
rosrustext_roslibrust
Projects those semantics via rosbridge (this crate)
rosrustext_rosrs
Native RCL (rclrs) adapter for ROS-workspace environments
All adapters share the same semantic core and parity goals.
cargo build \
--manifest-path crates/rosrustext_roslibrust/Cargo.toml
A running rosbridge backend is required at runtime.
System-level tests validate behavior against real ROS 2 tools:
# From the repository root (ROS environment sourced)
./scripts/test/roslibrust/run_all_tests.sh
These tests exercise:
ros2 lifecycle CLIros2 service call for get_available_transitionsSee scripts/test/roslibrust/README.md for backend and environment requirements.
rosrustext_roslibrust provides reliable, production-grade lifecycle parity
for Rust nodes in ROS 2 systems via rosbridge.
It is a pragmatic, well-tested adapter for environments where tooling compatibility and correctness matter more than transport purity.