Skip to content

Commit

Permalink
feat!: Drop unused node parameter from create_joint_state_msg
Browse files Browse the repository at this point in the history
which was previously used to access the systemclocks timestamp,
an information rust can access itself.

Co-authored-by: Philipp Caspers <[email protected]>
  • Loading branch information
AiyionPrime and philipp-caspers committed Jul 9, 2024
1 parent 1321a12 commit aeae51f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/ros_publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl<T: RosMessage> RosPublisher<T> {
}
}

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 {
Expand Down

0 comments on commit aeae51f

Please sign in to comment.