Expand description
Rust client library for ROS 2.
For getting started, see the README.
Structs
- This struct is given to the discriminator function of the
ParameterBuilder
so it knows what values are available to choose from. - Main class responsible for sending requests to a ROS service.
- Internal struct used by clients.
- Struct that implements a Clock and wraps
rcl_clock_t
. - A clock source that can be used to drive the contained clock. Created when a clock of type
ClockType::RosTime
is constructed - Shared state between nodes and similar entities.
- A waitable entity used for waking up a wait set manually.
- A message that is owned by the middleware, loaned for publishing.
- 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.
- Additional information about a received message.
- A processing unit that can communicate with other nodes.
- A builder for creating a
Node
. - Stores a node’s name and namespace
- 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. - Builder used to declare a parameter. Obtain this by calling
crate::Node::declare_parameter
. - Options that can be attached to a parameter, such as description, ranges. Some of this data will be used to populate the ParameterDescriptor
- Describes the range for paramter type T.
- 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:
- Allows access to all parameters via get / set functions, using their name as a key.
- Struct for sending messages of type
T
. - An identifier for a publisher in the local context.
- A Quality of Service profile.
- Struct encapsulating an error message from the rcl layer or below.
- A message that is owned by the middleware, loaned out for reading.
- 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.
- A list of entities that are ready, returned by
WaitSet::wait
. - Main class responsible for responding to requests sent by ROS clients.
- Internal struct used by services.
- Single-threaded executor implementation.
- Struct for receiving messages of type
T
. - Internal struct used by subscriptions.
- Struct that represents time.
- Contains topic endpoint information
- A struct for waiting on subscriptions and other waitable entities to become ready.
Enums
- An enum capturing the various possible function signatures for subscription callbacks.
- Enum to describe clock type. Redefined for readability and to eliminate the uninitialized case from the
rcl_clock_type_t
enum in the binding. - Error that can be generated when doing operations on parameters.
- Describes the parameter’s type. Similar to
ParameterValue
but also includes aDynamic
variant for dynamic parameters. - A parameter value.
- Describes errors that can be generated when trying to set a parameter’s value.
- The
DURABILITY
DDS QoS policy. - A duration that can take two special values: System default and infinite.
- The
HISTORY
DDS QoS policy. - The
LIVELINESS
DDS QoS policy. - The
RELIABILITY
DDS QoS policy. - Return codes of
rcl
functions. - The main error type.
Constants
- Equivalent to
ClockQos
from therclcpp
package. Same as sensor data but with a history depth of 1 - Equivalent to
rmw_qos_profile_default
from thermw
package. - Equivalent to
rmw_qos_profile_parameters
from thermw
package. - Equivalent to
rmw_qos_profile_parameter_events
from thermw
package. - Equivalent to
rmw_qos_profile_sensor_data
from thermw
package. - Equivalent to
rmw_qos_profile_services_default
from thermw
package. - Equivalent to
rmw_qos_profile_system_default
from thermw
package.
Traits
- Trait to be implemented by concrete Client structs.
- Convenience trait for
Publisher::publish
. - A trait that describes a value that can be converted into a parameter.
- Trait to be implemented by concrete Service structs.
- Trait to be implemented by concrete
Subscription
s. - A trait for allowed callbacks for subscriptions.
Functions
- Creates a new node in the empty namespace.
- Creates a
NodeBuilder
. - The default discriminator that chooses the initial value for a parameter. The implementation here uses a simple preference of
- Extract non-ROS arguments from program’s input arguments.
- Convenience function for calling
spin_once
in a loop. - Polls the node for new messages and executes the corresponding callbacks.
Type Aliases
- Stores a list of types associated with each topic.