Expand description
Core types, traits, and abstractions for nros
This crate provides the foundational types and traits for nros:
RosMessagetrait for message typesRosServicetrait for service typesRosActiontrait for action typesServiceServerandServiceClientfor service communication- Time and Duration types
- Error types
Re-exports§
pub use action::ActionClient;pub use action::ActionServer;pub use action::CancelResponse;pub use action::GoalId;pub use action::GoalInfo;pub use action::GoalResponse;pub use action::GoalStatus;pub use action::GoalStatusStamped;pub use action::RosAction;pub use clock::Clock;pub use clock::ClockType;pub use error::ErrorContext;pub use error::NanoRosError;pub use error::NanoRosErrorFilter;pub use error::NestedError;pub use error::RclReturnCode;pub use error::TakeFailedAsNone;pub use lifecycle::LifecycleState;pub use lifecycle::LifecycleTransition;pub use lifecycle::TransitionResult;pub use logger::Logger;pub use logger::OnceFlag;pub use message_info::MessageInfo;pub use message_info::PUBLISHER_GID_SIZE;pub use message_info::RawMessageInfo;pub use service::ServiceCallback;pub use service::ServiceClient;pub use service::ServiceRequest;pub use service::ServiceResult;pub use service::ServiceServer;pub use time::Duration;pub use time::Time;pub use types::BorrowedMessage;pub use types::RosMessage;pub use types::RosService;pub use heapless;
Modules§
- action
- ROS 2 Action types
- clock
- Clock API for nros
- error
- Unified error types for nros
- heap
- Heap-backed containers for generated
mode = "heap"message fields (RFC-0033). Available whenever an allocator is (theallocorstdfeature). Generated code refers tonros_core::heap::{Vec, String}so the same path works in both crate and inline (build.rs) codegen modes. - lifecycle
- Lifecycle state machine types (REP-2002)
- logger
- ROS 2 compatible logging utilities
- message_
info - Message metadata for received messages
- service
- ROS 2 Service types
- time
- ROS time types.
- types
- Core ROS type traits.
Structs§
- CdrReader
- CDR reader for deserialization
- CdrWriter
- CDR writer for serialization.
- LeSlice
View - A borrowed, alignment-agnostic view over a CDR little-endian numeric
sequence (RFC-0033
borrowedmode). Borrows the raw payload bytes zero-copy; decodes elements lazily on access, so the source buffer need not beT-aligned. Valid only for the borrow lifetime'a(the subscription callback scope).
Enums§
- Deser
Error - Deserialization error.
- SerError
- Serialization error.
Traits§
- Deserialize
- Trait for types that can be deserialized from CDR format
- Deserialize
Borrowed - Trait for borrowed (zero-copy) deserialization from CDR format (RFC-0033
borrowedstorage mode, issue 0007). - LeDecode
- A little-endian-decodable fixed-width numeric element of a borrowed sequence.
- Serialize
- Trait for types that can be serialized to CDR format