1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! ROS2 interface using DDS module
//!
//! # Examples
//!
//! ```
//! use rustdds::dds::DomainParticipant;
//! use rustdds::dds::data_types::TopicKind;
//! use rustdds::dds::traits::RTPSEntity;
//! use rustdds::ros2::RosParticipant;
//! use rustdds::ros2::NodeOptions;
//! use rustdds::ros2::RosNode;
//! use rustdds::ros2::builtin_datatypes::NodeInfo;
//! use rustdds::dds::qos::QosPolicies;
//! use rustdds::serialization::CDRSerializerAdapter;
//!
//!
//!
//! // RosParticipant is needed for defined RosNodes to be visible in ROS2 network.
//! let mut ros_participant = RosParticipant::new().unwrap();
//!
//!
//! // declaring ros node
//! let mut ros_node = ros_participant.new_RosNode(
//! "some_node_name",
//! "/some_namespace",
//! NodeOptions::new(false), // enable rosout?
//! ).unwrap();
//!
//! // Creating some topic for RosNode
//! let some_topic = ros_node.create_ros_topic(
//! "some_topic_name",
//! "NodeInfo",
//! QosPolicies::builder().build(),
//! TopicKind::NoKey)
//! .unwrap();
//!
//! // declaring some writer that use non keyed types
//! let some_writer = ros_node
//! .create_ros_nokey_publisher::<NodeInfo, CDRSerializerAdapter<_>>(
//! some_topic, None)
//! .unwrap();
//!
//! // Readers and RosParticipant implement mio Evented trait and thus function the same way as
//! // std::sync::mpcs and can be handled the same way for reading the data
//!
//!
//! ```
/// Some builtin datatypes needed for ROS2 communication
/// Some convenience topic infos for ROS2 communication
pub
pub use *;
pub type RosSubscriber<D, DA> = crateDataReader;
pub type KeyedRosSubscriber<D, DA> = crateDataReader;
pub type RosPublisher<D, SA> = crateDataWriter;
pub type KeyedRosPublisher<D, SA> = crateDataWriter;
// Short-hand notation for CDR serialization
pub type RosSubscriber_CDR<D> =
crateDataReader;
pub type KeyedRosSubscriber_CDR<D> =
crateDataReader;
pub type RosPublisher_CDR<D> =
crateDataWriter;
pub type KeyedRosPublisher_CDR<D> =
crateDataWriter;