Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Use better Time constructor args
Browse files Browse the repository at this point in the history
  • Loading branch information
Flova committed Nov 12, 2023
1 parent ea0696c commit c1bc67c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, blackboard, dsd, parameters=None):
self.blackboard.last_init_odom_transform = self.blackboard.tf_buffer.lookup_transform(
self.blackboard.odom_frame,
self.blackboard.base_footprint_frame,
Time(seconds=0, nanoseconds=0),
Time(),
Duration(seconds=1.0),
) # wait up to 1 second for odom data
except (tf2.LookupException, tf2.ConnectivityException, tf2.ExtrapolationException) as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def perform(self, reevaluate=False):

try:
odom_transform = self.blackboard.tf_buffer.lookup_transform(
self.blackboard.odom_frame, self.blackboard.base_footprint_frame, Time(seconds=0, nanoseconds=0)
self.blackboard.odom_frame, self.blackboard.base_footprint_frame, Time()
)
except (tf2.LookupException, tf2.ConnectivityException, tf2.ExtrapolationException) as e:
self.blackboard.node.get_logger().error(
Expand Down
2 changes: 1 addition & 1 deletion bitbots_path_planning/bitbots_path_planning/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def set_goal(self, pose: PoseStamped) -> None:
"""
Updates the goal pose
"""
pose.header.stamp = Time().to_msg()
pose.header.stamp = Time(clock_type=self.node.get_clock().clock_type).to_msg()
self.goal = pose

def cancel(self) -> None:
Expand Down

0 comments on commit c1bc67c

Please sign in to comment.