diff --git a/src/main.rs b/src/main.rs index 7838f70..f14cc54 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ fn main() -> Result<(), RclrsError> { let mut increment = 0.0; thread::spawn(move || loop { thread::sleep(Duration::from_micros(publisher_thread_throttle_us)); - let joint_state_msg = create_joint_state_msg(&node, increment); + let joint_state_msg = create_joint_state_msg(increment); joint_state_publisher .publish_data(&joint_state_msg) .unwrap(); diff --git a/src/ros_publisher.rs b/src/ros_publisher.rs index 4c61732..746f0de 100644 --- a/src/ros_publisher.rs +++ b/src/ros_publisher.rs @@ -25,7 +25,7 @@ impl RosPublisher { } } -pub fn create_joint_state_msg(_node: &Node, data: f64) -> JointStateMsg { +pub fn create_joint_state_msg(data: f64) -> JointStateMsg { let system_timestamp = SystemTime::now().duration_since(UNIX_EPOCH).unwrap(); // Workaround for https://github.com/ros2-rust/ros2_rust/issues/385 let time_msgs = TimeMsg {