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 they can be polled.

Modules

Macros

Structs

Enums

  • There are different and incompatible ways to map Services onto DDS Topics. The mapping used by ROS2 depends on the DDS implementation used and its configuration. For details, see OMG Specification RPC over DDS Section “7.2.4 Basic and Enhanced Service Mapping for RPC over DDS” RPC over DDS“ . which defines Service Mappings “Basic” and “Enhanced” ServiceMapping::Cyclone represents a third mapping used by RMW for CycloneDDS.

Statics

Traits

  • Trait to ensure Messages can be (de)serialized
  • Service trait pairs the Request and Response types together. Additionally, it ensures that Response and Request are Messages (Serializable), and we have a means to name the types.