diff --git a/README.md b/README.md index c882b5a5a..c88476b81 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,11 @@ Introduction This is a set of projects (the `rclrs` client library, code generator, examples and more) that enables developers to write ROS 2 applications in Rust. +Installation +------------ + +Follow the [instructions in the documentation directory](docs/building.md). + Features and limitations ------------------------ diff --git a/docs/writing_a_simple_publisher_and_subscriber.md b/docs/writing_a_simple_publisher_and_subscriber.md index a666ba80f..55e3a9284 100644 --- a/docs/writing_a_simple_publisher_and_subscriber.md +++ b/docs/writing_a_simple_publisher_and_subscriber.md @@ -92,7 +92,6 @@ To construct a node, replace the code in your `main.rs` file with the following: ```rust /// Creates a SimplePublisherNode, initializes a node and publisher, and provides /// methods to publish a simple "Hello World" message on a loop in separate threads. - use rclrs::{create_node, Context, Node, Publisher, RclrsError, QOS_PROFILE_DEFAULT}; use std::{env, sync::Arc, thread, time::Duration}; use std_msgs::msg::String as StringMsg; @@ -103,12 +102,12 @@ struct SimplePublisherNode { publisher: Arc>, } impl SimplePublisherNode { - fn new(context: &context) -> result { + fn new(context: &Context) -> Result { let node = create_node(context, "simple_publisher").unwrap(); let publisher = node - .create_publisher("publish_hello", qos_profile_default) + .create_publisher("publish_hello", QOS_PROFILE_DEFAULT) .unwrap(); - ok(self { node, publisher }) + Ok(Self { node, publisher }) } fn publish_data(&self, increment: i32) -> Result { let msg: StringMsg = StringMsg {