Crate ros2_client
source · [−]Expand description
ROS2 interface using DDS module
Examples
use rustdds::*;
use ros2_client::*;
use ros2_client::node_entities_info::NodeEntitiesInfo;
let mut ros_context = Context::new().unwrap();
let mut ros_node = ros_context.new_node(
"some_node_name",
"/some_namespace",
NodeOptions::new().enable_rosout(true),
).unwrap();
let some_topic = ros_node.create_topic(
"some_topic_name",
"NodeEntitiesInfo".to_string(),
&QosPolicies::builder().build() )
.unwrap();
// declaring some writer that use non keyed types
let some_writer = ros_node
.create_publisher::<NodeEntitiesInfo>(&some_topic, None)
.unwrap();
// Publisher and subscription implement [`mio::Evented`], so thay can be polled.
Modules
Some builtin datatypes needed for ROS2 communication Some convenience topic infos for ROS2 communication
Some builtin interfaces for ROS2 communication
Module for stuff we do not want to export from top level;
Structs
Client end of a ROS2 Service
Context communicates with other
participants information in ROS2 network. It keeps track of
NodeEntitiesInfo
s. Also acts as a wrapper for a RustDDS instance.
Node in ROS2 network. Holds necessary readers and writers for rosout and parameter events topics internally.
Configuration of Node This is a builder-like struct.
A ROS2 Publisher
Server end of a ROS2 Service
A ROS2 Subscription
Enums
Enumerate supported service mappings