Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update ros2_rust digest to 31e4563 #390

Merged
merged 5 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion examples/chatter/talker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ use std::env;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;

use rclrs::{log_info, ToLogParams};

fn main() -> Result<(), Box<dyn std::error::Error>> {
let shut_down = Arc::new(AtomicBool::new(false));
signal_hook::flag::register(signal_hook::consts::SIGINT, Arc::clone(&shut_down))?;
Expand All @@ -19,7 +21,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {

while !shut_down.load(Ordering::Relaxed) && context.ok() {
message.data = format!("Hello, world! {}", publish_count);
rclrs::log_info!(node.logger_name(), "Publishing: {}", message.data);
log_info!(node.logger(), "Publishing: {}", message.data);
publisher.publish(&message)?;
publish_count += 1;
std::thread::sleep(std::time::Duration::from_millis(500));
Expand Down
4 changes: 3 additions & 1 deletion examples/zero_copy/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::time::SystemTime;

use rclrs::{log_info, ToLogParams};

fn main() -> Result<(), Box<dyn std::error::Error>> {
let shut_down = Arc::new(AtomicBool::new(false));
for signal in [signal_hook::consts::SIGINT, signal_hook::consts::SIGTERM] {
Expand All @@ -24,7 +26,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.as_micros() as u64;
let delay_us = now - msg.timestamp;
let data_length = msg.data_length as usize;
rclrs::log_info!(subscription_node.logger_name(),
log_info!(subscription_node.logger(),
"Delay {} us, I heard: '{:?}'",
delay_us,
String::from_utf8(msg.data[..data_length].to_vec()).unwrap()
Expand Down
4 changes: 3 additions & 1 deletion examples/zero_copy/talker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::time::SystemTime;

use rclrs::{log_info, ToLogParams};

fn main() -> Result<(), Box<dyn std::error::Error>> {
let shut_down = Arc::new(AtomicBool::new(false));
for signal in [signal_hook::consts::SIGINT, signal_hook::consts::SIGTERM] {
Expand Down Expand Up @@ -37,7 +39,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let msg_len = msg.len();
message.data_length = msg_len as u64;
message.data[..msg_len].copy_from_slice(msg.as_bytes());
rclrs::log_info!(node.logger_name(), "Publishing: {}", msg);
log_info!(node.logger(), "Publishing: {}", msg);
message.publish()?;
publish_count += 1;
std::thread::sleep(std::time::Duration::from_millis(callback_period_ms as u64));
Expand Down
147 changes: 0 additions & 147 deletions repositories/patches/ros2_rust_fix_rcl_bindings.patch

This file was deleted.

Loading