Skip to content

Commit 99bdf8a

Browse files
committed
Merge remote-tracking branch 'origin/main' into execution_structure
2 parents 71c69a8 + 9a845c1 commit 99bdf8a

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Introduction
1111
This is a set of projects (the `rclrs` client library, code generator, examples and more) that
1212
enables developers to write ROS 2 applications in Rust.
1313

14+
Installation
15+
------------
16+
17+
Follow the [instructions in the documentation directory](docs/building.md).
18+
1419
Features and limitations
1520
------------------------
1621

docs/writing_a_simple_publisher_and_subscriber.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ To construct a node, replace the code in your `main.rs` file with the following:
9292
```rust
9393
/// Creates a SimplePublisherNode, initializes a node and publisher, and provides
9494
/// methods to publish a simple "Hello World" message on a loop in separate threads.
95-
9695
use rclrs::{create_node, Context, Node, Publisher, RclrsError, QOS_PROFILE_DEFAULT};
9796
use std::{env, sync::Arc, thread, time::Duration};
9897
use std_msgs::msg::String as StringMsg;
@@ -103,12 +102,12 @@ struct SimplePublisherNode {
103102
publisher: Arc<Publisher<StringMsg>>,
104103
}
105104
impl SimplePublisherNode {
106-
fn new(context: &context) -> result<self, RclrsError> {
105+
fn new(context: &Context) -> Result<Self, RclrsError> {
107106
let node = create_node(context, "simple_publisher").unwrap();
108107
let publisher = node
109-
.create_publisher("publish_hello", qos_profile_default)
108+
.create_publisher("publish_hello", QOS_PROFILE_DEFAULT)
110109
.unwrap();
111-
ok(self { node, publisher })
110+
Ok(Self { node, publisher })
112111
}
113112
fn publish_data(&self, increment: i32) -> Result<i32, RclrsError> {
114113
let msg: StringMsg = StringMsg {

examples/message_demo/src/message_demo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn check_default_values() {
1717
assert_eq!(msg.float_seq_unbounded, seq![6.0]);
1818
assert_eq!(msg.string_member.to_string(), "Χαίρετε 你好");
1919
assert_eq!(msg.wstring_member.to_string(), "αντίο σου 再见");
20-
assert_eq!(msg.bounded_string_member.to_string(), "äöü");
20+
assert_eq!(msg.bounded_string_member.to_string(), "aou");
2121
assert_eq!(msg.bounded_wstring_member.to_string(), "äöü");
2222
assert_eq!(
2323
msg.string_array.clone().map(|s| s.to_string()),

examples/rclrs_example_msgs/msg/VariousTypes.msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ float32[] float_seq_unbounded [6.0]
1313
# String types
1414
string string_member "Χαίρετε 你好"
1515
wstring wstring_member "αντίο σου 再见"
16-
string<=3 bounded_string_member "äöü"
16+
string<=3 bounded_string_member "aou"
1717
wstring<=3 bounded_wstring_member "äöü"
1818

1919
# Array/sequence of string type

rclrs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tokio = { version = "*", features = ["rt", "time", "macros"] }
4343

4444
[build-dependencies]
4545
# Needed for FFI
46-
bindgen = "0.66.1"
46+
bindgen = "0.70"
4747
# Needed for uploading documentation to docs.rs
4848
cfg-if = "1.0.0"
4949

rclrs/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn main() {
5757
.default_enum_style(bindgen::EnumVariation::Rust {
5858
non_exhaustive: false,
5959
})
60-
.parse_callbacks(Box::new(bindgen::CargoCallbacks));
60+
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()));
6161

6262
// Invalidate the built crate whenever this script or the wrapper changes
6363
println!("cargo:rerun-if-changed=build.rs");

0 commit comments

Comments
 (0)