Expand description
Rust client library for ROS 2.
For getting started, see the README.
Structs§
- Available
Values - This struct is given to the discriminator function of the
ParameterBuilder
so it knows what values are available to choose from. - Client
- Main class responsible for sending requests to a ROS service.
- Client
Handle - Internal struct used by clients.
- Clock
- Struct that implements a Clock and wraps
rcl_clock_t
. - Clock
Source - A clock source that can be used to drive the contained clock. Created when a clock of type
ClockType::RosTime
is constructed - Context
- Shared state between nodes and similar entities.
- Guard
Condition - A waitable entity used for waking up a wait set manually.
- Loaned
Message - A message that is owned by the middleware, loaned for publishing.
- Mandatory
Parameter - A parameter that must have a value This struct has ownership of the declared parameter. Additional parameter declaration will fail while this struct exists and the parameter will be undeclared when it is dropped.
- Message
Info - Additional information about a received message.
- Node
- A processing unit that can communicate with other nodes.
- Node
Builder - A builder for creating a
Node
. - Node
Name Info - Stores a node’s name and namespace
- Optional
Parameter - A parameter that might not have a value, represented by
Option<T>
. This struct has ownership of the declared parameter. Additional parameter declaration will fail while this struct exists and the parameter will be undeclared when it is dropped. - Parameter
Builder - Builder used to declare a parameter. Obtain this by calling
crate::Node::declare_parameter
. - Parameter
Options - Options that can be attached to a parameter, such as description, ranges. Some of this data will be used to populate the ParameterDescriptor
- Parameter
Range - Describes the range for paramter type T.
- Parameter
Ranges - Contains all the possible type of ranges that can be applied to a value. Usually only one of these ranges will be applied, but all have to be stored since:
- Parameters
- Allows access to all parameters via get / set functions, using their name as a key.
- Publisher
- Struct for sending messages of type
T
. - Publisher
Gid - An identifier for a publisher in the local context.
- QoSProfile
- A Quality of Service profile.
- RclError
Msg - Struct encapsulating an error message from the rcl layer or below.
- Read
Only Loaned Message - A message that is owned by the middleware, loaned out for reading.
- Read
Only Parameter - A parameter that must have a value and cannot be written to This struct has ownership of the declared parameter. Additional parameter declaration will fail while this struct exists and the parameter will be undeclared when it is dropped.
- Ready
Entities - A list of entities that are ready, returned by
WaitSet::wait
. - Service
- Main class responsible for responding to requests sent by ROS clients.
- Service
Handle - Internal struct used by services.
- Single
Threaded Executor - Single-threaded executor implementation.
- Subscription
- Struct for receiving messages of type
T
. - Subscription
Handle - Internal struct used by subscriptions.
- Time
- Struct that represents time.
- Topic
Endpoint Info - Contains topic endpoint information
- WaitSet
- A struct for waiting on subscriptions and other waitable entities to become ready.
- rmw_
request_ id_ t
Enums§
- AnySubscription
Callback - An enum capturing the various possible function signatures for subscription callbacks.
- Clock
Type - Enum to describe clock type. Redefined for readability and to eliminate the uninitialized case
from the
rcl_clock_type_t
enum in the binding. - Declaration
Error - Error that can be generated when doing operations on parameters.
- Parameter
Kind - Describes the parameter’s type. Similar to
ParameterValue
but also includes aDynamic
variant for dynamic parameters. - Parameter
Value - A parameter value.
- Parameter
Value Error - Describes errors that can be generated when trying to set a parameter’s value.
- QoSDurability
Policy - The
DURABILITY
DDS QoS policy. - QoSDuration
- A duration that can take two special values: System default and infinite.
- QoSHistory
Policy - The
HISTORY
DDS QoS policy. - QoSLiveliness
Policy - The
LIVELINESS
DDS QoS policy. - QoSReliability
Policy - The
RELIABILITY
DDS QoS policy. - RclReturn
Code - Return codes of
rcl
functions. - Rclrs
Error - The main error type.
Constants§
- QOS_
PROFILE_ CLOCK - Equivalent to
ClockQos
from therclcpp
package. Same as sensor data but with a history depth of 1 - QOS_
PROFILE_ DEFAULT - Equivalent to
rmw_qos_profile_default
from thermw
package. - QOS_
PROFILE_ PARAMETERS - Equivalent to
rmw_qos_profile_parameters
from thermw
package. - QOS_
PROFILE_ PARAMETER_ EVENTS - Equivalent to
rmw_qos_profile_parameter_events
from thermw
package. - QOS_
PROFILE_ SENSOR_ DATA - Equivalent to
rmw_qos_profile_sensor_data
from thermw
package. - QOS_
PROFILE_ SERVICES_ DEFAULT - Equivalent to
rmw_qos_profile_services_default
from thermw
package. - QOS_
PROFILE_ SYSTEM_ DEFAULT - Equivalent to
rmw_qos_profile_system_default
from thermw
package.
Traits§
- Client
Base - Trait to be implemented by concrete Client structs.
- Message
Cow - Convenience trait for
Publisher::publish
. - Parameter
Variant - A trait that describes a value that can be converted into a parameter.
- Service
Base - Trait to be implemented by concrete Service structs.
- Subscription
Base - Trait to be implemented by concrete
Subscription
s. - Subscription
Callback - A trait for allowed callbacks for subscriptions.
Functions§
- create_
node - Creates a new node in the empty namespace.
- create_
node_ builder - Creates a
NodeBuilder
. - default_
initial_ value_ discriminator - The default discriminator that chooses the initial value for a parameter. The implementation here uses a simple preference of
- extract_
non_ ros_ args - Extract non-ROS arguments from program’s input arguments.
- spin
- Convenience function for calling
spin_once
in a loop. - spin_
once - Polls the node for new messages and executes the corresponding callbacks.
Type Aliases§
- Topic
Names AndTypes - Stores a list of types associated with each topic.