Struct rustdds::ros2::RosNode[][src]

pub struct RosNode { /* fields omitted */ }

Node in ROS2 network. Holds necessary readers and writers for rosout and parameter events topics internally. Should be constructed using builder.

Implementations

impl RosNode[src]

pub fn remove_reader(&mut self, reader: &GUID)[src]

pub fn remove_writer(&mut self, writer: &GUID)[src]

pub fn clear_node(&mut self)[src]

Clears both all reader and writer guids from this node.

pub fn get_name(&self) -> &str[src]

pub fn get_namespace(&self) -> &str[src]

pub fn get_fully_qualified_name(&self) -> String[src]

pub fn get_options(&self) -> &NodeOptions[src]

pub fn get_domain_id(&self) -> u16[src]

pub fn create_ros_topic(
    &self,
    name: &str,
    type_name: &str,
    qos: QosPolicies,
    topic_kind: TopicKind
) -> Result<Topic, Error>
[src]

Creates ROS2 topic and handles necessary conversions from DDS to ROS2

Arguments

  • domain_participant - DomainParticipant

  • name - Name of the topic

  • type_name - What type the topic holds in string form

  • qos - Quality of Service parameters for the topic (not restricted only to ROS2)

  • topic_kind - Does the topic have a key (multiple DDS instances)? NoKey or WithKey

    summary of all rules for topic and service names in ROS 2 (as of Dec 2020)

  • must not be empty

  • may contain alphanumeric characters ([0-9|a-z|A-Z]), underscores (_), or forward slashes (/)

  • may use balanced curly braces ({}) for substitutions

  • may start with a tilde (~), the private namespace substitution character

  • must not start with a numeric character ([0-9])

  • must not end with a forward slash (/)

  • must not contain any number of repeated forward slashes (/)

  • must not contain any number of repeated underscores (_)

  • must separate a tilde (~) from the rest of the name with a forward slash (/), i.e. ~/foo not ~foo

  • must have balanced curly braces ({}) when used, i.e. {sub}/foo but not {sub/foo nor /foo}

pub fn create_ros_nokey_subscriber<D: DeserializeOwned + 'static, DA: DeserializerAdapter<D>>(
    &mut self,
    topic: Topic,
    qos: Option<QosPolicies>
) -> Result<RosSubscriber<D, DA>, Error>
[src]

Creates ROS2 Subscriber to no key topic.

Arguments

  • topic - Reference to topic created with create_ros_topic.
  • qos - Should take QOS and use if it's compatible with topics QOS. None indicates the use of Topics QOS.

pub fn create_ros_subscriber<D, DA: DeserializerAdapter<D>>(
    &mut self,
    topic: Topic,
    qos: Option<QosPolicies>
) -> Result<KeyedRosSubscriber<D, DA>, Error> where
    D: Keyed + DeserializeOwned + 'static,
    D::K: Key
[src]

Creates ROS2 Subscriber to Keyed topic.

Arguments

  • topic - Reference to topic created with create_ros_topic.
  • qos - Should take QOS and use it if it's compatible with topics QOS. None indicates the use of Topics QOS.

pub fn create_ros_nokey_publisher<D: Serialize, SA: SerializerAdapter<D>>(
    &mut self,
    topic: Topic,
    qos: Option<QosPolicies>
) -> Result<RosPublisher<D, SA>, Error>
[src]

Creates ROS2 Publisher to no key topic.

Arguments

  • topic - Reference to topic created with create_ros_topic.
  • qos - Should take QOS and use it if it's compatible with topics QOS. None indicates the use of Topics QOS.

pub fn create_ros_publisher<D, SA: SerializerAdapter<D>>(
    &mut self,
    topic: Topic,
    qos: Option<QosPolicies>
) -> Result<KeyedRosPublisher<D, SA>, Error> where
    D: Keyed + Serialize,
    D::K: Key
[src]

Creates ROS2 Publisher to Keyed topic.

Arguments

  • topic - Reference to topic created with create_ros_topic.
  • qos - Should take QOS and use it if it's compatible with topics QOS. None indicates the use of Topics QOS.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,